uid
stringlengths
6
55
question
stringlengths
34
465
context_short
sequence
context_long
sequence
tags
sequence
answer
stringlengths
1
25
relation
stringclasses
1 value
ifilter@desktop@98
ifilter -- an ifilter is a plugin that allows the windows indexing service and the newer windows @placeholder search to index different file formats so that they become searchable .
{ "confidence": [ 50.38551330566406, 48.7996826171875, 48.194190979003906, 48.135929107666016, 47.48460388183594, 47.05281066894531, 45.876766204833984, 45.041046142578125, 44.53577423095703, 43.785308837890625, 43.34820556640625, 42.70231246948242, 42.269935607910156, 42.26447296142578, 42.07406234741211, 42.04662322998047, 41.78615951538086, 41.477447509765625, 40.77583312988281, 40.72780990600586, 40.66923141479492, 40.56330108642578, 40.56330108642578, 40.56330108642578, 40.56330108642578, 40.56330108642578, 39.98524475097656, 39.98524475097656, 39.98524475097656, 39.92876434326172, 39.775325775146484, 39.775325775146484, 39.550376892089844, 39.165550231933594, 39.11261749267578, 39.047969818115234, 38.286685943603516, 38.27861022949219, 38.27861022949219, 38.27861022949219, 38.03335952758789, 37.27117919921875, 37.14642333984375, 37.14642333984375, 37.14642333984375, 37.06122589111328, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.8905029296875, 36.85530471801758, 36.83924865722656, 36.74314880371094, 36.67639923095703, 36.43132781982422, 36.23457717895508, 35.78946304321289, 35.78946304321289, 35.78946304321289, 35.78946304321289, 35.646331787109375, 35.646331787109375, 35.635032653808594, 35.25349807739258, 35.183868408203125, 35.183868408203125, 35.183868408203125, 35.183868408203125, 35.183868408203125, 35.183868408203125, 35.183868408203125, 35.158260345458984, 34.41143798828125, 34.35009765625, 34.35009765625, 34.19768524169922, 34.19538116455078, 34.05168151855469, 34.01118087768555, 33.54686737060547, 33.54686737060547, 33.54686737060547, 33.524818420410156, 33.23792266845703, 33.14588165283203, 32.985294342041016, 32.934566497802734, 32.72190475463867, 32.72190475463867, 32.72190475463867 ], "content": [ "To my knowlege only the Windows Indexer Service is discontinued not the IFilter interface .", "Looks like I am confusing the IFilter and the Indexing Service .", "Then you use standard IFilter mechanisms to parse the file contents : .. . .. . Where Windows already provides the code that loads an IFilter for a specified filename :", "When I do this on Windows 10 I see that the PDF file-type is missing an IFilter Registered IFilter is not found .", "From Indexing Service Implementations of IFilter http : msdn.microsoft.com en-us library ms692582 28v vs.85 29.aspx : .. . .. . Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8 .", "During re-indexing of the disk or when a file name handled by the IFilter is changed SearchFilterHost loads the image of the IFilter but then nothing else happens .", "Parameters for the IFilter are .. . .. . Text extracted for Indexed Search seems OK though and I imagine this would be using the same IFilter .", "I m not using Windows Search or Microsoft Search Server - I just need the IFilter to extract text from a file so your solution to use Windows Search et al would not apply .", "IFilter is not discontinued .", "I guess you have concluded that the new Windows Search is still based on IFilter .", "The IFilter returns different length for doc and docx", "I have worked in the past on providing an iFilter intended to provide any search indexing tool access to text contents inside an AutoCad dwg file .", "It works for the Adobe PDF IFilter though .", "Well it doesn t use IFilter .", "Since my IFilter only implements IFilter IPersist and IPersistFile most of the calls return E NOINTERFACE so Windows Search just releases my object and does nothing .", "What IFilter", "IFilter is still highly relevant and still used see stackoverflow.com questions 13521301 ifilter-replacement http : stackoverflow.com questions 13521301 ifilter-replacement .", "The DLL goes through all the tests in the IFilter test suite ifilttst filtdump filtreg ifilttst emitted property values are correct it is installed in c : windows system32 but it is not properly run by SearchFilterHost.exe used by Windows indexing services .", "I am trying to use Adobe IFilter to search PDF files .", "Only the Windows Indexing Service is discontinued in favor of Windows Search or Microsoft Search Server .", "Knowing newer versions of Adobe s iFilter have even more challenges we just opted to purchase FoxIt s PDF IFilter http : www.foxitsoftware.com products ifilter which is faster and much more reliable .", "Is this a known limitation of the Adobe IFilter for sharepoint", "There is nothing magical about IFilter objects .", "All IFilter dlls are COM dlls .", "The IFilter extracts text but not concatenated strings .", "IFilter was phased out long ago .", "Does PDF IFilter works on Win 7", "The ifilter also needs to use the IPersistStream interface .", "I think it s a bug in EPocalipse IFilter .", "I m using IFilter to index some MS Office docs .", "Typically an IFilter will be for a specific technology .", "No other IFilter consumers tried this .", "The problem is if we install the Foxit iFilter and then later the client decides to reinstall Adobe Reader it may overwrite the Foxit iFilter .", "I can t reconcile that with the fact that client support for IFilter is clearly documented as ending at Windows 7 .", "You want to use Microsoft s already written IFilter objects http : blogs.msdn.com b ifilter archive 2007 12 19 ms-filter-pack-released.aspx so that you can learn the contents of a docx file .", "If so how did you install the iFilter", "in what I understood SharePoint Search is using some IFilter for that .", "My Application uses IFilter to get contents of Files .", "Adobe has an x64 PDF IFilter available for download .", "Adobe s IFilter doesn t seem to be implementing this interface .", "I need to use an IFilter interface from a 32bit app on Windows x64 systems .", "Has anyone had any similar issues with the IFIlter .pdf AcroExch.Document.11 Adobe Acrobat Document application pdf on Windows Server", "IFilter respects these settings and won t allow the PDF to be indexed .", "I had no problems running using this IFilter .", "The second and free solution was to use the Adbobe IFilter 5.0 .", "I would use the library IFilter in my c application witch run as x86 but the IFilter doesn t work as x86", "My application is multi threaded does Ifilter works with multi-threading", "You cannot multithread the Adobe IFilter it is designed for Single Thread appartement .", "I used Process Monitor procmon.exe to look at when SearchFilterHost is using the IFilter .", "I have a small program which extracts the content of a PDF using iFilter .", "IFilter is called from C text extractor at https : github.com Sicos1977 IFilterTextReader .", "You don t want to implement an IFilter to parse an Office 2007 docx .", "You say textreader in your code but the example is using EPocalips IFilter module .", "It has detection for infinite IFilter parse loops and excel files with locked cells .", "However note that the IPersistStream API may not be implemented by every IFilter .", "I want to use the IFilter interface to extract and then search the text from different documents .", "Foxit IFilter has a CLSID of 987f8d1a-26e6-4554-b007-6b20e2680632 which is the Persistent Handlers Addins Registered column in IFilter Explorer .", "If I understand what you want to do you ll need to open the file as a stream from the database and present this stream to the search indexer or the iFilter of your choice .", "I can t find a Windows 10 PDF IFilter well Foxit has one but it s over 1 000 .", "For PDF ifilter you may need to look at a different supplier as previously adobe has not been the first to supply e.g .", "IFilter : : GetText retrieves WCHAR but what if the file is encoded with ASCII", "Stelio .. . .. . There are a lot of people with this issue with Adobe s iFilter .", "The thought is it comes down the permissions required to run the iFilter .", "I use this example but Ifilter doesn t run in x86", "Well not really the minimum seems to be IFilter IPersistFile and IPersistStream .", "OS : Win 8.1 x86 .. . .. . I am trying to develop an IFilter for a proprietary file-format .", "Instead you need to create an IFilter for a file extension or access it some other way .", "I need to develop an IFilter for Microsoft Search Server 2008 that performs prolonged computations to extract text .", "You can read some of my adventure here : http : blogs.msdn.com b ifilter archive 2006 12 25 chronicles-of-an-ifilter-development-inception-to-deployment.aspx .. . .. . The code you are referring to is old but still valid .", "Doers anyone know of an IFilter wrapper class that implements ReadLine .", "I think it should be possible somehow using the already installed IFilter-packages .", "I m using the IFilter interface to read the content of files such as .docx .pdf etc .", "Since the old XP indexer has gone expect IFilter support to be flaky .", "Filters are named after the principal interface used in their implementation the IFilter interface .. .", "I m trying to read the document length using Epocalipse Ifilter .", "As such we like to use the one from Foxit http : www.foxitsoftware.com pdf ifilter .", "V6.0 of the IFilter becomes flaky when not used in a single-threaded application as can be seen here http : objectmix.com inetserver 291887-adobe-pdf-ifilter-6-0-problems-windows-xp.html .. . .. . The first solution I came across was to use Foxit PDF IFilter http : www.foxitsoftware.com products ifilter which works like a charm and if I could squeeze 600 out of my client would certainly buy .", "I am indexing PDF file in an application using PDF IFilter 6.0 and I am getting the following exception : .. . .. . I am using Win 7 32-bit machine .", "Matt thanks for answering most of the links point to the version 9 of the Ifilter and it says that it does not work on the following versions and I was not able to find on line Ifilter 9.. .", "Nice example how to use iFilter in C is on CP http : www.codeproject.com Articles 13391 Using-IFilter-in-C .. . .. . Working on 32b 64b enviroment .", "I created a custom ifilter for a new extension .abc .", "I need to implement an IFilter in Delphi 2010 that can search through Office 2007 docx files and return the text found in the document .", "The error says Registered IFilter is not found .. . .. . Any help please", "So I guess that the only choice is to go with a custom Ifilter for Pdf indexing or build your custom one not a great option neither.. .", "I m currently using this Code Project IFilter Wrapper http : www.codeproject.com Articles 13391 Using-IFilter-in-C which is excellent and inherits TextReader but it doesn t contain an implementation for ReadLine .", "We can use tools such as IFilter Explorer http : www.citeknet.com Products IFilters IFilterExplorer tabid 62 Default.aspx to view this but I d like a way to do this in the application and warn the user client that the iFilter has changed .", "Since the foxit IFilter implements IPersistStream interface I think you can try get this interface from the IFilter and query for its CLSID to see if it is the one from foxit .", "According to the official documentation of the Windows search see msdn.microsoft.com en-us library windows desktop https : msdn.microsoft.com en-us library windows desktop cc678933 v vs.85 .aspx E2 80 8C E2 80 8B IFilter is still a core component for the indexing : Filters : Filters are critical components in the indexing process that emit item information for the gatherer .", "Then you can access the IPersistStream http : msdn.microsoft.com en-us library windows desktop ms690091 28v vs.85 29.aspx COM interface and use it to load the PDF content into the IFilter .", "We are using the Microsoft TIFF IFilter to OCR documents and store the information in SQL Server 2012 Full Text Search .", "From your link for BindIFilterFromStream : Indexing Service is unsupported as of Windows XP - what version of Windows are you trying this on", "The solution was to grant adobe iFilter dll bin directory full access to the SQL Server database engine service account .", "I m guessing the RTF IFilter is just really old and unimportant and they didn t think about implementing the other interface .", "In this post http : zabkat.com blog adobe-ifilter-exposed.htm you can read about ADOBE dirty trick that causes this problem .", "What I did just then is : removed the iFilter version 11 and then install the version 9 ." ] }
{ "confidence": [ 72.37150573730469, 72.09839630126953, 70.64346313476562, 66.40914916992188, 66.19193267822266, 64.39798736572266, 62.68059539794922, 62.368988037109375, 61.45463562011719, 59.95069885253906, 58.38400650024414, 57.762420654296875, 57.70843505859375, 57.100242614746094, 57.06681823730469, 56.6002197265625, 56.323272705078125, 56.26753234863281, 55.51508712768555 ], "content": [ "Question : I m currently using IFilters to extract text from various file word excel tiff pdf etc . I understand that IFilters have been discontinued with Windows 8 . Does anyone have any recommendations on how to extract text without the native apps being installed If it s any use I m using C and .Net 4 Comment : Looks like I am confusing the IFilter and the Indexing Service . I believe the newer Windows Search code uses IFilters so my code may still be ok . Comment : Why would you vote down my answer when you say that s the solution you are going with Comment : I m not using Windows Search or Microsoft Search Server - I just need the IFilter to extract text from a file so your solution to use Windows Search et al would not apply . It appears I was confused and as discussed elsewhere it would appear I m not the only one . The documentation states that the Indexing Service has gone end of life - I took this as IFilters have gone end of life too which I now believe may not be the case . .. . Answer : You could follow Microsoft s recommendations From Indexing Service Implementations of IFilter http : msdn.microsoft.com en-us library ms692582 28v vs.85 29.aspx : .. . .. . Indexing Service is no longer supported as of Windows XP and is unavailable for use as of Windows 8 . Instead use Windows Search http : msdn.microsoft.com en-us library aa965362 28v vs.85 29.aspx for client-side search and Microsoft Search Server Express http : go.microsoft.com fwlink p linkid 258445 for server-side search . Also see Developing Filter Handlers for Windows Search http : msdn.microsoft.com en-us library dd940430 28v vs.85 29.aspx .. . Comment : Sorry to sound grumpy but following Microsofts recommendations is not an option nor an answer I d mark you down but I don t have the required reputation yet . There are lots of developers out there like myself who use the IFilter interface to extract text from various files and then process or analyse this text . My project doesn t require a search-engine . Comment : Like most Microsoft deprecated interfaces e.g . IColumnProvider the interface itself should still work fine so I would have thought if any IFilters were installed you would still be able to use them .", "Question : I m currently using IFilters to extract text from various file word excel tiff pdf etc . I understand that IFilters have been discontinued with Windows 8 . Does anyone have any recommendations on how to extract text without the native apps being installed If it s any use I m using C and .Net 4 Comment : Looks like I am confusing the IFilter and the Indexing Service . I believe the newer Windows Search code uses IFilters so my code may still be ok . Comment : Why would you vote down my answer when you say that s the solution you are going with Comment : I m not using Windows Search or Microsoft Search Server - I just need the IFilter to extract text from a file so your solution to use Windows Search et al would not apply . It appears I was confused and as discussed elsewhere it would appear I m not the only one . The documentation states that the Indexing Service has gone end of life - I took this as IFilters have gone end of life too which I now believe may not be the case . .. . Answer : IFilter is not discontinued . Only the Windows Indexing Service is discontinued in favor of Windows Search or Microsoft Search Server . Both continue to use IFilters . According to this documentation http : msdn.microsoft.com en-us library windows desktop dd940431.aspx the main point of compatibility for IFilters going forward are that they support the IPersistStream interface . All modern implementations should avoid requiring IPersistStorage so they don t have to access the disk themselves .", "Question : null .. . Answer : I m using the IFilter interface to read the content of files such as .docx .pdf etc . For those two types and others this already works pretty well but I was wondering if it is possible to use this mechanism to read the meta data of a jpg file as well . I created a test image file and added some information to its details Title description .. . .. . .. . Interestingly the Windows Indexer is able to find this file using the text that I specified as title . By using the IFilter interface however I retrieve only an empty string for my jpeg . I also tested the command-line tool filtdump.exe from here : https : msdn.microsoft.com en-us library windows desktop dd940434 v vs.85 .aspx command-line which returned the same results as my implementation . Does anyone know how the Windows indexer is able to see the content and how I couold use the same mechanism to achieve similar results Comment : IFilter was phased out long ago . It became irrelevant after Vista was released 10 years ago . Comment : Hello David thank you for your answer . Could you give me a source for that information To my knowlege only the Windows Indexer Service is discontinued not the IFilter interface . IFilter is still highly relevant and still used see stackoverflow.com questions 13521301 ifilter-replacement http : stackoverflow.com questions 13521301 ifilter-replacement . The test tool that I mentioned is even part of the Windows 8.1 SDK . Comment : Since the old XP indexer has gone expect IFilter support to be flaky . You ask why the modern indexer can see the content Well it doesn t use IFilter . Why don t you use the same interfaces as the modern indexer Comment : Sorry but I don t think that s correct . According to the official documentation of the Windows search see msdn.microsoft.com en-us library windows desktop https : msdn.microsoft.com en-us library windows desktop cc678933 v vs.85 .aspx E2 80 8C E2 80 8B IFilter is still a core component for the indexing : Filters : Filters are critical components in the indexing process that emit item information for the gatherer . Filters are named after the principal interface used in their implementation the IFilter interface .. . Comment : OK fair enough . I guess you have concluded that the new Windows Search is still based on IFilter . I can t reconcile that with the fact that client support for IFilter is clearly documented as ending at Windows 7 . But you seem to know more than me .", "Question : I m using IFilter to index some MS Office docs . Loading from file is ok all works great like in all manuals and samples : .. . .. . HRESULT hr f LoadIFilter filename 0 void pFilter .. . .. . However using BindIFilterFromStream http : msdn.microsoft.com en-us library ms690827 28v vs.85 29.aspx API failed and i cant figure out how to use it properly . HRESULT hr ss BindIFilterFromStream spStream my IStream impl 0 void pFilter .. . .. . I implemented the IStream interface only the method except IUnknown s invoked during initialization is : .. . .. . After that hr ss is E FAIL and IFilter is NULL . There are case Using IFilter in C http : stackoverflow.com questions 7313828 using-ifilter-in-c-sharp-and-retrieving-file-from-database-rather-than-file-syst 19504946 19504946 and those method works great only for .pdf in c++ too but not for MSO docs.. . Comment : From your link for BindIFilterFromStream : Indexing Service is unsupported as of Windows XP - what version of Windows are you trying this on Comment : hm devmachine is windows-8.1 i ve tested in win2k3 - same result that in my Win8 PC.. . seems i realized my mistake : Is it means that in Windows newer than WinXP i cant use this API I m sorry for my english.. . .. . Answer : I figured out how to init IFilter properly here is the code : .. . .. . And getting the text from your Document is like usual sample from MSDN .. . .. . You do not need to implement your own IStream just initiliaze it from your buffer.. .", "Question : I m trying to figure out how to get Windows 10 to search PDF contents rather than having to open each file to search manually . According to this http : www.wikihow.com Make-Windows-7-Search-File-Contents you can specify which file-type should be content-searchable . When I do this on Windows 10 I see that the PDF file-type is missing an IFilter Registered IFilter is not found . Is this the right path I can t find a Windows 10 PDF IFilter well Foxit has one but it s over 1 000 . Adobe has one here http : www.adobe.com support downloads detail.jsp ftpID 5542 but it s only stated for Windows 7 and 8 . Any ideas Comment : Please show us what have you done so far.. . .. . Answer : You can simply install Adobe Acrobat or Reader and the PDF iFilter will install along with it . You ll get the 32-bit version but since the files are being indexed in the background it shouldn t really matter .", "Question : null .. . Answer : I m using Windows Server 2012 64bit and am investigating using iFilters as a means of extracting and indexing data from various file types . One of the file types is .msg MS email . The iFilter is mostly doing its job and retrieving the text as requested but it fails to retrieve the email content . I can t find anyone complaining of the same problem so suspect I am doing something wrong but cannot work out what it is especially when all the other filetypes work correctly . I ve tried adding the Windows Search feature and reviewed the Indexing Options to ensure .msg iFilters are set to retrieve properties and content . All fine there and I doubt that would cause it anyway as I m not using the Windows Search feature . I ve used the iFilters that come as default in with an Office 2013 installation and have also tried the iFilters that come with the Microsoft Office 2010 Filter Pack up to service pack 2 . All without any difference in my findings . I m out of ideas now so thought I d pose the problem here . Anyone got any thoughts.. . Comment : This doesn t sound like a software development problem . Comment : What do you think it sounds like Should I be raising this question on another stack exchange community Comment : Well a software development problem could be like I wrote this code and it does some unexpected crap or I ve developed my own IFilter and can t figure out how to register it or I m trying to tune this software development tool and have no luck . The problem you re having is about setting up an existing IFilter crafted by someone else . It s unlikely a good fit here - perhaps somewhere like SuperUser it ll fit better . Comment : Thanks will try there . I am wrapping this into some software I m developing hence my posting here . But I get your point . Comment : We ve developed a custom iFilter and have problems registering it so I d be interested in your other posts can you put links to them in this question", "Question : I need to implement an IFilter in Delphi 2010 that can search through Office 2007 docx files and return the text found in the document . The ifilter also needs to use the IPersistStream interface . Thanks Comment : Do you have a specific question How much do you already know about the topic at hand and what part do you need help with .. . Answer : You don t want to implement an IFilter to parse an Office 2007 docx . You want to use Microsoft s already written IFilter objects http : blogs.msdn.com b ifilter archive 2007 12 19 ms-filter-pack-released.aspx so that you can learn the contents of a docx file . Then you use standard IFilter mechanisms to parse the file contents : .. . .. . Where Windows already provides the code that loads an IFilter for a specified filename :", "Question : For a C web application I am wanting to index text from PDF DOC etc files stored in a database . I have been experimenting with an IFilter example on Code Project http : www.codeproject.com KB cs IFilter.aspx which works great for files from the file system but my files are stored in a MS-SQL database . Can anyone help me locate a sample to extract text from files stored in a database or have an idea on how to modify the Code Project code to work with a database instead of the file system .. . Answer : I have worked in the past on providing an iFilter intended to provide any search indexing tool access to text contents inside an AutoCad dwg file . You can read some of my adventure here : http : blogs.msdn.com b ifilter archive 2006 12 25 chronicles-of-an-ifilter-development-inception-to-deployment.aspx .. . .. . The code you are referring to is old but still valid . However there are now more interfaces in use beside GetTextFromFile . You will need to use the stream reader read up in IPersistStream in the link I mentioned above . If I understand what you want to do you ll need to open the file as a stream from the database and present this stream to the search indexer or the iFilter of your choice . Good luck Marco Comment : This seems to be the right track but I haven t been able to find any working examples nor get anything working myself . I also read that the Adobe PDF IFilter works only with files and not with a stream - not sure if this is true - but am wondering if this is actually going to be possible . Comment : Wasn t there a 2005 sample code on codeplex Anyhow the lack of live samples was a great frustration for me in my project . Look at the Microsoft definition for the stream interface and go from there . There is a buffer memory and a flag that signalls you need to repeat the call to get another fill for the buffer . For PDF ifilter you may need to look at a different supplier as previously adobe has not been the first to supply e.g . the 64 bit version . Try the Foxit site : ifilter.org links pdf.htm http : www.ifilter.org links pdf.htm", "Question : null .. . Answer : OS : Win 8.1 x86 .. . .. . I am trying to develop an IFilter for a proprietary file-format . The IPersistStream interface is implemented in the filter although there is no tool to test this interface.. . . The DLL goes through all the tests in the IFilter test suite ifilttst filtdump filtreg ifilttst emitted property values are correct it is installed in c : windows system32 but it is not properly run by SearchFilterHost.exe used by Windows indexing services . Nothing is indexed . I used Process Monitor procmon.exe to look at when SearchFilterHost is using the IFilter . During re-indexing of the disk or when a file name handled by the IFilter is changed SearchFilterHost loads the image of the IFilter but then nothing else happens . Dependency Walker found DLLs that were missing some are found in the c : windows system32 IEHIMS.DLL API-MS-WIN-CORExxx.DLL etc.. . but I doubt I could be wrong it would make much of a difference because the ifilttst is running fine . I am at my wit s end . Could someone help Thanks Comment : is your filter 32-bit or 64 bit What about your OS Comment : Your best bet is to add logging to each of your method and also to QueryInterface so that you know which interfaces are being requested and whether you can supply those and which methods are invoked with what parameters and whether your code handles this properly . Comment : Did you ever find a solution If so please post it as an answer .", "Question : The supplied MS IFilter for html files nlhtml.dll file version 2008.0.9600.17415 sometimes fails to extract text outside tags and returns tag content but works OK on some html files . IFilter is called from C text extractor at https : github.com Sicos1977 IFilterTextReader . Parameters for the IFilter are .. . .. . Text extracted for Indexed Search seems OK though and I imagine this would be using the same IFilter . How can I use nlhtml.dll to extract only the text outside the tags as MS seem to be able to do for creating the Search Index Start of file where extraction works OK is shown below : .. . .. . and the start of a file where extraction includes tag content starts with .. . .. . Extracted text from this file includes tag content and begins with .. . Answer : The extraction of tag content from some html files was prevented removing Apply Index Attributes from the IFilter flags as shown below :", "Question : I am unable to index contents of LibreOffice files . Files such as .odt files cannot be indexed on Windows Search . The error says Registered IFilter is not found .. . .. . Any help please .. . Answer : IFilters are used to convert file formats into text for searching . The trouble is that they need to be the same bitness as the app that wants to load them . So if you have a 64-bit app that wants to use the IFilters you need 64-bit IFilters installed . Have you installed 64-bit Libre Office Comment : Libre Office only has a 32-bit version that is compatible with 64-bit operating systems .", "Question : I am indexing PDF file in an application using PDF IFilter 6.0 and I am getting the following exception : .. . .. . I am using Win 7 32-bit machine . Does PDF IFilter works on Win 7 My application is multi threaded does Ifilter works with multi-threading I also tried using STAThread but got the same exception . Also tried putting lock while instantiating the Reader but no lock . .. . Answer : You cannot multithread the Adobe IFilter it is designed for Single Thread appartement . Use IFilter Explorer to know which IFilter is STA : http : www.citeknet.com Products IFilters IFilterExplorer tabid 62 Default.aspx .. . .. . The solution you can use if you wanna keep your app multithreaded for other filters is to spin a thread that you dedicate to STA IFilters and keep it around for the lifetime of the application . You then always process your documents that need STA in that same thread .", "Question : I ve implemented an IFilter as a native VC++ ATL in-proc COM server . Windows Search wouldn t use it - it creates an instance of my IFilter and then executes a bunch of QueryInterface calls specifically : .. . .. . IMarshal .. . IStdMarshalInfo .. . something with 4C1E39E1-E3E3-4296-AA86-EC938D896E92 interface id .. . .. . and a couple of others . Since my IFilter only implements IFilter IPersist and IPersistFile most of the calls return E NOINTERFACE so Windows Search just releases my object and does nothing . Why is it querying for those interfaces and how do I work the problem around .. . Answer : Have you tried aggregating the free threaded marshaller CoCreateFreeThreadedMarshaller http : msdn.microsoft.com en-us library ms694500 28VS.85 29.aspx in your component That may be enough to get your component working with windows search .", "Question : I am getting the following error when I am trying to plug Sitecore 7.5 and Adobe Ifilter 11 64bit apparently Ifilter 9 is working with sitecore 7x but Adobe removed the link-to download it.. . that s the error that I am getting... . I have added the Ifilter path to the environment-variables I have been playing with security but I am always getting the same error guess that I am missing some registry permissions.. . I am just curious to know how other people solved the problem using Ifilter and the new Sitecore computed fields and sitecore reccomendation to index PDF content... . .. . .. . this is my error : .. . .. . ManagedPoolThread 4 17 : 17 : 35 ERROR Could not compute value for ComputedIndexField : content for indexable : sitecore : master 7E5F66DF-2A4E-448F-B8DF-656BE6D4DA19 lang en ver 1 Exception : System.Runtime.InteropServices.COMException Message : Error HRESULT E FAIL has been returned from a call to a COM component . Source : Sitecore.ContentSearch at Sitecore.ContentSearch.Extracters.IFilterTextExtraction.IClassFactory.CreateInstance Object pUnkOuter Guid refiid Object ppunk at Sitecore.ContentSearch.Extracters.IFilterTextExtraction.FilterLoader.LoadFilterFromDll String dllName String filterPersistClass at Sitecore.ContentSearch.Extracters.IFilterTextExtraction.FilterLoader.LoadAndInitIFilter String fileName String extension at Sitecore.ContentSearch.Extracters.IFilterTextExtraction.FilterReader..ctor String fileName at Sitecore.ContentSearch.ComputedFields.MediaItemIFilterTextExtractor.ComputeFieldValue IIndexable indexable at Sitecore.ContentSearch.ComputedFields.MediaItemContentExtractor.ComputeFieldValue IIndexable indexable at Sitecore.ContentSearch.LuceneProvider.LuceneDocumentBuilder.AddComputedIndexFields .. . Answer : Stelio .. . .. . There are a lot of people with this issue with Adobe s iFilter . The thought is it comes down the permissions required to run the iFilter . Sitecore support s official answer on this can be found in this similar SO answer - Sitecore 7 pdf indexing http : stackoverflow.com questions 17998725 sitecore-7-pdf-indexing .. . .. . However I still had issues with Adobe s iFilter after following these steps as well as steps outlined in this blog post - http : www.sitecore.net Learn Blogs Technical-Blogs Sitecore-7-Development-Team Posts 2013 06 Why-does-my-IFilter-not-work.aspx .. . .. . After troubleshooting for quite a while on this I did finally find a combination that worked but then we started having the Adobe iFilter crash on a number of PDF files . Knowing newer versions of Adobe s iFilter have even more challenges we just opted to purchase FoxIt s PDF IFilter http : www.foxitsoftware.com products ifilter which is faster and much more reliable . Have not had any issues with it up to this point . The cost can be somewhat significant if you are using Lucene and are relying on your Content Delivery servers to build their caches since you will need a license for each server . If you are using SOLR or a dedicated crawling server you should only need licenses for the server building the indexes . Comment : Matt thanks for answering most of the links point to the version 9 of the Ifilter and it says that it does not work on the following versions and I was not able to find on line Ifilter 9.. . So I guess that the only choice is to go with a custom Ifilter for Pdf indexing or build your custom one not a great option neither.. . Comment : Stelio wish I had a better answer for you . Comment : I found a DL link-to Adobe that worked for me to grab iFilter 9 . I know this question is old but others might come across it like I did . It s 64bit v9 : download.adobe.com pub adobe acrobat win 9.x http : download.adobe.com pub adobe acrobat win 9.x PDFiFilter64installer.zip", "Question : For a C web application I am wanting to index text from PDF DOC etc files stored in a database . I have been experimenting with an IFilter example on Code Project http : www.codeproject.com KB cs IFilter.aspx which works great for files from the file system but my files are stored in a MS-SQL database . Can anyone help me locate a sample to extract text from files stored in a database or have an idea on how to modify the Code Project code to work with a database instead of the file system .. . Answer : Finally after many hours I figured out how to make this work I needed to run IFilter on PDF content stored in a database and I wanted to avoid saving the data to temporary files . First I tried to use the BindIFilterFromStream http : msdn.microsoft.com en-us library ms690827 28v vs.85 29.aspx API to create an IFilter for content stored in a Stream but it seems that it doesn t work properly at least not for this scenario . So don t go that way . Instead you need to create an IFilter for a file extension or access it some other way . Then you can access the IPersistStream http : msdn.microsoft.com en-us library windows desktop ms690091 28v vs.85 29.aspx COM interface and use it to load the PDF content into the IFilter . The rest works the same as for files . However note that the IPersistStream API may not be implemented by every IFilter . It works for the Adobe PDF IFilter though . The code should look like this I removed some return code checking to make the code more readable however you should check all possible return codes . Text extraction from the filter looks like this in my code . There are many examples of this on the web and it can be implemented in many ways depending on what you need . And here are the definitions of native methods and the structures used by them . Comment : Wow that s what I call a detailed answer", "Question : I m using IPersistFile in C to load a file before reading it as an IFilter : .. . .. . This works fine . However I would like to load the file contents from memory instead of a disk path . Is that possible The IPersistFile interface does not show any other way than providing a path string so it seems neither a memory mapped file nor a byte array can be used . .. . Answer : As a preleminary answer sketch : My research indicates http : msdn.microsoft.com en-us library aa965717 28v vs.85 29.aspx that it might be possible to cast to IPersistStream http : msdn.microsoft.com en-us library ms690091 28v vs.85 29.aspx instead of IPersistFile which allows loading from an IStream and thus from a memory target . Comment : Yes all sane IFilter implementation should implement IPersistStream and you can just try to query IPersistStream and use it . Comment : @sharptooth Thanks I see . So an IFilter should implement as many IPersistX interfaces as possible to be usable in all situations . Comment : Well not really the minimum seems to be IFilter IPersistFile and IPersistStream . Comment : Be aware some iFilters ONLY support one of the IPersist interfaces . Windows Search uses the IPersistStream interface on iFilters but does not use IPersistFile . And ifilttst uses IPersistFile . Some manufacturers only implement one to limit their usability on purpose .", "Question : I ve implemented an IFilter as a native VC++ ATL in-proc COM server . Windows Search wouldn t use it - it creates an instance of my IFilter and then executes a bunch of QueryInterface calls specifically : .. . .. . IMarshal .. . IStdMarshalInfo .. . something with 4C1E39E1-E3E3-4296-AA86-EC938D896E92 interface id .. . .. . and a couple of others . Since my IFilter only implements IFilter IPersist and IPersistFile most of the calls return E NOINTERFACE so Windows Search just releases my object and does nothing . Why is it querying for those interfaces and how do I work the problem around .. . Answer : Does this shed any light for you COM proxy stub dll and why do you need it http : blogs.msdn.com eldar archive 2006 02 28 540981.aspx . The IID you mention is one of the IIDs mentioned in the article .", "Question : I ve implemented an IFilter as a native VC++ ATL in-proc COM server . Windows Search wouldn t use it - it creates an instance of my IFilter and then executes a bunch of QueryInterface calls specifically : .. . .. . IMarshal .. . IStdMarshalInfo .. . something with 4C1E39E1-E3E3-4296-AA86-EC938D896E92 interface id .. . .. . and a couple of others . Since my IFilter only implements IFilter IPersist and IPersistFile most of the calls return E NOINTERFACE so Windows Search just releases my object and does nothing . Why is it querying for those interfaces and how do I work the problem around .. . Answer : Windows tries check if your interface supports custom marshaling the only way he can do that is using QueryInterface .. . to those well known interfaces well semi well known . The COM layer expects that some interfaces will return E NOINTERFACE and knows how to deal with it . Comment : But why would it do so No other IFilter consumers tried this . Comment : @sharptooth that s how its implemented I don t believe that your problem is with not implementing those interfaces .", "Question : I have a problem whereby the Adobe PDF iFilter doesn t work consistently for us . As such we like to use the one from Foxit http : www.foxitsoftware.com pdf ifilter . The problem is if we install the Foxit iFilter and then later the client decides to reinstall Adobe Reader it may overwrite the Foxit iFilter . We can use tools such as IFilter Explorer http : www.citeknet.com Products IFilters IFilterExplorer tabid 62 Default.aspx to view this but I d like a way to do this in the application and warn the user client that the iFilter has changed . Is there a way to check iFilters from code C Or other potential solutions to this problem Comment : I d be interested in an answer to this too Comment : Sooooo . . did you ever figure out how to check if a iFilter exists from code Comment : @KP - No I didn t . Gave up and instead of doing it in code have left it up to the user and documentation to handle not a real solution but the best we can do for now . .. . Answer : A little strange answer but as alternative way can be used external console app Filtreg.exe http : msdn.microsoft.com en-us library ms692537 v vs.85 .aspx from Windows 7 SDK http : blogs.msdn.com b windowssdk archive 2009 07 14 new-tools-in-windows-sdk-for-windows-7.aspx to delegate this job to it ." ] }
[ "yes-answer-long", "yes-answer-short" ]
desktop
UNK_RELATION
sqlanydb@sql@64
sqlanydb -- a package which provides a python interface to the @placeholder anywhere database server .
{ "confidence": [ 30.683216094970703, 27.705150604248047, 19.38025665283203, 18.84597396850586, 18.092748641967773, 17.66139793395996, 16.569557189941406, 16.21062469482422, 15.077080726623535, 15.077080726623535, 15.077080726623535, 15.077080726623535, 15.077080726623535, 13.553889274597168, 13.553889274597168, 13.553889274597168, 13.553889274597168, 13.553889274597168, 13.553889274597168, 13.553889274597168 ], "content": [ "The issue seems to don t happen by moving import sqlanydb into child -methode .", "You need to hack the sqlanydb source to print out the actual error being seen .", "this is the full server script hastebin.com onohuyeqel.js http : hastebin.com onohuyeqel.js", "http : dcx.sybase.com 1101 en dbprogramming en11 python-writing-open.html", "Hello i have made a chat app in nodejs and it works fine on my machine but when i try it on my vps it always stops running when it try s to connect to the database this is the error-log i get", "well the think is the server works fine on my pc and it runs on the vps but when a user try s to send a message it crashes so i suppose it has to do with the insert part", "Based on an example for forking I build up this little script : .. . .. . The intention is to do the database action inside a seperate process big goal later is to run a huge number of queries at the same time .", "Whatever the problem is is being masked by a generic OperationalError which is not giving enough information to fix the problem .", "That s really not much information to go on .", "That s great but what s the minimal non-functional example", "You re going to have to do some diagnostics here .", "Creating a minimal example would be step 1 in my opinion .", "There is no obvious answer here .", "But when running the script I m getting : .. . .. . What did I might miss", "Since Sybase IQ is based on Sybase ASA are you sure that you re using the proper keys for the credentials", "This albeit old documentation looks like it wants DSN and DSF instead of ENG and DBN .", "In single mode aka without the forking it s working like that .", "Line 510 is where you need to add a couple print s to figure out what is not going on .", "Don t see much there where to dock in .", "So it would look something like :" ] }
{ "confidence": [ 34.889549255371094, 34.69526290893555, 20.296977996826172, 19.810009002685547 ], "content": [ "Question : Based on an example for forking I build up this little script : .. . .. . The intention is to do the database action inside a seperate process big goal later is to run a huge number of queries at the same time . But when running the script I m getting : .. . .. . What did I might miss .. . Answer : The issue seems to don t happen by moving import sqlanydb into child -methode . So it would look something like :", "Question : Based on an example for forking I build up this little script : .. . .. . The intention is to do the database action inside a seperate process big goal later is to run a huge number of queries at the same time . But when running the script I m getting : .. . .. . What did I might miss .. . Answer : You need to hack the sqlanydb source to print out the actual error being seen . Whatever the problem is is being masked by a generic OperationalError which is not giving enough information to fix the problem . Line 510 is where you need to add a couple print s to figure out what is not going on . Comment : Don t see much there where to dock in .", "Question : null .. . Answer : Hello i have made a chat app in nodejs and it works fine on my machine but when i try it on my vps it always stops running when it try s to connect to the database this is the error-log i get Comment : That s really not much information to go on . Comment : this is the full server script hastebin.com onohuyeqel.js http : hastebin.com onohuyeqel.js Comment : That s great but what s the minimal non-functional example Comment : well the think is the server works fine on my pc and it runs on the vps but when a user try s to send a message it crashes so i suppose it has to do with the insert part Comment : You re going to have to do some diagnostics here . Creating a minimal example would be step 1 in my opinion . There is no obvious answer here .", "Question : Based on an example for forking I build up this little script : .. . .. . The intention is to do the database action inside a seperate process big goal later is to run a huge number of queries at the same time . But when running the script I m getting : .. . .. . What did I might miss .. . Answer : Since Sybase IQ is based on Sybase ASA are you sure that you re using the proper keys for the credentials This albeit old documentation looks like it wants DSN and DSF instead of ENG and DBN . http : dcx.sybase.com 1101 en dbprogramming en11 python-writing-open.html Comment : In single mode aka without the forking it s working like that ." ] }
[ "yes-answer-long", "yes-answer-short" ]
sql
UNK_RELATION
anonymous-struct@struct@169
anonymous-struct -- in iso c11 and some extensions of iso c++ an anonymous-struct is a data member of struct type whose members are treated as members of the enclosing @placeholder or union .
{ "confidence": [ 77.51961517333984, 75.71541595458984, 72.20279693603516, 67.89786529541016, 67.54126739501953, 61.78586959838867, 61.77816390991211, 61.77816390991211, 60.839012145996094, 59.21912384033203, 58.32270812988281, 57.85974884033203, 56.427608489990234, 55.479469299316406, 55.10618591308594, 54.81986618041992, 54.7836799621582, 54.63836669921875, 53.593650817871094, 53.37712097167969, 53.01777648925781, 51.8867301940918, 51.8867301940918, 50.801963806152344, 50.64783477783203, 50.64783477783203, 50.34586715698242, 50.190616607666016, 48.901954650878906, 48.86804962158203, 48.798133850097656, 48.09207534790039, 47.830589294433594, 47.496097564697266, 47.20602035522461, 47.11516189575195, 47.05036544799805, 44.996551513671875, 43.93364334106445, 43.28036880493164, 43.11100387573242, 42.35986328125, 42.12327194213867, 41.89255905151367, 41.67776870727539, 41.54914855957031, 40.51822280883789, 40.48323440551758, 40.46202087402344, 40.2298469543457, 39.69327926635742, 39.61228942871094, 39.61228942871094, 38.50086212158203, 38.1273078918457, 37.392356872558594, 36.825164794921875, 36.80270004272461, 36.80270004272461, 36.51268768310547, 36.49636459350586, 36.471046447753906, 36.24668884277344, 35.695228576660156, 35.2355842590332, 34.725582122802734, 33.91543960571289, 33.81390380859375, 33.499515533447266, 33.499515533447266, 33.30984115600586, 32.928035736083984, 32.87101364135742, 32.75350570678711, 32.66596984863281, 32.03042984008789, 32.03042984008789, 31.964820861816406, 31.44305419921875, 31.44305419921875, 31.44305419921875, 31.341041564941406, 30.566017150878906, 30.067367553710938, 29.877666473388672, 29.821285247802734, 29.66326904296875, 29.442890167236328, 29.433895111083984, 28.715042114257812, 28.605411529541016, 28.58238983154297, 28.58238983154297, 27.777236938476562, 27.55135726928711 ], "content": [ "Is there any possible and well-defined way to perform such a suitable cast in C11 if the first member of the struct in question is an anonymous-struct union", "Its possible to declare anonymous-struct and union .", "The members of an anonymous structure or union are considered to be members of the containing structure or union .", "C11 section 6.7.2.1 para 13 : .. . .. . An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure an unnamed member whose type specifier is a union specifier with no tag is called an anonymous union .", "For struct in the above read struct or union .", "By the way I ve also tried to change private into protected and struct into union : it looks like the compiler refuses to honor access modifiers on anonymous structs and unions that are nested inside another anonymous-struct or union .", "You can t have an anonymous-struct member of a previously defined type .", "You can t have an anonymous-struct member of a previously defined type .", "Consider the anonymous-struct used in the cast inside the print function and the anonymous-struct that is the first member of the struct container that winds up in main.c .", "I was looking into the C11 draft and it says .. . .. . An unnamed member of structure type with no tag is called an anonymous structure an unnamed member of union type with no tag is called an anonymous union .", ".. . .. . NOTE : .. . .. . Regarding anonymous structure quoting C11 chapter 6.7.2.1 emphasis mine .. . .. . An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure an unnamed member whose type specifier is a union specifier with no tag is called an anonymous union .", "So what is the easiest way to set the name for anonymous-struct union class for a Problem example and generally for all possible examples", "You re not permitted to have a bare .. . .. . in the middle of a struct definition any more than you can have a bare .. . .. . C11 added the ability to define a nested anonymous-struct within another struct but only by defining a new anonymous-struct type at that point .", "I don t think this is what an anonymous-struct is .", "As far as I know the equivalent for anonymous namespace is : .. . .. . Such code : .. . .. . is equivalent to : .. . .. . link : Anonymous Namespace Ambiguity http : stackoverflow.com questions 3673353 anonymous-namespace-ambiguity .. . .. . In such easy cases It is pretty enough to set just the unique name for struct union class : .. . .. . 1 Such code : .. . .. . is equivalent to .. . .. . 2 Such code : .. . .. . is equivalent to : .. . .. . But what should I do in such case I have no idea : .. . .. . As we can see it is possible to access the member of the anonymous-struct in the same way as this anonymous-struct is an anonymous namespace .", "In case of a struct definition with a tag that structure is not an anonymous structure and the member of the structure needs a structure variable of that type to be accessed .", "Adding a bit regarding the error message you re seeing .. . .. . struct s has no member named c .. . .. . because in case of an anonymous structure the members are considered a direct member of the containing structure .", "C++ does not allow anonymous classes with the keyword class or struct there are only anonymous unions .", "If some variants require more than one member you can nest anonymous structures within the anonymous union .", "It says An unnamed member of structure type with no tag is called an anonymous structure an unnamed member of union type with no tag is called an anonymous union and goes on to define its semantics .", "That s the type tag of the struct or union as in struct foo .. . f - here foo is the tag .", "A union with a struct of bit-fields only works for power-of-two moduli .", "I can name it - for example struct nibbles and make it a field of a union .", "This applies recursively if the containing structure or union is also anonymous .", "This is my attempt : .. . .. . This works but I get a warning due to the anonymous unnamed struct .", "So the question comes down to Why is AToW not an anonymous-struct", "I guess that casting to a non-anonymous struct with the same member sequence as the anonymous-struct would make this not well-defined as they are not compatible and therefore not guaranteed to have the same memory layout .", "struct s members have a distinct scope so how would the members be addressed without an identifier", "You could declare a struct without a type name but with an identifier with struct identifier .", "Or to perform the vice versa backward cast if the containing struct is anonymous", "I know these warnings occur I just wanted to know how to access all struct members or why no compiler error occurs when defining the struct .", "You seem to know facts so you might want to double-check it : stackoverflow.com tags anonymous-struct info https : stackoverflow.com tags anonymous-struct info .", "It works correctly if you put private : in the first anonymous-struct and then nest however many anonymous structs beneath it .", "See this answer http : stackoverflow.com a 23527380 417501 for more details on anonymous members in C11 .", "C11 provides anonymous structures .", "Considering the following definition : .. . .. . You re declaring the variable point of anonymous-struct type is there any way to declare another variable of the same type outside the struct definition maybe in main function", "An example is : .. . .. . The inner structure containing members b and c is an unnamed member of struct outer .", "I use the following union to simplify byte nibble and bit operations : .. . .. . It works nice but it also generates this warning : .. . .. . warning : ISO C++ prohibits anonymous structs -pedantic .. . .. . Ok nice to know .", "The members of this unnamed member b and c are considered to be members of the containing structure .", "A struct without an identifier", "int is not because int is not a struct type that s easy .", "It uses the anonymous-struct in its signature.. . shouldn t that lead to the same name-mangling problems", "In your code .. . .. . there is no member variable of type struct i neither it qualifies for anonymous structure Note .", "It contains two declarations of the struct struct int a char b one in the struct container and the other in the function print .", "If you create a variable of that type you ll be able to access the member variable c similar to what you ve done for struct i3 with intern3 variable .", "Anonymous structs and unions are now allowed as of C11 .", "From the gcc docs https : gcc.gnu.org onlinedocs gcc Unnamed-Fields.html : .. . .. . As permitted by ISO C11 and for compatibility with other compilers GCC allows you to define a structure or union that contains as fields structures and unions without names .", "For example : .. . .. . In this example you are able to access members of the unnamed union with code like foo.b .", "I m trying to define a 4-d matrix type in C for use in the iOS ObjC environment that is encapsulated so not a bare array and that can be accessed using indexed values or via named struct members .", "Why not simply name your struct", "In your example AToW is a typedef for a struct type that you defined previously .", "Am I accessing the struct parameters in the correct way", "And you are not creating any variable for struct i .", "I tried it like this : .. . .. . Apart from the access mystruct.c everything compiles compile error message is struct s has no member named c .", "But it isn t possible to define struct in a similar way .", "@ecatmur C++11 does not support anonymous structs : stackoverflow.com questions 8622459 http : stackoverflow.com questions 8622459 why-does-c11-not-support-anonymous-structs-while-c11-does", "Quoting the N1570 draft http : www.open-std.org jtc1 sc22 wg14 www docs n1570.pdf which is very close to the released 2011 ISO C standard section 6.7.2.1 paragraph 13 : .. . .. . An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure an unnamed member whose type specifier is a union specifier with no tag is called an anonymous union .", "For example : .. . .. . It isn t also possible to define a namespace within struct so it isn t possible to just replace struct on namespace keyword for this example .", "typedef struct int a void func s1 can be better replaced by struct s1 int a void func - no additional unique identifier needed .", "The whole typedef struct def Blah construct is in fact a C remnant and not necessary in C++ .", "The ISO C11 added this feature and GCC allows it as an extension https : gcc.gnu.org onlinedocs gcc-4.4.5 gcc Unnamed-Fields.html .", "You can t get at your mystruct.c because the containing struct for c has the tag i .", "A trick to get almost this feature in ANSI C is to use an appropriate macro : .. . .. . Then you can simply do .. . .. . In C11 though anonymous structures are supported and you can simply do .. . .. . but sadly not .. . .. . As the anonymous structure has to be declared inside the structure it is anonymous to .", "I really don t get what you are trying to achieve if you want to improve the code stop making anonymous structs namespace 1 off instances typedef struct notation and so on .", "In particular it can be used to define something similar to a Pascal or Ada variant record : .. . .. . This lets you refer to i d and p directly as members of a struct variant object rather than creating an artificial name for the variant portion .", "Same applies for union .", "Getting the following error when doing the anonymous-struct below : .. . .. . error : missing braces around initializer -Werror missing-braces .. . .. . If I swap message out for a static string like lalala that works fine .", "I don t see the difference of that to my case apart from the fact that you use a struct specifier as the type and I used an ordinary identifier as the type .", "Yes but the question was about the struct container that winds up in main.c .", "Of course it is compatible with the struct container declared in sep.c but wouldn t this make it a separate concern", "@Mints97 No type struct container in main is compatible with the one in sep and that is what you pass .", "But if we replace typedef struct I to typedef int I there is no error will be caused too .", "In C++ it is actually possible to reuse anonymous-types thanks to decltype .", "However the C standard states : .. . .. . Moreover two structure union or enumerated-types declared in separate translation units are compatible if their tags and members satisfy the following requirements : If one is declared with a tag the other shall be declared with the same tag .", "I noticed that there are a few ways to define structs inside other structs in C : .. . .. . This struct compiles fine using gcc or g++ so I assume all parameters are accessible in some way .", "No a named namespace is not the same as an anonymous namespace .", "Therefore don t rename anonymous namespaces .", "Is there a possibility to write something like this union without this issue", "I obviously don t want to name that container struct as it only serves to hold the four inner structs .", "To your actual problem example : The inner struct has not much effect except perhaps introducing padding bytes .", "A structure specifier consists of the keyword struct followed by an optional identifier the tag omitted in this case followed by a sequence of declarations enclosed in and .", "But the anonymous structs aren t .", "But my project is ok without anonymous namespaces .", "No that s not anonymous : You still have to do foo.A.x instead of the wanted foo.x .", "ok . but if i want to use a 35 can i use union and some addition and multiplication to get the result", "This is probably more useful with a contained union rather than a contained structure .", "Therefore in my interpretation the structs the one in struct container and the other in the cast in the print aren t compatible .", "The gcc compiler option -fms-extensions http : gcc.gnu.org onlinedocs gcc-3.4.4 gcc C-Dialect-Options.html will allow non-standard anonymous structs without warning .", "If both are completed anywhere within their respective translation units then the following additional requirements apply : there shall be a one-to-one correspondence between their members .. . .. . .. . Can we try to apply this rule to anonymous structs", "Are you restricted to ANSI C or could you also use C99 or C11", "Or Byte.nibble.n0 or Byte.nibble . 0 or Byte.nibble . 0 or get 0 Byte.nibble or because you can DRY and drop the repeated nibble inside the struct named nibble when accessing it and maybe gussy it up in some trade dress .", "I am using anonymous structs in unions to get a b quickly .", "Anonymous namespaces have a purpose so do unnamed structs classes and unions .", "The ctors and conversion operator can t be declared because their signature would contain an anonymous type .", "I want to know if it is possible to declare anonymous structs in ANSI C . The code I have is : .. . .. . When I compile it I get : warning : declaration does not declare anything .. . .. . I have read that the flag -fms-extensions does the trick it however only works on windows systems as it produces : warning : anonymous structs are a Microsoft extension -Wmicrosoft .. . .. . Is there any ANSI equivalent extension that I can use" ] }
{ "confidence": [ 127.02091217041016, 121.32332611083984, 119.94988250732422, 96.33460998535156, 96.0919418334961, 92.02203369140625, 86.00249481201172, 82.50799560546875, 76.6349868774414, 67.92091369628906, 67.71992492675781, 63.85538864135742, 62.75191116333008, 62.05410385131836, 60.60750961303711, 58.397178649902344, 57.76100158691406, 57.649173736572266, 54.789459228515625, 54.507041931152344 ], "content": [ "Question : I want to know if it is possible to declare anonymous structs in ANSI C . The code I have is : .. . .. . When I compile it I get : warning : declaration does not declare anything .. . .. . I have read that the flag -fms-extensions does the trick it however only works on windows systems as it produces : warning : anonymous structs are a Microsoft extension -Wmicrosoft .. . .. . Is there any ANSI equivalent extension that I can use Comment : A struct without an identifier No I do not think so . You could declare a struct without a type name but with an identifier with struct identifier . struct s members have a distinct scope so how would the members be addressed without an identifier Comment : ANSI C does not have this feature . Are you restricted to ANSI C or could you also use C99 or C11 Comment : I can use C99 and C11 is there any solution for those Comment : @KlasSegeljakt Yes . C11 provides anonymous structures . Let me amend my answer . .. . Answer : Its possible to declare anonymous-struct and union . The ISO C11 added this feature and GCC allows it as an extension https : gcc.gnu.org onlinedocs gcc-4.4.5 gcc Unnamed-Fields.html . C11 section 6.7.2.1 para 13 : .. . .. . An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure an unnamed member whose type specifier is a union specifier with no tag is called an anonymous union . The members of an anonymous structure or union are considered to be members of the containing structure or union . This applies recursively if the containing structure or union is also anonymous . .. . 19 The following illustrates anonymous structures and unions : .. . .. . Now b can be accessed by just using foo.b . Comment : You should clarify that this is new in C11 as OP is talking about ANSI C . And also thanks for replicating the content of my answer in a condensed form . Comment : @FUZxxl It may seem to you that the content was taken from your answer but it is not . I took that example from here https : gcc.gnu.org onlinedocs gcc Unnamed-Fields.html and changed that slightly . BTW changed the whole content now . Comment : I don t say that you took my answer . I say that your answer is redundant as it says the same things somewhat condensed I say in my answer . But whatever I shouldn t care .", "Question : I was looking into the C11 draft and it says .. . .. . An unnamed member of structure type with no tag is called an anonymous structure an unnamed member of union type with no tag is called an anonymous union . The members of an anonymous structure or union are considered to be members of the containing structure or union . So I constructed the following testcase .. . .. . Clang and GCC both complain about the unnamed member saying that the declaration has both effect . Did I do something wrong or do they simply not support that feature yet Comment : I don t think this is what an anonymous-struct is . Note the word tag . That s the type tag of the struct or union as in struct foo .. . f - here foo is the tag . Comment : @user3477950 yes AToW has no tag . .. . Answer : No that s not an unnamed member . An example is : .. . .. . The inner structure containing members b and c is an unnamed member of struct outer . The members of this unnamed member b and c are considered to be members of the containing structure . This is probably more useful with a contained union rather than a contained structure . In particular it can be used to define something similar to a Pascal or Ada variant record : .. . .. . This lets you refer to i d and p directly as members of a struct variant object rather than creating an artificial name for the variant portion . If some variants require more than one member you can nest anonymous structures within the anonymous union . It differs from Pascal and Ada in that there s no mechanism to enforce which variant is active given the value of the type member that s C for you . In your example AToW is a typedef for a struct type that you defined previously . You re not permitted to have a bare .. . .. . in the middle of a struct definition any more than you can have a bare .. . .. . C11 added the ability to define a nested anonymous-struct within another struct but only by defining a new anonymous-struct type at that point . You can t have an anonymous-struct member of a previously defined type . The language could have been defined to permit it and the semantics would I think be reasonably straightforward -- but there wasn t much point in defining two different ways to do the same thing . For struct in the above read struct or union . Quoting the N1570 draft http : www.open-std.org jtc1 sc22 wg14 www docs n1570.pdf which is very close to the released 2011 ISO C standard section 6.7.2.1 paragraph 13 : .. . .. . An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure an unnamed member whose type specifier is a union specifier with no tag is called an anonymous union . The members of an anonymous structure or union are considered to be members of the containing structure or union . This applies recursively if the containing structure or union is also anonymous . A structure specifier consists of the keyword struct followed by an optional identifier the tag omitted in this case followed by a sequence of declarations enclosed in and . In your case AToW is a type name not a structure specifier so it can t be used to define an anonymous structure . Comment : I don t see the difference of that to my case apart from the fact that you use a struct specifier as the type and I used an ordinary identifier as the type . Why is my AToW not an unnamed member If I would change it to AToW x it would become a named member . Comment : @JohannesSchaub-litb : See the updated last paragraph of my answer . TL DR : Because the standard says so . Comment : You re not permitted to have a bare AToW in the middle of a struct definition any more than you can have a bare int - does the quote I gave not permit it It says An unnamed member of structure type with no tag is called an anonymous structure an unnamed member of union type with no tag is called an anonymous union and goes on to define its semantics . So the question comes down to Why is AToW not an anonymous-struct and I don t see it yet . int is not because int is not a struct type that s easy . Comment : You can t have an anonymous-struct member of a previously defined type . I would be very interested in a quote of the spec that says this . That would indeed answer my question . Comment : I just created a new tag-wiki for this . You seem to know facts so you might want to double-check it : stackoverflow.com tags anonymous-struct info https : stackoverflow.com tags anonymous-struct info . Unfortunately the tag wiki does not answer my question though :", "Question : I noticed that there are a few ways to define structs inside other structs in C : .. . .. . This struct compiles fine using gcc or g++ so I assume all parameters are accessible in some way . I tried it like this : .. . .. . Apart from the access mystruct.c everything compiles compile error message is struct s has no member named c . Am I accessing the struct parameters in the correct way Are there alternatives How do I access the c parameter Comment : just successful compilation is not suffice . Please go through warnings also to check possible error . Comment : gcc -Wall - warning : declaration does not declare anything Comment : I know these warnings occur I just wanted to know how to access all struct members or why no compiler error occurs when defining the struct . .. . Answer : In your code .. . .. . there is no member variable of type struct i neither it qualifies for anonymous structure Note . If you create a variable of that type you ll be able to access the member variable c similar to what you ve done for struct i3 with intern3 variable . Adding a bit regarding the error message you re seeing .. . .. . struct s has no member named c .. . .. . because in case of an anonymous structure the members are considered a direct member of the containing structure . In case of a struct definition with a tag that structure is not an anonymous structure and the member of the structure needs a structure variable of that type to be accessed . .. . .. . NOTE : .. . .. . Regarding anonymous structure quoting C11 chapter 6.7.2.1 emphasis mine .. . .. . An unnamed member whose type specifier is a structure specifier with no tag is called an anonymous structure an unnamed member whose type specifier is a union specifier with no tag is called an anonymous union . The members of an anonymous structure or union are considered to be members of the containing structure or union . This applies recursively if the containing structure or union is also anonymous . Comment : Yes the reason behind downvote anybody :", "Question : I noticed that there are a few ways to define structs inside other structs in C : .. . .. . This struct compiles fine using gcc or g++ so I assume all parameters are accessible in some way . I tried it like this : .. . .. . Apart from the access mystruct.c everything compiles compile error message is struct s has no member named c . Am I accessing the struct parameters in the correct way Are there alternatives How do I access the c parameter Comment : just successful compilation is not suffice . Please go through warnings also to check possible error . Comment : gcc -Wall - warning : declaration does not declare anything Comment : I know these warnings occur I just wanted to know how to access all struct members or why no compiler error occurs when defining the struct . .. . Answer : From the gcc docs https : gcc.gnu.org onlinedocs gcc Unnamed-Fields.html : .. . .. . As permitted by ISO C11 and for compatibility with other compilers GCC allows you to define a structure or union that contains as fields structures and unions without names . For example : .. . .. . In this example you are able to access members of the unnamed union with code like foo.b . You were able to get at mystruct.a because the structure had no tag . You can t get at your mystruct.c because the containing struct for c has the tag i . Change : .. . .. . to .. . .. . and you should be able to get at mystruct.c . Comment : It s naively supported in C11 check my answer . Comment : He said gcc and wanted to know why it didn t compile . It won t help get you through a compile if C11 allows it but your compiler won t . Comment : First of all the compilation error is a coding error not dependent on compiler standard . Secondly compiler supports extensions are important when the expression is not naively supported by a standard . Comment : also My read is that you shouldn t have been able to get at your mystruct.a . ..is not clear too .", "Question : I want to know if it is possible to declare anonymous structs in ANSI C . The code I have is : .. . .. . When I compile it I get : warning : declaration does not declare anything .. . .. . I have read that the flag -fms-extensions does the trick it however only works on windows systems as it produces : warning : anonymous structs are a Microsoft extension -Wmicrosoft .. . .. . Is there any ANSI equivalent extension that I can use Comment : A struct without an identifier No I do not think so . You could declare a struct without a type name but with an identifier with struct identifier . struct s members have a distinct scope so how would the members be addressed without an identifier Comment : ANSI C does not have this feature . Are you restricted to ANSI C or could you also use C99 or C11 Comment : I can use C99 and C11 is there any solution for those Comment : @KlasSegeljakt Yes . C11 provides anonymous structures . Let me amend my answer . .. . Answer : A trick to get almost this feature in ANSI C is to use an appropriate macro : .. . .. . Then you can simply do .. . .. . In C11 though anonymous structures are supported and you can simply do .. . .. . but sadly not .. . .. . As the anonymous structure has to be declared inside the structure it is anonymous to . See this answer http : stackoverflow.com a 23527380 417501 for more details on anonymous members in C11 .", "Question : I want to know if it is possible to declare anonymous structs in ANSI C . The code I have is : .. . .. . When I compile it I get : warning : declaration does not declare anything .. . .. . I have read that the flag -fms-extensions does the trick it however only works on windows systems as it produces : warning : anonymous structs are a Microsoft extension -Wmicrosoft .. . .. . Is there any ANSI equivalent extension that I can use Comment : A struct without an identifier No I do not think so . You could declare a struct without a type name but with an identifier with struct identifier . struct s members have a distinct scope so how would the members be addressed without an identifier Comment : ANSI C does not have this feature . Are you restricted to ANSI C or could you also use C99 or C11 Comment : I can use C99 and C11 is there any solution for those Comment : @KlasSegeljakt Yes . C11 provides anonymous structures . Let me amend my answer . .. . Answer : You want something like this i suppose : .. . .. . And you could do : Comment : No that s not anonymous : You still have to do foo.A.x instead of the wanted foo.x . Comment : That s not possible in C i think.. . Comment : In C11 it s possible https : ideone.com VKkdGY .", "Question : The C standard states : .. . .. . A pointer to a structure object suitably cast points to its initial member or if that member is a bit-field then to the unit in which it resides and vice versa . Is there any possible and well-defined way to perform such a suitable cast in C11 if the first member of the struct in question is an anonymous-struct union Or to perform the vice versa backward cast if the containing struct is anonymous I guess that casting to a non-anonymous struct with the same member sequence as the anonymous-struct would make this not well-defined as they are not compatible and therefore not guaranteed to have the same memory layout . However the C standard states : .. . .. . Moreover two structure union or enumerated-types declared in separate translation units are compatible if their tags and members satisfy the following requirements : If one is declared with a tag the other shall be declared with the same tag . If both are completed anywhere within their respective translation units then the following additional requirements apply : there shall be a one-to-one correspondence between their members .. . .. . .. . Can we try to apply this rule to anonymous structs Say if we have the following setup : .. . .. . header.h : .. . .. . sep.c : .. . .. . main.c : .. . .. . this compiles on gcc GCC 4.8.3 20140911 and outputs 1 . Consider the anonymous-struct used in the cast inside the print function and the anonymous-struct that is the first member of the struct container that winds up in main.c . Could they be considered types declared in separate translation units Also do they really satisfy all the other compatibility requirements or am I misunderstanding something Comment : As a note identical structures always have the same memory layout at least for an implementation where separate source files can be compiled and linked independently even if they are incompatible because of the possibility that there is another identical structure compatible with both of them in another translation-unit . The question here is if strict aliasing is violated . Comment : @mafso : of course I am well aware of that . I am simply interested if the behaviour in this case is well-defined by the standard . Comment : As another note this isn t really about anonymous structs but about structures without a tag . So the question also applies to C99 . Comment : I referred to .. . not well-defined as they are not compatible and therefore not guaranteed to have the same memory layout . An implementation where they don t would be quite contrived . Strict-aliasing on the other hand may become an issue with real code on a real implementation . And I m also curious about the question I didn t question it . .. . Answer : What is a translation-unit : .. . .. . 5.1.1.1 Program Structure .. . .. . 1 . A C program need not all be translated at the same time . The text of the program is kept in units called source files or preprocessing files in this International Standard . A source file together with all the headers and source files included via the preprocessing directive include is known as a preprocessing translation-unit . After preprocessing a preprocessing translation-unit is called a translation-unit . .. . .. . So the c file plus the headers after preprocessing form a single translation-unit . Let s take the translation-unit which is made out of sep.c and header.h . It contains two declarations of the struct struct int a char b one in the struct container and the other in the function print . Those structs are declared in the same translation-unit . 6.2.7 Compatible type and composite type .. . .. . 1 . Two types have compatible type if their types are the same . Additional rules for determining whether two types are compatible are described in 6.7.2 for type specifiers in 6.7.3 for type qualifiers and in 6.7.6 for declarators . Moreover two structure union or enumerated-types declared in separate translation.. . .. . .. . the remaining text is referring to types declared in separate translation units . Since the structs are not declared in separate translation units they do not fall under the 6.2.7 rule . Therefore in my interpretation the structs the one in struct container and the other in the cast in the print aren t compatible . Comment : Yes but the question was about the struct container that winds up in main.c . Technically if I understand correctly it s supposed to be the real type of the object pointed to by the pointer passed to the print function . Of course it is compatible with the struct container declared in sep.c but wouldn t this make it a separate concern Comment : @Mints97 Where the pointer comes from doesn t matter . Calling the function from main doesn t change the fact that the structs are not compatible in the other translation-unit . Comment : @Mints97 No type struct container in main is compatible with the one in sep and that is what you pass . But the anonymous structs aren t . This is my interpretation . Interesting question though . Comment : thanks for your input let s wait for someone else s interpretation of the standard . You didn t convince me P Comment : @Mints97 : That s an interesting objection . The two structures in sep.h are clearly incompatible as shown in this answer although they both appear to be compatible with the structure in main.c . I always found the fact that the compatible type relation isn t transitive a little unintuitive but I ve never thought of an example like this one .", "Question : I use the following union to simplify byte nibble and bit operations : .. . .. . It works nice but it also generates this warning : .. . .. . warning : ISO C++ prohibits anonymous structs -pedantic .. . .. . Ok nice to know . But.. . how to get this warning out of my g++ output Is there a possibility to write something like this union without this issue Comment : Why not simply name your struct Comment : You won t be able to do what you re trying to do within the realms of valid C++ . It might work but it will be undefined behaviour . Comment : I can name it - for example struct nibbles and make it a field of a union . But then I will have to access it Byte.nibbles.nibble 0 . It won t be so nice to use . Comment : Or Byte.nibble.n0 or Byte.nibble . 0 or Byte.nibble . 0 or get 0 Byte.nibble or because you can DRY and drop the repeated nibble inside the struct named nibble when accessing it and maybe gussy it up in some trade dress . Comment : What @KerrekSB said . Gcc will for example invert the field order with endianness making bit 7 appear as bit 0 . You might be better off using bool bit unsigned int n const return byte 1 n .. . Answer : The gcc compiler option -fms-extensions http : gcc.gnu.org onlinedocs gcc-3.4.4 gcc C-Dialect-Options.html will allow non-standard anonymous structs without warning . It s actually enabling what it considers Microsoft extensions .. . .. . You can also achieve almost the same thing with this legal convention . With this your non-standard byte.nibble 0 becomes the legal byte.nibble . 0 Comment : You are correct about the leading underscore . Names in the global namespace that begin with an underscore are reserved to the implementation . Names starting with an underscore followed by an uppercase letter or that contain double underscores are also reserved to the implementation . - See 17.6.4.3.2 C++11 Comment : @CaptainObvlious Thanks", "Question : I perform a refactoring of my project and I want to get rid of all anonymous namespaces including classes structs unions . I want to replace them at the easiest way by their named equivalents . As far as I know the equivalent for anonymous namespace is : .. . .. . Such code : .. . .. . is equivalent to : .. . .. . link : Anonymous Namespace Ambiguity http : stackoverflow.com questions 3673353 anonymous-namespace-ambiguity .. . .. . In such easy cases It is pretty enough to set just the unique name for struct union class : .. . .. . 1 Such code : .. . .. . is equivalent to .. . .. . 2 Such code : .. . .. . is equivalent to : .. . .. . But what should I do in such case I have no idea : .. . .. . As we can see it is possible to access the member of the anonymous-struct in the same way as this anonymous-struct is an anonymous namespace . But it isn t possible to define struct in a similar way . For example : .. . .. . It isn t also possible to define a namespace within struct so it isn t possible to just replace struct on namespace keyword for this example . So what is the easiest way to set the name for anonymous-struct union class for a Problem example and generally for all possible examples Comment : Why is this a goal Anonymous namespaces have a purpose so do unnamed structs classes and unions . Having to make up non-conflicting names for things that don t need them won t help eliminate name conflicts for things that do need them . Comment : I really don t get what you are trying to achieve if you want to improve the code stop making anonymous structs namespace 1 off instances typedef struct notation and so on . Comment : give the anonymous namespace a unique name then merge the uniquely-named namespaces where there are no conflicts if desired . Comment : Pete Becker 111111 of course my question looks rediculous . But my project is ok without anonymous namespaces . They are just unnecessary . Comment : justin could you explain it more detailed . .. . Answer : 1 . No a named namespace is not the same as an anonymous namespace . The primary use of anonymous namespaces is to have all their content have internal linkage - meaning that other compilation units can not refer to it e.g . call functions . Therefore don t rename anonymous namespaces . It s like removing the static specifier from a static function . 2 . typedef struct int a void func s1 can be better replaced by struct s1 int a void func - no additional unique identifier needed . Same applies for union . The whole typedef struct def Blah construct is in fact a C remnant and not necessary in C++ . To your actual problem example : The inner struct has not much effect except perhaps introducing padding bytes . So this should be equivalent and do the job : Comment : Thnaks a lot It s just what I need : Comment : Just remeber to not blindly change code that needs not be changed . If it works as it is leave it be . If you have to work with it i.e . change it then put it under test and refactor it . But do so with thought don t just throw a name at anything unnamed that comes across your path .", "Question : The following sample code compiles just fine in Visual C++ : .. . .. . But why I d expect a compiler error because the privateData member should be inaccessible to the function main since it s supposed to be private like its container s container . I know that nameless structs are not part of official C++ but this design is asinine . By the way I ve also tried to change private into protected and struct into union : it looks like the compiler refuses to honor access modifiers on anonymous structs and unions that are nested inside another anonymous-struct or union . Can someone explain this feature Comment : This sounds like the bug that was fixed in VS2005sp1 which version are you using Keep in mind that anonymous structs are not a standard C++ feature.. . Comment : @K-ballo gcc also compiles this.. . Comment : BTW the intellisense does complain but it nevertheless compiles Comment : Clang 4.0 does not compile this with an error error : privateData is a private member of Test Comment : It works correctly if you put private : in the first anonymous-struct and then nest however many anonymous structs beneath it . The answer seems to be : it s a bug . .. . Answer : Yes it is a bug . Microsoft acknowledged it is the feedback report is here https : connect.microsoft.com VisualStudio feedback details 520784 access-to-private-fields-inside-anonymous-unions-and-structs-is-strangely-relaxed . Right now the bug is in will not fix status and it is unclear when if ever it will be addressed . There is a somewhat odd workaround for it the IntelliSense parser built into Visual Studio written by the Edison Design Group does complain about it . You get the red squiggles and the message : .. . .. . Error : member Test.privateData declared at line 10 is inaccessible Comment : Are you suggesting that there are hordes of developers displaced in time who rely on access specifiers not properly cascading through two levels of anonymous structs Comment : @LightnessRacesinOrbit My understanding is there aren t hordes but a pack that like to use microsoft s workarounds and for these people they do not fix this and similar issues . Instead they mark it with their code parser Comment : @B : It just seems to me like an incredibly narrow edge case that wouldn t be worth such considerations even when there s also arguably little benefit in fixing it.. . Comment : @LightnessRacesinOrbit Good . We agree : Comment : @LightnessRacesinOrbit like Luchian Grigore notes in a comment to the question this bug can be successfully reproduced in gcc . In my understanding this is by no means a matter of chance and compatibility requirements could likely be a good reason in support of the current design .", "Question : I m trying to define a 4-d matrix type in C for use in the iOS ObjC environment that is encapsulated so not a bare array and that can be accessed using indexed values or via named struct members . This is my attempt : .. . .. . This works but I get a warning due to the anonymous unnamed struct . I obviously don t want to name that container struct as it only serves to hold the four inner structs . This page implies that I should be able to do this http : gcc.gnu.org onlinedocs gcc Unnamed-Fields.html Unnamed-Fields .. . .. . It seems to actually work so is this wrong or if not how should I get rid of the warning I m using LLVM GCC 4.2 . Thanks for any insight or suggestions . .. . Answer : Anonymous structs and unions are now allowed as of C11 . Your worries will eventually go away as you migrate to a newer compiler . In GCC add -std c1x . Comment : Thanks Kerrek . Do you mean that adding this flag to my current build will-change the standard already Or that I ll need to use a later version of GCC to get this And also this is out of scope for this question but how likely am I to break other things in my code base by switching to C11 if you happen to know Comment : I m not sure which version of GCC started supporting this dialect you d have to check the manual . I doubt that anything would break though you d have to check the breaking changes section of the C11 standard and compare it to the standard which you are currently conforming to . Comment : Fair enough . Thanks .", "Question : Considering the following definition : .. . .. . You re declaring the variable point of anonymous-struct type is there any way to declare another variable of the same type outside the struct definition maybe in main function Comment : In C++ it is actually possible to reuse anonymous-types thanks to decltype . But that doesn t exist in C nor does any kind of type deduction for that matter . Comment : Thanks Is a little confusing when you try to learn C and C++ but right now i m focused on C standard . .. . Answer : In standard C No you can t do that . But there are compiler extensions : .. . .. . in clang and GCC for example . Editorial note : main should return int . Comment : That is just what i need to know i use standard C and i investigate previously if is anyway to do and i find that visual-c++ has an extension but is C++ from Microsoft not standard and no C . Thanks for the info .", "Question : I noticed that there are a few ways to define structs inside other structs in C : .. . .. . This struct compiles fine using gcc or g++ so I assume all parameters are accessible in some way . I tried it like this : .. . .. . Apart from the access mystruct.c everything compiles compile error message is struct s has no member named c . Am I accessing the struct parameters in the correct way Are there alternatives How do I access the c parameter Comment : just successful compilation is not suffice . Please go through warnings also to check possible error . Comment : gcc -Wall - warning : declaration does not declare anything Comment : I know these warnings occur I just wanted to know how to access all struct members or why no compiler error occurs when defining the struct . .. . Answer : Member c is declared inside inside strut i . And you are not creating any variable for struct i . So you can t access member c . When you mention mystruct.c it expects c to be a member of structure s which is not .", "Question : I noticed that there are a few ways to define structs inside other structs in C : .. . .. . This struct compiles fine using gcc or g++ so I assume all parameters are accessible in some way . I tried it like this : .. . .. . Apart from the access mystruct.c everything compiles compile error message is struct s has no member named c . Am I accessing the struct parameters in the correct way Are there alternatives How do I access the c parameter Comment : just successful compilation is not suffice . Please go through warnings also to check possible error . Comment : gcc -Wall - warning : declaration does not declare anything Comment : I know these warnings occur I just wanted to know how to access all struct members or why no compiler error occurs when defining the struct . .. . Answer : If you don t name your dog you can t call it .. . .. . That is exactly what unnamed says - it has no name so you cannot access it by name . The only reason to have unnamed members in a structure is if you are mirroring a structure given externally and you don t care about specific pieces of it so you name only the pieces you want to access .", "Question : I m wonder when the following translation-unit compiled and linked successfully : .. . .. . I expected that the typedef name redefinition error will be caused . .. . Answer : According to the C++Standard .. . .. . A name having namespace scope that has not been given internal linkage above has the same linkage as the enclosing namespace if it is the name of a named class Clause 9 or an unnamed class defined in a typedef declaration in which the class has the typedef name for linkage purposes 7.1.3 or .. . .. . And another quote from the Standard .. . .. . 10 If the typedef declaration defines an unnamed class or enum the first typedef-name declared by the declaration to be that class type or enum type is used to denote the class type or enum type for linkage purposes only 3.5 . So in your example name I has external linkage . Take into account that in your example there is an unnamed class . C++ does not allow anonymous classes with the keyword class or struct there are only anonymous unions . It would be important to append the post by one more quote from the Standard .. . .. . 6 There can be more than one definition of a class type Clause 9 .. . in a program provided that each definition appears in a different translation-unit .. . Comment : If I have been understanding you correctly the ODR does not violate because there can be more than one definition of class type in the different translation-unit . But if we replace typedef struct I to typedef int I there is no error will be caused too . Comment : @Dmitry Fucintv A class definition is a declaration . Comment : @Dmitry Fucintv A class definition does not define an object . Comment : @@Dmitry Fucintv The ODR using is defined the following way A variable x whose name appears as a potentially-evaluated expression ex is odr-used Class names are not evaluated in expressions . Comment : Do you mean that if the set potentially results is empty than ODR does not cover this case", "Question : Considering the following definition : .. . .. . You re declaring the variable point of anonymous-struct type is there any way to declare another variable of the same type outside the struct definition maybe in main function Comment : In C++ it is actually possible to reuse anonymous-types thanks to decltype . But that doesn t exist in C nor does any kind of type deduction for that matter . Comment : Thanks Is a little confusing when you try to learn C and C++ but right now i m focused on C standard . .. . Answer : No there isn t at least not in standard C . If you want to use the type you have to give it a name . Comment : I can t vote-up to you but thanks Comment : @Wronski : No worries : - Comment : I ll do it for you . +1", "Question : Considering the following definition : .. . .. . You re declaring the variable point of anonymous-struct type is there any way to declare another variable of the same type outside the struct definition maybe in main function Comment : In C++ it is actually possible to reuse anonymous-types thanks to decltype . But that doesn t exist in C nor does any kind of type deduction for that matter . Comment : Thanks Is a little confusing when you try to learn C and C++ but right now i m focused on C standard . .. . Answer : Not too sure what you re asking maybe : .. . .. . Also see http : www.cs.usfca.edu wolber SoftwareDev C CStructs.htm Comment : No the compiler gcc throws an error . Just that the question i want to know if exist any way to declare another variable of the same type as point but keep in mind that point is a variable not a type and not an alias . Comment : this void main point p Comment : Int this case the compiler throws 2 errors : 1 expected before p 2 Use of undeclarate variable p . Comment : I still don t understand what you re trying to do but if you just want it to compile : pastebin.com CRfdDj4E http : pastebin.com CRfdDj4E codepad.org uvYWG6WB http : codepad.org uvYWG6WB Comment : From the variable point data type is unknown is anyway to declare another variable of the same data type as point inside the main function", "Question : We have a big old C++ application with a lot of legacy code and a few external libraries written in C . These libraries are very rarely updated - only if we find a bug and the vendor supplies a patch . This happened last week with one library and upon integrating the new version we found out that if we don t modify the library locally which we apparently did with the last version our build breaks with this error message : .. . .. . This is due to the library declaring a number of handle types like this : .. . .. . which we use on our side in some classes function signatures : .. . .. . This produces the error above because the compiler can t create a proper name-mangled name for the function s as the Opaque struct has no name . Our current workaround for this is to patch the library header file explicitly giving the struct a name : .. . .. . This is obviously bad because we don t want to touch the library if possible . Another even worse option would be to convert the types to void in all function signatures and cast them back to their respective types . And there s the worst option to rewrite every affected function in pure C.. . So my question is : Is there any better option than patching the library Is there an easy solution I am overlooking What would be the best way to solve this Comment : Don t see what this has to do with C . Your problem is name-mangling of the C++ wrappers no Comment : This could be an excellent argument to upgrade to C++11 which doesn t have this restriction . Comment : @JensGustedt correct but I also tagged it C because the library is written in C and technically it s a C C++ interoperability problem . Comment : @ecatmur C++11 does not support anonymous structs : stackoverflow.com questions 8622459 http : stackoverflow.com questions 8622459 why-does-c11-not-support-anonymous-structs-while-c11-does Comment : Said differently I don t think that any expertise on C can help you here . So this calls for the wrong people me for example : .. . Answer : If you re willing to modify your methods on the interface you can do slightly better than void : .. . .. . Here CHandle and CRequest have linkage and so can be used in your method signatures the overloads of make and get have internal linkage and so can interface with the anonymous-types . You can put this in a header even the static functions . You ll have to modify your code so that when e.g . MyCls : : myFct calls into the library you wrap parameters with get and return values with make . Comment : Why does declaring make work in this case It uses the anonymous-struct in its signature.. . shouldn t that lead to the same name-mangling problems Comment : @l4mpi In this case it s OK because make is static and so doesn t have external linkage .", "Question : We have a big old C++ application with a lot of legacy code and a few external libraries written in C . These libraries are very rarely updated - only if we find a bug and the vendor supplies a patch . This happened last week with one library and upon integrating the new version we found out that if we don t modify the library locally which we apparently did with the last version our build breaks with this error message : .. . .. . This is due to the library declaring a number of handle types like this : .. . .. . which we use on our side in some classes function signatures : .. . .. . This produces the error above because the compiler can t create a proper name-mangled name for the function s as the Opaque struct has no name . Our current workaround for this is to patch the library header file explicitly giving the struct a name : .. . .. . This is obviously bad because we don t want to touch the library if possible . Another even worse option would be to convert the types to void in all function signatures and cast them back to their respective types . And there s the worst option to rewrite every affected function in pure C.. . So my question is : Is there any better option than patching the library Is there an easy solution I am overlooking What would be the best way to solve this Comment : Don t see what this has to do with C . Your problem is name-mangling of the C++ wrappers no Comment : This could be an excellent argument to upgrade to C++11 which doesn t have this restriction . Comment : @JensGustedt correct but I also tagged it C because the library is written in C and technically it s a C C++ interoperability problem . Comment : @ecatmur C++11 does not support anonymous structs : stackoverflow.com questions 8622459 http : stackoverflow.com questions 8622459 why-does-c11-not-support-anonymous-structs-while-c11-does Comment : Said differently I don t think that any expertise on C can help you here . So this calls for the wrong people me for example : .. . Answer : This seems to work :", "Question : We have a big old C++ application with a lot of legacy code and a few external libraries written in C . These libraries are very rarely updated - only if we find a bug and the vendor supplies a patch . This happened last week with one library and upon integrating the new version we found out that if we don t modify the library locally which we apparently did with the last version our build breaks with this error message : .. . .. . This is due to the library declaring a number of handle types like this : .. . .. . which we use on our side in some classes function signatures : .. . .. . This produces the error above because the compiler can t create a proper name-mangled name for the function s as the Opaque struct has no name . Our current workaround for this is to patch the library header file explicitly giving the struct a name : .. . .. . This is obviously bad because we don t want to touch the library if possible . Another even worse option would be to convert the types to void in all function signatures and cast them back to their respective types . And there s the worst option to rewrite every affected function in pure C.. . So my question is : Is there any better option than patching the library Is there an easy solution I am overlooking What would be the best way to solve this Comment : Don t see what this has to do with C . Your problem is name-mangling of the C++ wrappers no Comment : This could be an excellent argument to upgrade to C++11 which doesn t have this restriction . Comment : @JensGustedt correct but I also tagged it C because the library is written in C and technically it s a C C++ interoperability problem . Comment : @ecatmur C++11 does not support anonymous structs : stackoverflow.com questions 8622459 http : stackoverflow.com questions 8622459 why-does-c11-not-support-anonymous-structs-while-c11-does Comment : Said differently I don t think that any expertise on C can help you here . So this calls for the wrong people me for example : .. . Answer : You can introduce names by declaring new types which simply contain these elements . Use those types for your parameters . Comment : The ctors and conversion operator can t be declared because their signature would contain an anonymous type . Comment : @ecatmur thanks for noting that +1 . my suggestion for ctors and conversion ops was not compatible with the compiler settings the OP s using -- removed . Comment : This would have probably been the right way to do it but I m hesitant to implement this as it would require changes in a big part of the codebase . Comment : that s understandable" ] }
[ "yes-answer-long", "yes-answer-short" ]
struct
UNK_RELATION
visual-foxpro@procedural-programming@72
visual-foxpro -- visual-foxpro vfp is a data-centric object-orientated @placeholder language from microsoft .
{ "confidence": [ 59.560401916503906, 59.03870391845703, 57.62216567993164, 56.255645751953125, 56.255645751953125, 53.950843811035156, 53.76277160644531, 52.08722686767578, 50.536903381347656, 50.414817810058594, 48.94762420654297, 48.94762420654297, 48.94762420654297, 48.94762420654297, 48.823036193847656, 48.45301055908203, 48.327491760253906, 48.30715560913086, 47.55223846435547, 47.55223846435547, 45.95032501220703, 45.76239776611328, 45.27052307128906, 44.942386627197266, 44.942386627197266, 44.593223571777344, 43.87513732910156, 43.69084167480469, 43.69084167480469, 43.459312438964844, 42.839019775390625, 42.839019775390625, 42.23921203613281, 42.202735900878906, 42.202735900878906, 41.44363784790039, 41.44363784790039, 41.203792572021484, 40.566802978515625, 40.566802978515625, 40.33482360839844, 39.856266021728516, 39.856266021728516, 39.77123260498047, 39.77123260498047, 39.77123260498047, 38.9864501953125, 38.9864501953125, 38.60499572753906, 38.46088409423828, 37.83775329589844, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.87898635864258, 36.788475036621094, 36.788475036621094, 36.75440216064453, 35.8203125, 35.483604431152344, 35.483604431152344, 35.483604431152344, 34.913063049316406, 34.50074005126953, 34.48978805541992, 34.30750274658203, 33.81119918823242, 33.81119918823242, 33.81119918823242, 33.81119918823242, 33.81119918823242, 33.28001403808594, 33.15810775756836, 33.09043502807617, 32.950408935546875, 32.950408935546875, 32.86861038208008, 32.86861038208008, 32.86861038208008, 32.86861038208008, 32.86861038208008, 32.86861038208008, 32.45338439941406, 32.236328125, 32.090087890625, 31.84939193725586, 31.84939193725586, 31.473228454589844, 31.473228454589844, 31.473228454589844, 31.473228454589844, 31.473228454589844, 31.217235565185547, 31.13712501525879, 30.882640838623047 ], "content": [ ".. . Source Microsoft OLE DB Provider for Visual FoxPro", "but cant not capture from visual-foxpro .", "visual-foxpro", "Well is it Visual FoxPro or dBase", "is fine in Visual FoxPro .", "Visual FoxPro 9.0 SP2 and OLE DB Provider for Visual FoxPro 9.0 SP 2 were installed too .", "I am new to visual-foxpro .", "I am using Visual Foxpro Vfp9 .", "How does one write a Variadic Function in Microsoft Visual Foxpro", "there s an app in our company running on Visual FoxPro .", "Does it really exists in C : Users ama Documents Visual FoxPro Projects", "I try to make a c application that works with visual-foxpro databases .", "So I m not sure how feasible that would be with Visual FoxPro .", "I am currently looking all over the internet for Visual FoxPro 9 .", "because when converting code from visual-foxpro to java", "ODBC Visual FoxPro Driver Invalided subscript reference .", "It is not possible to use Microsoft Visal FoxPro IDE is Visual Studio is opened .", "I am using Microsoft Visual FoxPRo 9.0 SP 2 for my development .", "Basically 2GB is the upper limit for any file that Visual FoxPro has to deal with .", "Trying to convert a Visual Foxpro code to set-based MySQL query .", "The default Visual FoxPro Database ODBC Data Source assumes a Database Container DBC is specified in the Data Source or SourceDB attributes .", "First off I ve never dealt with FoxPro or Visual FoxPro so don t expect what I say is going to work perfectly for every scenario .", "I am executing the following Visual FoxPro SQL statement from a C program .", "Trying to use Visual FoxPro command CHRTRAN to search the field UdidText for a comma and replace it with an @ sign .", "I am trying to export a Visual FoxPro table with a memo field to a .CSV file .", "You should switch to using the Visual FoxPro Tables DSN or appending the filename for the DBC to the Data Source attribute .", "The Visual FoxPro app uses the message returned from odbc using the AERROR function .", "In FoxPro the RLOCK returns .T .", "FoxPro for the necessary IPC .", "Here is some sample code : .. . .. . Visit Microsoft OLE DB Provider for Visual FoxPro 9.0 http : www.microsoft.com download en details.aspx id 14839 if you need the FoxPro driver .", "WARNING I am not sure if the visual-foxpro provider supports multiple select statement in the same command .", "I have a programming problem in Visual FoxPro create a form that contains PageFrame with 2 Page .", "The SCATTER command is a relic from Foxpro having no native objectified data .", "If you actually have a choice may I suggest you stay away from Visual FoxPro for any new development.. .", "i m trying to connect to Sybase ASE 11.5 12.5 from visual-foxpro 5.0 or 9.0 but I can t make it work .", "If the latest psqlodbc driver 09.05.0300 is used a Visual FoxPro app does not return proper error message prior to being logged in .", "Currently I have to create web service for existing application created with Visual FoxPro .", "Has anyone seen something similar or know how why what the unprintable characters are which are embedded in Visual FoxPro memo fields", "Could learn MS Access if there s a way to import data from FoxPro .", "So I am not looking for a tool to migrate data from FoxPro .", "Trying to connect to a FoxPro directory hosted locally using the Microsoft OLE DB Provider for Visual FoxPro 9.0 https : www.microsoft.com en-us download details.aspx id 14839 with the following code : .. . .. . Executing the code does not throw an exception but there are zero rows returned .", "Many Foxpro developers have it in their list of not to use commands .", "I am anxious to delve into FoxPro is all", "I am trying to understand the file-format of a Visual FoxPro compact index .IDX .", "Then a create a project in Visual Foxpro for use the ezlib.dll but other error generates : Cannot find entry-point ezcompress int the DLL .", "If you mean is there an SQL expression that will work in Visual FoxPro then absolutely - the exact same syntax you have in your question will work .", "The file produced is in the FoxPro FPT format .", "The file produced is in the FoxPro FPT format .", "This whole process is importing the data from a FoxPro DB to a Access DB .", "Would the FoxPro ODBC adapter have the same problem", "If Microsoft Visual Studio 2015 community edition IDE is opened in Windows 10 and Microsoft Visal Foxpro IDE is in foreground .. . .. . after few seconds Visual Studio crashes with .. . .. . message .", "Well it works since day 1 of foxpro and it still works .", "What does it mean that you converted FoxPro tables using OLEDB", "Your code doesn t look right not only for FoxPro but for any SQL database .", "I m trying to establish a connection using foxpro and an oracle database on server .", "KEYBOARD CTRL+LEFTARROW .. . .. . In Foxpro this command will make a Keystroke of Control+Left Arrow .", "Is there any command or codes in vb.net instead of the KEYBOARD command in Foxpro", "Can anyone give me a little sample code on how to accomplish this in Foxpro", "I think you have bigger problems if you re using FoxPro for this .", "I m new to FoxPro can you help me with the code", "intValue in your FoxPro example is a seed value .", "The length of the decimal values are defined in your FoxPro settings .", "I believe that the FoxPro file formats are derived from the xBase standard .", "I m not sure why you would want to do that but here is a Visual FoxPro Toolkit for .NET http : foxcentral.net microsoft vfptoolkitnet.htm its possible it might have the same rand generator function .", "I m trying to catch the document.click event of a ActiveX-Browsercontrol in Foxpro .", "Unfortunately the examples are for VB6 and I need to implement it in a FoxPro - Project .", "I knew about FoxPro 2GB file limit but not as part of an OLEDB query .", "I tried what you said but doesn t work gives me this error file C : Users ama Documents Visual FoxPro Projects form5.scx doesn t exist", "The only way you will achieve this is create a Visual FoxPro COM object with a method that takes a seed value and returns the random number generated then use that via COM Interop in C .", "I am using a COM DLL type library created using vfp6 in my MVC 4 application for data-manipulation with FoxPro DB data-tables .", "This previous link shows how to connect to VFP from C http : stackoverflow.com questions 4049891 how-do-i-read-a-foxpro-8-0-database-from-c 4051836 4051836 .", "I m a little confused about what you mean sorry not a FoxPro expert .", "You just can t use the generators provided to you by Foxpro and the .NET framework .", "I have some Foxpro tables one of which includes a Blob field .", "I already connect foxpro to MSSQL using the following string .", "I am initially an Excel user don t know any SQL or FoxPro .", "You may as well just generate a map using the numbers from FoxPro and get the numbers from there .", "I have a desktop application Foxpro 9.0 Executive that needs to connect up to Payeezy and transfer and receive XML data via their API .", "@Vizkrig Foxpro commands are based on current records and opened tables I m old school developer I used vfp too is hard to translate vfp code without sample-data or before-after samples some legacy procedures now can be solved with one single line depending on language .", "Note : on the old system I checked in administrative tools in data source is has foxpro drivers .", "But to refresh FoxPro DB data and re-create .frx logic in Excel Power BI .", "There are many users there who have worked with FoxPro and .Net together especially the notable Rick Strahl who is a master at this kind of stuff .", "UPDATE : So apparently there s something that I just don t understand about FoxPro .", "I m trying to execute an RLOCK command record lock on a FoxPro table via OleDbCommand but I need to know if the lock succeeded .", "I record macro Arial Bold 10Page do not work in foxpro excel-automation .", "When I go to the official MSDN and search for FoxPro 9 I find the base software that I need", "Does my institution just suck and possibly do not own the permission rights to the license for FoxPro", "Nobody using VFP with Visual Studio Team Services over MSSCCI", "However it appears that the Compact Index Format you linked to describes the exact same structures as the one I linked to yours refers to FoxPro 8.0 mine refers to FoxPro 9.0 SP2 both are identical in this regard .", "My Update statement which contains my select statement and doesn t work : .. . .. . I get an error that reads Microsoft Visual FoxPro Command contains unrecognized phrase keyword . I don t see what it is talking about and a good 4 5ths of my query is my original select statement .", "The catch seems to be the pass-thru query via the FoxPro ODBC .", "@CetinBasoz I updated question and added FoxPro code which causes crash .", "Due to the design of a foxpro database to where the export is going I am unable to do a direct pull through .", "Sorry I m relatively new to foxpro databases so I may be misunderstanding you .", "me podrian ayudar a interactuar la api de google-maps con foxpro .", "I am running a FoxPro OLEDB query with several joins over a fairly large dataset .", "We have a legacy FoxPro application that uses CDO for NTS to send STMP email through our Exchange server .", "I have got a piece of code that is being used to update a Foxpro table with new data however in order to get this data I need to run more than one select statement .", "Following is the code segment from Foxpro .. . .. . I have a table named pfile which I am trying to join with another table named csra .", "occupy a method made in migrating Visual Fox Pro emigrarlo to C the problem I have is how to know if the method in Visual Fox Pro : .. . .. . method is equal to dotNet : .. . .. . assuming that intValue 971 the result generated in dotNET is 2027119 but I need to be equal to that return FoxPro ." ] }
{ "confidence": [ 70.97894287109375, 66.4416275024414, 64.33078002929688, 63.373748779296875, 59.96482849121094, 59.46050262451172, 59.292686462402344, 58.87727355957031, 58.5150146484375, 58.068702697753906, 57.645790100097656, 57.41503143310547, 57.3341064453125, 57.1201171875, 56.048866271972656, 55.90382385253906, 55.62796401977539, 55.34627151489258, 53.86555480957031, 53.750179290771484 ], "content": [ "Question : I am implementing a CD DVD burning tool by using IMAPI Image Mastering API by Microsoft . I need to put a ProgressBar into the main screen to indicate user about the progress of writting process . I am using Microsoft Visual FoxPRo 9.0 SP 2 for my development . Can anyone can tell me how can I collect the statistics to set the values of the Progress Bar.. . Please Help .. . .. . Thanks in Advance Comment : I think you have bigger problems if you re using FoxPro for this . .. . Answer : This is really an IMAPI question surely This similar query http : stackoverflow.com questions 3782730 imapi2-in-vb-2008-progress-bar would seem to indicate that you need to handle IDiscMasterProgressEvents progress events from IMAPI and possibly on a separate thread . So I m not sure how feasible that would be with Visual FoxPro . You might find it easier to do this in .NET and then leverage that from the VFP side . Comment : +1 - VFP is not a good fit for this type of app .", "Question : I have run into an issue with a data export I am writing . Due to the design of a foxpro database to where the export is going I am unable to do a direct pull through . I am now handling nulls on the transfer but am experiencing a data type mismatch . I have attempted two different conversions .ToDecimal and .ToInt32 however neither of these seem to work as they should is it not possible to do a conversion here The field s in SQL are of money type and the correlating field s in Fox pro are numeric .. . .. . Message Data type mismatch . .. . Source Microsoft OLE DB Provider for Visual FoxPro Comment : Have you tried using double as the type Comment : yep same issue Comment : What scale and precision do the numeric values in the VFP table have Note that this includes two extra characters one for the minus sign and one for the decimal Comment : Sorry I m relatively new to foxpro databases so I may be misunderstanding you . The fields in VFP allow for a width of 12 characters with 2 dp Comment : Try decimal . money data-type is obsolete . .. . Answer : @Joshua In your code we don t see how you defined the data types . We also don t see how your data types are defined in your VFP table . On VFP side although numeric float or double would work you would lose precision . Precision is important when it is money so stay away from float numeric and double data types float and numeric are worse than double . You shouldn t use them for monetary values . In VFP there is currency data type and that works quite well within SQL money range . It doesn t cover the whole range and I don t know the range it would work correctly you should try if you need all I know it is not the value written in VFP documentation . Probably would work almost +-1 to documented ranges .", "Question : occupy a method made in migrating Visual Fox Pro emigrarlo to C the problem I have is how to know if the method in Visual Fox Pro : .. . .. . method is equal to dotNet : .. . .. . assuming that intValue 971 the result generated in dotNET is 2027119 but I need to be equal to that return FoxPro . Primary question : how I can make sure I get the same result Secondary question : Do you know of any online tool fox pro to prove that this method gives me result Rand Comment : so you want to know if calling the Rand function in FoxPro will return the same value as calling Random.Next in .NET I guess that depends on whether the underlying algorithm is the same which I doubt . Comment : So you want two random numbers to not be random Does not compute. . Comment : RobertMS : I also doubt that they have the same result . as I have no idea how to produce the same result in C and FoxPro so I can think illustrate my problem Comment : Why do you continue to post the same question over and over link http : stackoverflow.com questions 10903014 there-is-any-way-to-match-the-method-randint-of-visual-fox-pro-and-c-net and link http : stackoverflow.com questions 10905171 migrate-method-randint-visual-fox-pro-to-c-net .. . Answer : You can t . You are setting a seed value but the chance that .NET and FoxPro is using exactly the same method to generate Random numbers is close to zero . But question is why would you want this Random is supposed to be random . Comment : the code in visual fox pro did so many use application and expect returns that result vfp Comment : It s because the random generaton in VFP is weak so same seed returns the same result each time . Which makes it less random for a random generator . Only way you can get the same result in C is by using a COM build in VFP as @AlanB suggested that uses the VFP random generator .", "Question : I am trying to export a Visual FoxPro table with a memo field to a .CSV file . There appear to be unprintable characters embedded in the memo field which cause the exported value to be truncated i.e . only the portion of the memo field BEFORE the unprintable character exports . Has anyone seen something similar or know how why what the unprintable characters are which are embedded in Visual FoxPro memo fields Comment : How are you exporting the table . The easiest ways of exporting VFP tables to CSV don t even bring memo fields along . .. . Answer : Since I haven t done it before for Testing purposes I just now created a simple VFP table . That command did indeed create the CSV file but the NOTE field Memo field and its contents were not included . You might try to do a SQL Query of your desired table first and convert the Memo field contents into a Character string and then removing any unwanted characters BEFORE attempting your Export to the CSV file . For example something similar to : Comment : Thanks very much for the assistance . Ultimately this turned out to be CHR 0 characters embedded randomly in the memo fields . While it is unclear why an upstream system populated them in the first place STRTRAN successfully stripped them out such that the field value could operate normally .", "Question : I have some Foxpro tables one of which includes a Blob field . I know the data type stored within the Blob a MapPoint file but I don t how to extract it because I don t have FoxPro not can I easily obtain it . Is there a way to take the .DBF and .FPT files and extract the MapPoint files stored within .. . Answer : You can use C and ADO.NET to extract the data into files . Here is some sample code : .. . .. . Visit Microsoft OLE DB Provider for Visual FoxPro 9.0 http : www.microsoft.com download en details.aspx id 14839 if you need the FoxPro driver .", "Question : How can I open a form stored in the current directory .. . .. . I tried this but says that the file doesn t exist Comment : If it s the current directory you don t need a path at all . Just DO FORM form5.scx .. . .. . Answer : VFP uses relative pathing and also search paths . If it is in current directory then would be the first one to be picked by VFP . Comment : I tried what you said but doesn t work gives me this error file C : Users ama Documents Visual FoxPro Projects form5.scx doesn t exist Comment : Well it works since day 1 of foxpro and it still works . In your case it means that there isn t a Form5.scx in the current folder . Does it really exists in C : Users ama Documents Visual FoxPro Projects That is a strange location to put a form anyway . Instead maybe you should try it with : do form locfile form5.scx with .. . Comment : My form5.scx are located in current folder . I have form1.scx and form5.scx which are located both in C : Users ama Desktop New folder and I m trying to access form5 from form1 . Comment : What is your current folder Check typing CD enter at-command prompt . You can explicitly set your current folder and retry : set default to C : Users ama Desktop New folder . Or you can use locfile as I said .", "Question : I am trying to export a Visual FoxPro table with a memo field to a .CSV file . There appear to be unprintable characters embedded in the memo field which cause the exported value to be truncated i.e . only the portion of the memo field BEFORE the unprintable character exports . Has anyone seen something similar or know how why what the unprintable characters are which are embedded in Visual FoxPro memo fields Comment : How are you exporting the table . The easiest ways of exporting VFP tables to CSV don t even bring memo fields along . .. . Answer : Memo and text fields in VFP can store any character including character 0 . IOW a user might have stored binary information in a memo field . If you use VFP s copy to command then it creates a CSV delimited and a few other types for you . However copy to doesn t export fields like memo general or blob . A text file is not the best medium to export data and a CSV file when used including memo fields may not be imported by all databases . If you tell us more details how you do it and the purpose we might have better suggestions . ie : an XML might be a much better text based export . Or it might be much better to do a connection to or from the target database and do the transfer without any text based file in between . Comment : Or JSON with the memo field Base64 encoded .", "Question : I developed an app that read data from VFP free tables and databases using VBA at Excel 2013 Pro 32 bits . The computer used for develop that app was formatted . After that I installed Office 2016 Pro Plus 64 bits at the same machine . Visual FoxPro 9.0 SP2 and OLE DB Provider for Visual FoxPro 9.0 SP 2 were installed too . When I run app again that issues runtime-error 3706 . Before formatting that app open databases and free tables without any problem . What have I done Install and uninstall VFP and service pack 2 and OLE DB Provider . Why that happens Am I missing any file during VFP install or during Office Setup Am I missing other software I am using Windows 7 64 Bits Professional SP1 . Thanks in advance for your answer . UPDATE : This code issues the error Comment : Hello . Please post up your code it s impossible to say without looking at that . .. . Answer : VFPOLEDB driver is 32 bits . You cannot use it with 64 bits excel . You may try using Advantage Database Server instead . PS : An easier solution would be to use code written and compiled in VFP or C targeting x86 . Comment : That s right . VFPOLEDB does not work under 64 bits architecture . Thanks for your help .", "Question : I need to take some code written in VisualFoxPro and rewrite it in VB . Having no experience with FoxPro I asked about a few commands used in the code and found one of particular use : scatter memvar which made individual variable from columns in a table . Does VB have an equivalent function or do I need to create each variable with a Dim statement Edit : I should have mentioned that I m looking to use this to propagate datatables very sorry . Later in the VFP program insert into memvar matches the variables to their respective columns . I m looking to avoid the need of a method along the lines of : .. . .. . Sadly the above is how I do most of my data-entry . Edit : In response to @DRapp s comment I am using VB to read a .xin file and form an access data table from its code . There are two collections in the .xin file that are of interest to me : NamedSymbologyCollection and FeatureStylesCollection . Both of these collections are in the same line of the file so I ve written code to go tag-by-tag pick out the information I want and add it to a temporary data table . If you have any recommendations on how to improve any of the above please let me know . Comment : Can you explain what made individual variable from columns in a table means . Perhaps giving an example would help . Comment : .NET will provide the db column name and value in the resulting DataSet DataTable when you query the DB . much better than a gaggle of individual variables Comment : If i had a table column myColumn using scatter a variable m.myColumn would be made . Later in the program scatter is replaced with insert into memvar which sends all the m.variables to their respective columns . Comment : @Blackwood the old FoxPro Scatter MemVar command would actually create an unknown number of undeclared variables corresponding to the columns of a table row so that even in a VFP context many people including me would recommend not to use it anymore . belaythat I d agree with Plutonix suggesting to use strong-typing DataRow objects in .Net similar to what the VFP command Scatter Name would do which would in turn be very similar to the Model concept as described in the MVC MVVM MVP patterns Comment : Thanks Plutonix for the suggestion and Stefan for the clarification on Scatter MemVar s-function . I ll let you know how everything turns out . .. . Answer : First off I ve never dealt with FoxPro or Visual FoxPro so don t expect what I say is going to work perfectly for every scenario . Looking at this MSDN page https : msdn.microsoft.com en-us library aa978285 28v vs.71 29.aspx it looks like the to perform a simple scatter command in FoxPro you would use something like this : .. . .. . The above looks is just getting all fields that start with A and P and is excluding items matching PARTNO from the results . I think this would be best translated to a using LINQ query which could return an Object array . If you start getting into the more complicated uses of the scatter command to break up the values into a new object where the object has properties which are the same as the columns in the original table well the VB equivilent gets much harder because you ll have to make a class that inherits the System.Dynamic.DynamicObject class . So this example from the MSDN page https : msdn.microsoft.com en-us library aa978285 28v vs.71 29.aspx .. . .. . Turns into a complicated mess in VB . I m going to provide a very basic example and it is very bare bones but hopefully it ll give you an idea on where to start . And the usage of the above class :", "Question : null .. . Answer : there s an app in our company running on Visual FoxPro . I need to create MS Power BI reports based on data from this app . Files can be exported from the app manually to excel which takes some time . Ideally there was a data connection to Power BI to refresh data . Opened .dbc file in VFP9 lots of tables and connections . No app documentation available don t know where to start . Imported some data into x32 Access and Excel with MS ODBC connector . Don t know how to re-create the connections and business-logic . Opened .frx files for business logic . how do I convert that in Excel I am initially an Excel user don t know any SQL or FoxPro . Could learn MS Access if there s a way to import data from FoxPro . So I am not looking for a tool to migrate data from FoxPro . But to refresh FoxPro DB data and re-create .frx logic in Excel Power BI . Is this feasable Comment : FRX files are report definitions . Most of the time they contain little if any logic . Mostly they re the report layout with maybe some info about totalling and grouping . From the VFP side there are tools that will convert a report the result not the FRX to Excel format but you d need a way to hook that into your application . Comment : From what you are saying my suggestion is that you stay away from that app . If getting data into excel would work for you then use OLEDB driver VFPOLEDB and Querytables.Add method . ODBC driver works for VFP6 and earlier formats unless it is ADS driver . Comment : You might get better answers if you explain what connections and business-logic you re trying to re-create in Power Query and the errors you see .", "Question : I developed an app that read data from VFP free tables and databases using VBA at Excel 2013 Pro 32 bits . The computer used for develop that app was formatted . After that I installed Office 2016 Pro Plus 64 bits at the same machine . Visual FoxPro 9.0 SP2 and OLE DB Provider for Visual FoxPro 9.0 SP 2 were installed too . When I run app again that issues runtime-error 3706 . Before formatting that app open databases and free tables without any problem . What have I done Install and uninstall VFP and service pack 2 and OLE DB Provider . Why that happens Am I missing any file during VFP install or during Office Setup Am I missing other software I am using Windows 7 64 Bits Professional SP1 . Thanks in advance for your answer . UPDATE : This code issues the error Comment : Hello . Please post up your code it s impossible to say without looking at that . .. . Answer : This is a shot in the dark but if you have declared functions you ll have to change public private declare function sub to public private declare ptrsafe function sub or vice versa . The addition of ptrsafe makes 32-bit declared functions subs compatible on a 64-bit operating-system .", "Question : I try to make a c application that works with visual-foxpro databases . How can I list the tables from the database after I make the connection Comment : DbConnection.GetSchema https : msdn.microsoft.com en-us library system.data.common.dbconnection.getschema v vs.110 .aspx .. . Answer : Do you mean the table names If so since the VFP is a file based database system you could simply use the Directory.GetFiles . ie : .. . .. . This would find all the tables in a directory regardless the tables are member of a database or not . Note : This is NOT looking for tables that are part of the database in your connection . A database s tables might be on different folders very much unlikely . Depending on your real purpose it might matter with VFP you would unlikely want to use database dependencies .", "Question : Im getting ID s from a mysql phpmyadmin database and want to query the results to dbf . The results are ID s I want to get data from dbfs which are not present in mysql using the id s .. . .. . Is there a dBase DBF expression similar to MYSQL s .. . .. . WHERE DATA ID NOT IN 1 2 3 4 5 If there is what is it If no any workarounds .. . Answer : Well is it Visual FoxPro or dBase They are different products . Can you clarify exactly how you are accessing the DBFs . If you mean is there an SQL expression that will work in Visual FoxPro then absolutely - the exact same syntax you have in your question will work . SQL is a standard don t forget although different products may implement it slightly differently . is fine in Visual FoxPro . As is : .. . .. . .. . and so on .", "Question : null .. . Answer : If the latest psqlodbc driver 09.05.0300 is used a Visual FoxPro app does not return proper error message prior to being logged in . If there is no host name or user name or if the password is wrong the latest driver always returns the same error message : .. . .. . Earlier driver versions returned correct error messages similar to the following : .. . .. . After logging in correct error messages are returned in all driver versions . The version immediately preceding the latest psqlODBC 09.03.0400 returns correct error messages . The Visual FoxPro app uses the message returned from odbc using the AERROR function . Maybe Windows ODBC or VFP cannot retrieve the error message and thus return the more generic error . Adrian wrote in psqlodbc mailing list that is caused by a change in error reporting when the code was reorganized in 09.05.0100 .. . .. . How can I get the correct error messages with the newer versions of this driver Also posted in https : www.postgresql.org message-id 6BCE831703094A8287071F2E5DAB4C8C 40dell2", "Question : I m at the end of my rope on this issue . Trying to connect to a FoxPro directory hosted locally using the Microsoft OLE DB Provider for Visual FoxPro 9.0 https : www.microsoft.com en-us download details.aspx id 14839 with the following code : .. . .. . Executing the code does not throw an exception but there are zero rows returned . The schema is discovered and returned as it has 72 fields present when I examine the data reader I ve done the same with data tables data sets data adapters etc . All return the schema but zero results . Building an SSIS package to access the same table and pull into a MSSQL database results in 3 828 records being pulled in . order.dbf on disk is 884kb which seems to jive with the SSIS results I ve pulled in . I ve tried adding Collation Sequence to the connection-string both Machine and General to no effect . Please tell me there s something obvious I m missing UPDATE : So apparently there s something that I just don t understand about FoxPro . If I change the command type to CommandType.TableDirect and switch the command-text to just be order it returns all the rows . Any insight would be appreciated . .. . Answer : I think the problem is not with Foxpro testing with the same exact code I can get the result created a free test table in c : FoxDb . Ensure that you are using the latest VFPOLEDB driver . It looks like the problem lies within your table . BTW order is a keyword you better write it as : .. . .. . although it would work as you did VFP is forgiving in that regard . The problem might also lie in collation sequence you have used I never use collation sequences other than machine they are problematic in Turkish I expect the same in some other languages . Comment : Thanks for the response . Machine and General collations yielded the same thing . Interestingly I can select from certain tables but not others . Also the tables that I can t select from.. . if I switch the CommandText property to just order and modify CommandType to CommandType.TableDirect I can get all the rows . That doesn t do me a lot of good because I need a where clause but I thought it was interesting . Oh and the version on vfpoledb.dll is 9.0.00.5815 which I think is the latest . Also tried to upvote you but I don t have the reputation sorry . Comment : The final version of VFP is 7423 so there may be a later version of the driver . Comment : @TamarE.Granor AFAIK latest is 9.0.00.5815 . Where I can I find 7423 br If the contents are not a secret can you zip and send that table dbf + cdx and fpt if any - I assume it is a free table . If you would email to cetin dot basoz at deu dot edu dot tr Comment : I don t think there is a 7423 latest seems to be 5815 from everything I can find online . Actually the table is part of a .dbc.. . and sadly I can t send it it s client proprietary data and I don t have authorization to release . : Thanks anyway .", "Question : I am running a FoxPro OLEDB query with several joins over a fairly large dataset . However despite only asking for MAX or TOP 100 rows data I get the following error : .. . .. . System.Data.OleDb.OleDbException 0x80004005 : File c : users appX appdata local temp 4 00004y7t002o.tmp is too large . LOCAL .. . .. . OR .. . .. . System.Data.OleDb.OleDbException 0x80004005 : Error writing to file c : users appX appdata local temp 00002nuh0025.tmp . REMOTE .. . .. . I have tried the query both locally and remotely . Seemingly the OLEDB query creates deletes a huge amount of temp files e.g . enter image description here http : i.stack.imgur.com RFsSU.png .. . .. . This would suggest my query is simply too large and will require several smaller queries workarounds . The question is : is this a known issue Is there an official workaround Would the FoxPro ODBC adapter have the same problem Comment : You should show a simple query . Are you using SELECT TOP 100 PERCENT or TOP 100 ROWS Notice the difference . Comment : Can you post the actual query you are trying to run You might be able to optimize by running smaller queries into temp cursors and then your final query . .. . Answer : Basically 2GB is the upper limit for any file that Visual FoxPro has to deal with . None of those temp files are anywhere near that . Does the location they are being created in have enough disk space Are there user disk quotas in effect Comment : No quotas and disk space is available but this was just while I was looking at the files in the directory - it s quite possible a temp file exceeded the 2GB file limit . I ve now used a series of more specific queries to avoid the huge data-set . I knew about FoxPro 2GB file limit but not as part of an OLEDB query . Comment : Doesn t matter - the OLEDB driver is still using the same VFP DLLs so you have that ceiling regardless .", "Question : I m making integration with application that is using ODBC Data Source - Visual Fox Pro Driver . In its dirrectory structure I ve got two dirrectories DANE and TRANS which contains .DBF files . When I am using Visual Studio 2010 Server Explorer - Data Connections to connect to DATA .DBF files everything work fine . The problem occurs when I m trying to use TRANS dirrectory - I don t see any tables When I am using DBF Viewer - there are around 30-40 tables . When I try to connect to them using connection strings : .. . .. . I can get data from DANE without problem . On TRANS I can connect to database but I ve god exception when I try to get data OleDbException - Can t read file c : Softech G POS TRANS name of table .dbf Norbert .. . .. . .. . .. . Visual FoxPro Database is abstract name of destination . That s not a database just my custom name of data source .. . Answer : The problem comes from the DSN specified . The default Visual FoxPro Database ODBC Data Source assumes a Database Container DBC is specified in the Data Source or SourceDB attributes . This equates to the SourceType http : support.microsoft.com kb 167405 attribute as in SourceType DBC . You should switch to using the Visual FoxPro Tables DSN or appending the filename for the DBC to the Data Source attribute . Also according to the Foxpro Ole Db documentation http : msdn.microsoft.com en-US library 3haz2895 28v VS.80 29.aspx you should either use Data Source or DSN but not both .", "Question : I have some Foxpro tables one of which includes a Blob field . I know the data type stored within the Blob a MapPoint file but I don t how to extract it because I don t have FoxPro not can I easily obtain it . Is there a way to take the .DBF and .FPT files and extract the MapPoint files stored within .. . Answer : This previous link shows how to connect to VFP from C http : stackoverflow.com questions 4049891 how-do-i-read-a-foxpro-8-0-database-from-c 4051836 4051836 . That answer actually shows connection with OleDbProvider which is similar to answer by DaveB however VFP is NOT SQLServer connection and uses VFP OleDbProvider which is available at Microsoft s website for VFP http : www.microsoft.com download en details.aspx id 14839 .. . .. . Used in conjunction with each other connecting to VFP OleDB and running query . The connection-string only needs to point to the physical path where the data resides and can query from any .dbf in that folder . You do not have to explicitly connect to an actual database as VFP implies a path IS the location of the database . Anyhow the other question joined with Dave should be able to get your data available and write it to a stream . The only other caveat is that the file stream that you are writing too make sure its a binary file . Otherwise anytime you write a byte that is an enter key might be forced written with a trailing line feed . I found that one out the hard way a long time ago writing binary image files when building 2d bar codes and it getting messed up .", "Question : I am executing the following Visual FoxPro SQL statement from a C program . I am expecting to get 1 result but I am not getting any results . I am able to reproduce the problem running from VFP using the following program.. . It seems that if the tables are not open before the program is executed the results are zero records . If I open the tables and only execute the SQL statement it returns the expected one record . The other thing that I would not expect is that when I run the program above the SYS 3054 12 returns the following results Notice the Cartesian product .. . But when I run the SQL statement on its own with the tables already open the output looks different notice no Cartisian product .. . .. . Final Note : There is only one record in iplclaim that matches the WHERE clause . There is only one record in iplclsub that matches the INNER JOIN iplclsub ON clause . There is only one record in ipcname that matches the LEFT OUTER JOIN ipcname ON clause and there is no record in ipcbusn that matches the LEFT OUTER JOIN ipbusn ON clause . Can anybody explain what is causing this problem and what I have to do to resolve it EDIT : .. . .. . Well I figured out the problem is the AND NOT DELETED . If I remove that clause everything works as expected . Can someone explain that and can anybody tell me an alternative way to exclude deleted records .. . Answer : There is a warning in the FoxPro documentation about the SELECT-SQL command possibly returning unexpected results when using functions like DELETED in multiple table queries . The SET DELETED ON command can be used to ignore records that are marked for deletion . With that option turned on it looks like the use of the DELETED function could be removed from the query . For the C code assuming you re using an OLEDB connection the SET DELETED ON command can be executed on the same open FoxPro connection prior to executing the query .", "Question : occupy a method made in migrating Visual Fox Pro emigrarlo to C the problem I have is how to know if the method in Visual Fox Pro : .. . .. . method is equal to dotNet : .. . .. . assuming that intValue 971 the result generated in dotNET is 2027119 but I need to be equal to that return FoxPro . Primary question : how I can make sure I get the same result Secondary question : Do you know of any online tool fox pro to prove that this method gives me result Rand Comment : so you want to know if calling the Rand function in FoxPro will return the same value as calling Random.Next in .NET I guess that depends on whether the underlying algorithm is the same which I doubt . Comment : So you want two random numbers to not be random Does not compute. . Comment : RobertMS : I also doubt that they have the same result . as I have no idea how to produce the same result in C and FoxPro so I can think illustrate my problem Comment : Why do you continue to post the same question over and over link http : stackoverflow.com questions 10903014 there-is-any-way-to-match-the-method-randint-of-visual-fox-pro-and-c-net and link http : stackoverflow.com questions 10905171 migrate-method-randint-visual-fox-pro-to-c-net .. . Answer : I m not sure why you would want to do that but here is a Visual FoxPro Toolkit for .NET http : foxcentral.net microsoft vfptoolkitnet.htm its possible it might have the same rand generator function . Comment : I do not want to depend on the application in visual fox pro I want to be independent your answer is what I have gained more hacerta for now tomorrow will prove it . . thanks D Comment : It just calls the normal c Random.Next function" ] }
[ "yes-answer-long", "yes-answer-short" ]
procedural-programming
UNK_RELATION
wide-column-store@key-value@55
wide-column-store -- a wide-column-store is a type of @placeholder database .
{ "confidence": [ 80.96227264404297, 54.17546081542969, 52.5667724609375, 45.97209548950195, 44.30833053588867, 44.30833053588867, 43.91835021972656, 43.91835021972656, 41.1519660949707, 40.854427337646484, 40.14044952392578, 39.35683059692383, 39.34566116333008, 39.24343490600586, 38.93571090698242, 37.98293685913086, 37.289817810058594, 36.7247428894043, 36.30339813232422, 35.4342155456543, 35.23479080200195, 35.203285217285156, 34.39784240722656, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 28.006580352783203, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793, 21.78602409362793 ], "content": [ "From Stackoverflow tags : .. . .. . A wide-column-store is a type of key-value database .", "A few days ago I read about wide-column stored type of NoSql and exclusively Apache-Cassandra .", "The wide column terminology is a little outdated for C .", "The term wide-rows was related mainly to the Thrift API .", "HBase and Cassandra are built as wide column stores using the concepts of both rows and columns .", "I want to know what is the difference between a persistent key-value DB and a wide-column DB .", "Partition containing multiple rows is in Thrift therminology named wide-row .", "Yes having something like lastname age city is introducing a wide row .", "What I know is we use sth like this to implement a Wide-Row table .", "What I understand is that Cassandra consist of : .. . .. . A keyspace like database in relational databases and supporting many column families or tables Same as table in relational databases and unlimited rows .", "Additionall in case of column : value in newer versions column is also somehow optimized so that column name-length does not influence the table size .", "For example I know that nested column doesn t support in Cassandra .", "It is not so bad it s already a mature database :", "What I understand is in Cassandra they store a Column : Value for each rows .", "It can be used also to model 1 : N relations .. . In CQL you can have collection type columns - set list map .. . Column can contain a user defined type you can define e.g .", "But I don t understand the difference between structure : .. . .. . Imagine a scenario which I have a table or column family in Cassandra : .. . .. . When I execute a query Cql like this : .. . .. . It gives me the result as you can see : .. . .. . So I perform the above scenario in relational-database MsSql with the blow query : .. . .. . And the result is : .. . .. . I know that Cassandra supports dynamic column and I can perform this by using sth like : .. . .. . But it is available in relational model for example in mssql the above code can be implemented too .", "This allows Cassandra to quickly retrieve and store data for you in sorted order and is also the reason for the WHERE filtering restrictions .", "We have to look at more complex example to see the differences : .. . .. . For start : .. . .. . column family term was used in older Thrift API .. . in newer CQL API the term table is used .. . .. . Table is defined as two-dimensional view of a multi-dimensional column family .", "I read about differences in implementation and storing data of Relational database and NoSql Cassandra .", "In Cassandra they just give a row-key lastname as a standalone objet but it is same as a unique field like ID or a text in mssql and all relational databases and I see the type of column in Cassandra is static in my example varchar unlike what it describes in Stackoverflow tag .", "It uses tables rows and columns but unlike a relational-database the names and format of the columns can vary from row to row in the same table .", "The name column moved from the Value to the Key and Value has a single column name value .", "address as type and reuse this type in many places or collection can be a collection of user-defined-types .. . But also CQL does not support JOINs which are available in SQL and you have to structure your tables very carefully since they have to be strictly query oriented in cassandra you can t query data by any column value secondary indexes also have many limitations .", "In Cassandra all of the rows in a table should have a row-key then each row-key can have multiple-columns .", "Sth like : .. . .. . What I see is that the first select and second select result is the same .", "So my questions is : .. . .. . 1 .", "Is there any misunderstanding in my imagination about Cassandra", "2 .", "So what is different between two structure", "I show you the result is same .", "3 .", "Is there any special scenarios Json like that cannot be implemented in relational databases but Cassandra supports", "Thank you for reading .", "In cql it is defined a bit differently but underneath looks the same .", "Comparing SQL nad CQL .", "In SQL table is a set of rows .", "In simple example it looks like in CQL it is the same but it is not .", "CQL table is a set of partitions where each partition can be just a single row e.g .", "when you don t have a clustering key or multiple rows .", "To see how it is stored underneath please read e.g .", "part about composite-keys from here http : www.planetcassandra.org blog composite-keys-in-apache-cassandra .", "There are more differences : .. . .. . CQL can have static columns which are stored on partition level - it seems that every row in partition have a common value but really it is a single value stored on upper level .", "It is usually said that in relational model you model tables clearly basing on data when in cassandra you model basing on queries .", "I hope I was able to make it a bit more clear for you .", "I recommend watching some vidoes or reading slides from Datastax Core Concepts Course https : academy.datastax.com courses ds201-cassandra-core-concepts as solid introduction to Cassandra .", "Thank you for reading my question and your complete answer .", "If so Isn t it a huge amount of losing memory", "You know storing every rows like this can make keyspace very very larger .", "There are some optimizations including e.g .", "compression .", "In nodetool cfstats it is possible to see compression ration .", "Depending on data it can be for example 0.46 which means compressed data takes 46 less space .", "It is stored this way because every cell has a version compared between nodes to determine which value is newer in case of failures etc see also CAP theorem .", "In my experience CQL misleads a lot of people .", "First of all you would never want to do : .. . .. . SELECT FROM a table here .. . .. . On a production Cassandra cluster since you are putting a huge load on your Coordinator node to aggregate all of the data from all of the other nodes .", "Also by default you will be given back a maximum of 10000 rows .", "To understand how Cassandra stores your data we need to establish a few terms first : .. . .. . There s the Primary Key in your case lastname this is hashed to determine which node in the cluster owns this range and it s stored there plus any replica nodes .", "Next there s Cluster Columns I don t know if you have any in your example but you define them like PRIMARY KEY lastname age city .", "In that example you are clustering by age first then city this is ORDERED .", "Now for a simplistic high-level view of Cassandra for your use-case it stores the data as a Map to an ordered Multimap : .. . .. . Doe - 36 : Beverly Hills - janedoe@email.com .. . .. . Where Doe is the Primary Key which tells you which node s have that row of data .", "And 36 : Beverly Hills is the Ordered Clustering Keys part of the ordered multimap key .", "Lastly janedoe@email.com is the final value can be multiple mind you for the Map to a Multimap .", "There s a lot of nuisances that I left out to make the example simple for a more in-depth I would highly suggest reading : http : www.planetcassandra.org making-the-change-from-thrift-to-cql", "Thank you for your explanation I read planetcassandra link but I feel so confused", "First when should we use a table like PRIMARY KEY lastname age city", "Is it correct", "And The second is why 36 : Beverly Hills", "It is a map .", "so why it isn t like : Doe - 36 - Beverly Hills - janedoe@email.com", "To determine when this is appropriate read up on the basics of data-modeling http : www.datastax.com dev blog basic-rules-of-cassandra-data-modeling .", "Next for the case of 36 : Beverly Hills something similar in the planet Cassandra link too .", "Essentially what is happening is that Cassandra compacts the maps into one key- value by concatenating the key values in sorted order .", "A row is composed of a key similar to the concept of primary-key in RDBMS and a value composed of several columns .. . .. . A representation can be the following : .. . .. . Is it correct at the application layer to build composed primary keys to allow to iterate quickly over colocated rows .", "This can be reprensented as follow .", "Compound keys are used all the time when designing Cassandra schemas .", "In C the keys are broken down into two parts the partition key and clustering columns .", "The partition key is used to hash data to nodes within the cluster .", "A partition is a bucket of data that can hold a single row or multiple rows based on the clustering columns .", "Data within a partition is local to a node and is kept in sorted order by the clustering keys which makes accessing data within a partition fast and efficient with support for range queries on the clustering keys .", "C also allows data fields which are not part of the compound key and are not generally used in queries unless you create a secondary index on them .", "In the current CQL view of things data is thought of in more traditional terms as rows in a table that are grouped into efficient to access partitions .", "So to answer your question yes in C it is common to move columns that might have been thought of as data columns in an RDBMS to be part of the compound key in C .", "To see more information on partition keys and clustering columns and how they impact the types of queries you can do see a deep look at the CQL WHERE clause http : www.datastax.com dev blog a-deep-look-to-the-cql-where-clause .", "Composite keys are very popular in HBase schema design .", "They also allow you to do fast range scans on prefix component of Rowkey .", "Unlike Cassandra RowKey is not broken into Parts while storing data .", "Simple example : http : riteshadval.blogspot.com 2012 03 hbase-composite-row-key-design-doing.html .. . .. . .. . In HBase in your example you will be able to do range scans with identifier only and with identifier+name also .", "I understand in both DBs you retrieve a single value by a key so what is the difference between the types of the values", "Thanks" ] }
{ "confidence": [ 66.21031951904297, 63.020606994628906, 45.98457717895508, 44.752830505371094, 44.44329833984375 ], "content": [ "Question : A few days ago I read about wide-column stored type of NoSql and exclusively Apache-Cassandra . What I understand is that Cassandra consist of : .. . .. . A keyspace like database in relational databases and supporting many column families or tables Same as table in relational databases and unlimited rows . From Stackoverflow tags : .. . .. . A wide-column-store is a type of key-value database . It uses tables rows and columns but unlike a relational-database the names and format of the columns can vary from row to row in the same table . In Cassandra all of the rows in a table should have a row-key then each row-key can have multiple-columns . I read about differences in implementation and storing data of Relational database and NoSql Cassandra . But I don t understand the difference between structure : .. . .. . Imagine a scenario which I have a table or column family in Cassandra : .. . .. . When I execute a query Cql like this : .. . .. . It gives me the result as you can see : .. . .. . So I perform the above scenario in relational-database MsSql with the blow query : .. . .. . And the result is : .. . .. . I know that Cassandra supports dynamic column and I can perform this by using sth like : .. . .. . But it is available in relational model for example in mssql the above code can be implemented too . Sth like : .. . .. . What I see is that the first select and second select result is the same . In Cassandra they just give a row-key lastname as a standalone objet but it is same as a unique field like ID or a text in mssql and all relational databases and I see the type of column in Cassandra is static in my example varchar unlike what it describes in Stackoverflow tag . So my questions is : .. . .. . 1 . Is there any misunderstanding in my imagination about Cassandra 2 . So what is different between two structure I show you the result is same . 3 . Is there any special scenarios Json like that cannot be implemented in relational databases but Cassandra supports For example I know that nested column doesn t support in Cassandra . Thank you for reading . .. . Answer : We have to look at more complex example to see the differences : .. . .. . For start : .. . .. . column family term was used in older Thrift API .. . in newer CQL API the term table is used .. . .. . Table is defined as two-dimensional view of a multi-dimensional column family . The term wide-rows was related mainly to the Thrift API . In cql it is defined a bit differently but underneath looks the same . Comparing SQL nad CQL . In SQL table is a set of rows . In simple example it looks like in CQL it is the same but it is not . CQL table is a set of partitions where each partition can be just a single row e.g . when you don t have a clustering key or multiple rows . Partition containing multiple rows is in Thrift therminology named wide-row . To see how it is stored underneath please read e.g . part about composite-keys from here http : www.planetcassandra.org blog composite-keys-in-apache-cassandra . There are more differences : .. . .. . CQL can have static columns which are stored on partition level - it seems that every row in partition have a common value but really it is a single value stored on upper level . It can be used also to model 1 : N relations .. . In CQL you can have collection type columns - set list map .. . Column can contain a user defined type you can define e.g . address as type and reuse this type in many places or collection can be a collection of user-defined-types .. . But also CQL does not support JOINs which are available in SQL and you have to structure your tables very carefully since they have to be strictly query oriented in cassandra you can t query data by any column value secondary indexes also have many limitations . It is usually said that in relational model you model tables clearly basing on data when in cassandra you model basing on queries . I hope I was able to make it a bit more clear for you . I recommend watching some vidoes or reading slides from Datastax Core Concepts Course https : academy.datastax.com courses ds201-cassandra-core-concepts as solid introduction to Cassandra . Comment : Thank you for reading my question and your complete answer . What I understand is in Cassandra they store a Column : Value for each rows . If so Isn t it a huge amount of losing memory You know storing every rows like this can make keyspace very very larger . Comment : There are some optimizations including e.g . compression . In nodetool cfstats it is possible to see compression ration . Depending on data it can be for example 0.46 which means compressed data takes 46 less space . Additionall in case of column : value in newer versions column is also somehow optimized so that column name-length does not influence the table size . It is stored this way because every cell has a version compared between nodes to determine which value is newer in case of failures etc see also CAP theorem . It is not so bad it s already a mature database :", "Question : A few days ago I read about wide-column stored type of NoSql and exclusively Apache-Cassandra . What I understand is that Cassandra consist of : .. . .. . A keyspace like database in relational databases and supporting many column families or tables Same as table in relational databases and unlimited rows . From Stackoverflow tags : .. . .. . A wide-column-store is a type of key-value database . It uses tables rows and columns but unlike a relational-database the names and format of the columns can vary from row to row in the same table . In Cassandra all of the rows in a table should have a row-key then each row-key can have multiple-columns . I read about differences in implementation and storing data of Relational database and NoSql Cassandra . But I don t understand the difference between structure : .. . .. . Imagine a scenario which I have a table or column family in Cassandra : .. . .. . When I execute a query Cql like this : .. . .. . It gives me the result as you can see : .. . .. . So I perform the above scenario in relational-database MsSql with the blow query : .. . .. . And the result is : .. . .. . I know that Cassandra supports dynamic column and I can perform this by using sth like : .. . .. . But it is available in relational model for example in mssql the above code can be implemented too . Sth like : .. . .. . What I see is that the first select and second select result is the same . In Cassandra they just give a row-key lastname as a standalone objet but it is same as a unique field like ID or a text in mssql and all relational databases and I see the type of column in Cassandra is static in my example varchar unlike what it describes in Stackoverflow tag . So my questions is : .. . .. . 1 . Is there any misunderstanding in my imagination about Cassandra 2 . So what is different between two structure I show you the result is same . 3 . Is there any special scenarios Json like that cannot be implemented in relational databases but Cassandra supports For example I know that nested column doesn t support in Cassandra . Thank you for reading . .. . Answer : In my experience CQL misleads a lot of people . First of all you would never want to do : .. . .. . SELECT FROM a table here .. . .. . On a production Cassandra cluster since you are putting a huge load on your Coordinator node to aggregate all of the data from all of the other nodes . Also by default you will be given back a maximum of 10000 rows . To understand how Cassandra stores your data we need to establish a few terms first : .. . .. . There s the Primary Key in your case lastname this is hashed to determine which node in the cluster owns this range and it s stored there plus any replica nodes . Next there s Cluster Columns I don t know if you have any in your example but you define them like PRIMARY KEY lastname age city . In that example you are clustering by age first then city this is ORDERED . Now for a simplistic high-level view of Cassandra for your use-case it stores the data as a Map to an ordered Multimap : .. . .. . Doe - 36 : Beverly Hills - janedoe@email.com .. . .. . Where Doe is the Primary Key which tells you which node s have that row of data . And 36 : Beverly Hills is the Ordered Clustering Keys part of the ordered multimap key . Lastly janedoe@email.com is the final value can be multiple mind you for the Map to a Multimap . There s a lot of nuisances that I left out to make the example simple for a more in-depth I would highly suggest reading : http : www.planetcassandra.org making-the-change-from-thrift-to-cql Comment : Thank you for your explanation I read planetcassandra link but I feel so confused First when should we use a table like PRIMARY KEY lastname age city What I know is we use sth like this to implement a Wide-Row table . Is it correct And The second is why 36 : Beverly Hills It is a map . so why it isn t like : Doe - 36 - Beverly Hills - janedoe@email.com Comment : Yes having something like lastname age city is introducing a wide row . To determine when this is appropriate read up on the basics of data-modeling http : www.datastax.com dev blog basic-rules-of-cassandra-data-modeling . Next for the case of 36 : Beverly Hills something similar in the planet Cassandra link too . Essentially what is happening is that Cassandra compacts the maps into one key- value by concatenating the key values in sorted order . This allows Cassandra to quickly retrieve and store data for you in sorted order and is also the reason for the WHERE filtering restrictions .", "Question : null .. . Answer : I want to know what is the difference between a persistent key-value DB and a wide-column DB . I understand in both DBs you retrieve a single value by a key so what is the difference between the types of the values Thanks", "Question : HBase and Cassandra are built as wide column stores using the concepts of both rows and columns . A row is composed of a key similar to the concept of primary-key in RDBMS and a value composed of several columns .. . .. . A representation can be the following : .. . .. . Is it correct at the application layer to build composed primary keys to allow to iterate quickly over colocated rows . This can be reprensented as follow . The name column moved from the Value to the Key and Value has a single column name value . .. . Answer : Composite keys are very popular in HBase schema design . They also allow you to do fast range scans on prefix component of Rowkey . Unlike Cassandra RowKey is not broken into Parts while storing data . Simple example : http : riteshadval.blogspot.com 2012 03 hbase-composite-row-key-design-doing.html .. . .. . .. . In HBase in your example you will be able to do range scans with identifier only and with identifier+name also .", "Question : HBase and Cassandra are built as wide column stores using the concepts of both rows and columns . A row is composed of a key similar to the concept of primary-key in RDBMS and a value composed of several columns .. . .. . A representation can be the following : .. . .. . Is it correct at the application layer to build composed primary keys to allow to iterate quickly over colocated rows . This can be reprensented as follow . The name column moved from the Value to the Key and Value has a single column name value . .. . Answer : Compound keys are used all the time when designing Cassandra schemas . In C the keys are broken down into two parts the partition key and clustering columns . The partition key is used to hash data to nodes within the cluster . A partition is a bucket of data that can hold a single row or multiple rows based on the clustering columns . Data within a partition is local to a node and is kept in sorted order by the clustering keys which makes accessing data within a partition fast and efficient with support for range queries on the clustering keys . C also allows data fields which are not part of the compound key and are not generally used in queries unless you create a secondary index on them . The wide column terminology is a little outdated for C . In the current CQL view of things data is thought of in more traditional terms as rows in a table that are grouped into efficient to access partitions . So to answer your question yes in C it is common to move columns that might have been thought of as data columns in an RDBMS to be part of the compound key in C . To see more information on partition keys and clustering columns and how they impact the types of queries you can do see a deep look at the CQL WHERE clause http : www.datastax.com dev blog a-deep-look-to-the-cql-where-clause ." ] }
[ "yes-answer-long", "yes-answer-short" ]
key-value
UNK_RELATION
jak@markup@93
jak -- java-api for kml short : jak provides java interfaces for easy access to kml keyhole @placeholder language data .
{ "confidence": [ 81.24432373046875, 81.24432373046875, 81.24432373046875, 73.69261932373047, 71.55967712402344, 67.9095687866211, 63.28011703491211, 61.527374267578125, 59.609710693359375, 59.609710693359375, 56.96199417114258, 53.3851432800293, 51.318607330322266, 51.318607330322266, 48.8079833984375, 46.24427795410156, 45.279273986816406, 45.279273986816406, 44.73289108276367, 44.73289108276367, 44.128257751464844, 42.92394256591797, 42.6831169128418, 42.6831169128418, 41.22616958618164, 40.844261169433594, 40.77123260498047, 40.56084060668945, 40.035404205322266, 39.66356658935547, 39.51979446411133, 39.166481018066406, 39.166481018066406, 39.133201599121094, 38.500919342041016, 38.400970458984375, 38.400970458984375, 38.39021301269531, 37.306880950927734, 37.1966552734375, 37.1966552734375, 36.810611724853516, 36.086883544921875, 36.086883544921875, 35.919925689697266, 35.74620819091797, 35.002559661865234, 35.002559661865234, 34.42959213256836, 34.42959213256836, 34.09965896606445, 33.79824447631836, 33.79824447631836, 33.79824447631836, 33.775333404541016, 33.775333404541016, 33.66585922241211, 33.60486602783203, 33.55217361450195, 33.31640625, 33.22528076171875, 32.40055465698242, 32.36393356323242, 32.36393356323242, 32.36393356323242, 32.36393356323242, 31.65909194946289, 31.530517578125, 31.530517578125, 31.530517578125, 31.530517578125, 31.530517578125, 31.159622192382812, 30.968196868896484, 30.968196868896484, 30.555252075195312, 30.46969985961914, 30.326202392578125, 30.101272583007812, 29.763885498046875, 29.763885498046875, 29.71622085571289, 28.80971908569336, 28.80971908569336, 28.80971908569336, 28.80971908569336, 28.80971908569336, 28.80971908569336, 28.80971908569336, 28.429447174072266, 28.320484161376953, 27.623212814331055, 27.60540771484375, 27.60540771484375, 27.60540771484375, 26.63446617126465, 26.63446617126465, 26.162006378173828, 25.430152893066406, 25.430152893066406 ], "content": [ "I m generating the KML using the Java API for KML JAK library .", "I am using Java API for KML JAK to construct KML files .", "I m using the Java API for KML JAK to write some KML .", "This seems to work with JAK- KML", "To realized this map I used a KML file the KML is generated with JAK API .", "I m currently using JAK Java API for KML to interact with Google Earth and a customized KML file .", "Is there a way to just add an image file into a kmz file using Java API for KML JAK", "Currently I m fooling with the sample Java code from the KML example at Micromata Labs JAK Example http : labs.micromata.de display jak HelloKML+ Quickstart .", "I ve been able to generate kml file with jak library .", "I am using the JAK library to generate some KML and creating a style .", "In this Matlab program it is using JAK to create a KML file for Google Earth .", "I m trying to import a mkl file with jak but i get the following error : .. . .. . javax.xml.bind.UnmarshalException : unexpected element uri : http : earth.google.com kml 2.2 local : kml .", "EDIT : I actually forgot that I removed the intermediate step of marshalling the JAK Kml object to a file before I zip it .", "I am unfamiliar with Jak but if you re using the OGC Schema http : schemas.opengis.net kml 2.2.0 ogckml22.xsd the namespace is different .", "I use KML object in java .", "If I end up going too in-depth then I might as well write the KML myself but I ve found the JAK library to be very useful so far .", "Obviously this code requires the JAK library .", "Then save it and re-process it using Jak", "I want to create the structure of the KML in Java .", "I m trying to parse a Kml file in Java .", "Try this labs.micromata.de projects jak quickstart.html http : labs.micromata.de projects jak quickstart.html and then refactoring your code", "The quick start tutorial http : labs.micromata.de display jak HelloKML+ 28Quickstart 29 for JAK shows how to do that .", "I ve been using JAK for over a year on a project .", "Good to know some other people use JAK", "I saw sample code of them using DOM and XML but not pure Java JAK as such .", "I m working on a project that involves KML creation using Java .", "I ve been trying to figure out how to create a gx : Track with the current version of the Java API for KML .", "Even though JAK claims to support the latest 2.2 extensions the kml22gx.xsd that is packaged with the source code does not match the actual latest https : developers.google.com kml schema kml22gx.xsd csw 1 .", "I m using Geotools and JAK as libraries for this project .", "My original version of the question left out two facts that turned out to be relevant : 1 I m using the Java API for KML to generate this and 2 the XML namespaces inside kml .", "I use it to create the KML then I marshal it as just plain KML not KMZ .", "I try to write this with JAK library with the function KML.marshal but it not successFul .", "I cannot or I dont know how to do in JAK structure", "in the kml object .", "This way works fine : .. . .. . I try to write a java program using JAK that generate a most possibile equal file but it doesn t work with Maps .. . .. . That s program :", "updated with kml value .", "Only KMl object", "Here example code using JAK API that creates two placemarks in a folder then removes one by its id .", "I m not actually a Java guy really but you could use the Java XML libraries to pre-process an XML doc check the namespace and change it if necessary before handing it off to Jak .", "Right but that is pure KML .", "ns2 in KML file", "I m very new towards kml and java so please help me out .", "In the KML document Style definitions refer to your resources files with paths relative to the KML document itself .", "I view ns3 : in your kml this make the kml invalid for google-maps .. . .. . Try to correct the file", "Once every second I can see that the marshal API routine does indeed create a KML file with my data .", "This will fully avoid the prefixes on kml elements :", "It looks like the KML that was generated was completely valid .", "The KML file is considered to be at the root of the KMZ archive .", "JAK doesn t let you change the namespaces but you can strip it manually from the marshaled string .", "Can someone detail the build-process for taking new XSD s and generating a new jak", "JAK http : labs.micromata.de projects jak.html depends on the Java Architecture for XML Binding JAXB http : docs.oracle.com javase tutorial jaxb intro index.html for the underlying XML serialization .", "Posting the resulting kml would be helpful as well .", "Unfortunately I cannot map these layers in one kml .", "Because I m forced to use only a kml file .", "Or easier read the file in as text and do a regex to find earth.google.com kml 2.2 http : earth.google.com kml 2.2 and change it to the right namespace .", "enter image description here http : i.stack.imgur.com hAjFm.png .. . .. . URL To test a KML File : .. . .. . http : display-kml.appspot.com .. . .. . Content of the KML File :", "A Container https : developers.google.com kml documentation kmlreference container extends Feature and can be a Document https : developers.google.com kml documentation kmlreference document or a Folder https : developers.google.com kml documentation kmlreference folder .. . .. . To make a long story short if you want multiple Placemarks you need to include them in a Document or a Folder", "In Java code I spawn a Thread which every second gathers DIS packets from a simulator and tries to format KML output .", "To put more than one Placemark in a KML file you need a Folder or a Document .. . .. . A basic kml element contains 0 or 1 Feature https : developers.google.com kml documentation kmlreference kml .. . .. . A Feature https : developers.google.com kml documentation kmlreference feature is an abstract element that can be a Placemark https : developers.google.com kml documentation kmlreference placemark .", "Everytime refreshing server will send the latest update KML data with new data to GE .", "Can you try this code .. . .. . It produces for me .. . .. . If not I ll hunt for other changes I might have made to the jak code .", "This is an example of the kml I receive from my code : .. . .. . What I want is something like this : .. . .. . This is my java code : .. . .. . Any help is much appreciated", "But i can t produce more den 1 placemark in the kml file .", "I then was able to select the correct functions to add elements to the KML tree dynamically .", "This is the code : .. . .. . And this is the kml file : .. . .. . Any other solutions are also welcome", "I write manually a KML file trying to import some polygons in MyMaps .", "Here is the resulting KML output : .. . .. . I can t seem to access the Document again to add more placemarks .", "I m posting it here in the hope that someone else posts an alternate solution that uses only JAK so I can retire this code in the future .", "I know it s wrong but i didn t make the files and i have more then 1700 of them.. . What do you use instead of jak", "I m using Play Framework 2.1 and I want to use the library Javaapiforkml http : labs.micromata.de display jak HelloKML+ 28Quickstart 29 .", "I don t want to overwrite the JAK marshaller so I m hoping there s a simple way to ensure my exact string is carried over to the file .", "Finally building jak from schema involved way more than just using XSD they used Perl scripts to do customizations it wasn t pretty", "This site offers KML by passing just the zip code www.kmlaccess.com", "I finally figured this out after reading this Google KML Group post http : groups.google.com group kml-support-server-side-scripting msg 22355adfe5f3bdcb for the umpteenth time .", "Details as : .. . .. . How to make a dynamic Auto refresh 3D Tracking : .. . .. . 1 . prepare a RestFul service to generate KML file from DB KML sample as inside above link .. . .. . 2 .", "I think the better solution to resolve my problem it s maybe to parse the kml file with the geoxml3 api and after use the parsed elements directly with the api .", "The current setup looks like this extraneous XML namespaces stripped for clarity CLIENT ID is a GUID-like string : .. . .. . Root KML file served from http : server kml CLIENT ID : .. . .. . Initial content KML served from http : server kmlupdates CLIENT ID : .. . .. . Later update KML served from http : server kmlupdates CLIENT ID : .. . .. . If anyone has any suggestions on what I m missing here I d greatly appreciate it .", "But my problem is that i m using JAK https : code.google.com p javaapiforkml this library to parse it and i m not able to extract the information that i want .", "I have to say that this a weird API since you have to cast a Feature to see what it is actually instanceof is actually bas practice in OOP I guess those guys know what they have to deal with when they wanted to make an API for kml and the kml xml schema forced them do it this way .", "you need to add the second placemark to the document element so the resulting kml has the structure as specified above currently you are adding it to the kml element not the document element .", "Your KML can have have a default infowindow - check the construction of Placemarks https : developers.google.com kml documentation kml tut placemarks to get started : The name description should show in v3 .", "I was trying to generate KML file from a text file .", "just saw your other question on marshaling and the hints about KML files being text-files .", "I m using the JavaAPIForKml http : code.google.com p javaapiforkml to generate large KML objects and marshal them to a file .", "For some reason removing that from the KML allows the Update tags to actually change the items in Google Earth .", "You have .. . .. . The OGC namespace is .. . .. . The Google extension schema http : code.google.com apis kml schema kml22gx.xsd uses .. . .. . as well .", "The namespace you re using was used by Google before KML was given to the OGC as an open standard .", "But when I click on this polygon as you see in the kml display the display of the tooltip is cut Click on the zone map .", "KML is an XML format so you must add the JAXB jars to your classpath .", "In google-api v3 I have used markers with no icon to display text is there something similar in kml", "So for example if my kml file has this placemark in it contained by a Document and then the overall KML tag : .. . .. . How can I grab that png url to say put in a separate String object", "I can create a kml file with no problem but I m trying to just embed a resources such as an images folder with some image files but the marshalAsKmz method takes only Kml objects as additional files so I can t figure out how to just include extra images .", "After that the path to the coordinates is the following just as it come in the kml-file : .. . .. . Here is how it looks like in code :", "Also you have to note that there may other xml-namespaces included in a kml document such as gs xal and so on .. .", "I didn t know you could import KML into Google Maps or didn t remember .", "A KMZ is nothing more than a .zip archive that contains exactly one .kml file and 0 or more resource files such as images etc .", "My utility method below will marshal the Kml object directly to the ZipOutputStream . .. . .. . Here is a utility class that I created to do just what I have described .", "I generate a KML file and that for each cell in the grid is represented by a polygon and the polygon is coloured based on the value of the cell .", "But I would like to know if it s possible to done something directly in the kml without the addlistener javascript I think maybe with the description balise or something else .", "Additionally you can use ExtendedData https : developers.google.com kml documentation extendeddata and a template for more structured infowindows if you don t want to hardcode everything in the description ." ] }
{ "confidence": [ 86.61083984375, 84.15715789794922, 83.59758758544922, 82.83760070800781, 82.61268615722656, 82.4605484008789, 80.94729614257812, 78.91679382324219, 76.31289672851562, 75.93241882324219, 72.85526275634766, 71.82510375976562, 70.33955383300781, 70.2129135131836, 68.64784240722656, 68.37457275390625, 67.80272674560547, 64.45873260498047, 63.13718032836914, 61.668914794921875 ], "content": [ "Question : Is there a way to just add an image file into a kmz file using Java API for KML JAK I can create a kml file with no problem but I m trying to just embed a resources such as an images folder with some image files but the marshalAsKmz method takes only Kml objects as additional files so I can t figure out how to just include extra images . .. . Answer : I ve been using JAK for over a year on a project . I use it to create the KML then I marshal it as just plain KML not KMZ . I created a separate utility class that uses the Java SE Zip classes to manually create the KMZ . It works just fine . A KMZ is nothing more than a .zip archive that contains exactly one .kml file and 0 or more resource files such as images etc . The only difference is that you name the file as .kmz instead of .zip when you output it . In the KML document Style definitions refer to your resources files with paths relative to the KML document itself . The KML file is considered to be at the root of the KMZ archive . If your resource files are also located in the root of the KMZ .zip then you don t need a path just the filename . EDIT : I actually forgot that I removed the intermediate step of marshalling the JAK Kml object to a file before I zip it . My utility method below will marshal the Kml object directly to the ZipOutputStream . .. . .. . Here is a utility class that I created to do just what I have described . I m posting it here in the hope that someone else posts an alternate solution that uses only JAK so I can retire this code in the future . For now this will do the job for you . NOTE : If you don t use slf4j Apache Commons Lang or Commons I O then just make a few adjustments to the code to remove replace those bits with your own code . Obviously this code requires the JAK library .", "Question : I m trying to import a mkl file with jak but i get the following error : .. . .. . javax.xml.bind.UnmarshalException : unexpected element uri : http : earth.google.com kml 2.2 local : kml . Expected elements are .. . and then a big list .. . .. . Does anyone else run into this problem This is the code : .. . .. . And this is the kml file : .. . .. . Any other solutions are also welcome .. . Answer : I am unfamiliar with Jak but if you re using the OGC Schema http : schemas.opengis.net kml 2.2.0 ogckml22.xsd the namespace is different . You have .. . .. . The OGC namespace is .. . .. . The Google extension schema http : code.google.com apis kml schema kml22gx.xsd uses .. . .. . as well . The namespace you re using was used by Google before KML was given to the OGC as an open standard . Comment : I know it s wrong but i didn t make the files and i have more then 1700 of them.. . What do you use instead of jak Comment : I m not actually a Java guy really but you could use the Java XML libraries to pre-process an XML doc check the namespace and change it if necessary before handing it off to Jak . Comment : i looked at jaxb which looks good but it s quite complex to start with since my school assignments aren t that long . Comment : Yeah Jaxb is heavyweight . Here s a couple of options : Just use DOM parsing something like this : java-samples.com showtutorial.php tutorialid 152 http : www.java-samples.com showtutorial.php tutorialid 152 . Or easier read the file in as text and do a regex to find earth.google.com kml 2.2 http : earth.google.com kml 2.2 and change it to the right namespace . Then save it and re-process it using Jak", "Question : I write manually a KML file trying to import some polygons in MyMaps . This way works fine : .. . .. . I try to write a java program using JAK that generate a most possibile equal file but it doesn t work with Maps .. . .. . That s program : Comment : Where does the ns3 : come from Comment : Hello @stefano-r . Did you find solution for your problem I m experiencing the same issue but I have ns2 prefix . Can t find a way to get rid of it . Comment : nope i had to manual editing files . .. . Answer : I view ns3 : in your kml this make the kml invalid for google-maps .. . .. . Try to correct the file Comment : I cannot or I dont know how to do in JAK structure Comment : Try this labs.micromata.de projects jak quickstart.html http : labs.micromata.de projects jak quickstart.html and then refactoring your code", "Question : I m working on a project that involves KML creation using Java . Currently I m fooling with the sample Java code from the KML example at Micromata Labs JAK Example http : labs.micromata.de display jak HelloKML+ Quickstart . I tried to extend the code by adding multiple coordinates and getting two markers but I could not get it to work . Can you please tell me how I can add multiple coordinates and put markers on them and also draw a line between the markers . Thank you for your help PS : I need to do this via the program . I saw sample code of them using DOM and XML but not pure Java JAK as such . Please guide me . I got as far as this updated : .. . .. . But I know I m going wrong somewhere . Please point me in the right direction . Here is the resulting KML output : .. . .. . I can t seem to access the Document again to add more placemarks . How do I do it .. . Answer : Basically you need to do : .. . .. . Previously you were creating a new document and setting it as the only document in the kml object . Therefore only the last entry was shown .", "Question : null .. . Answer : I m using the Java API for KML JAK to write some KML . Basically I have a route and at each vertex of the route is a waypoint . Each waypoint has the potential for having a different icon image so the desired KML looks something like this : .. . .. . Instead I get something like this : .. . .. . I m trying to understand what is forcing tags like scale and refreshInterval to be in the KML that I am writing if I haven t specified scale I don t want the tag in there at all . The .xsd that JAK is built on shows that minOccurs 0 for these elements and I ve tried explicitly setting the values to -1.0 and setting the @XmlElement required false though I m completely new to all of this so I m not even sure that has an affect on writing xml or just reading it . I should add that I haven t changed the .xsd files yet so here s the relevant part that helped generate code : .. . .. . Any ideas on what I need to change to make it so these tags aren t included with 0.0s If I end up going too in-depth then I might as well write the KML myself but I ve found the JAK library to be very useful so far .", "Question : I m working on a project that involves KML creation using Java . Currently I m fooling with the sample Java code from the KML example at Micromata Labs JAK Example http : labs.micromata.de display jak HelloKML+ Quickstart . I tried to extend the code by adding multiple coordinates and getting two markers but I could not get it to work . Can you please tell me how I can add multiple coordinates and put markers on them and also draw a line between the markers . Thank you for your help PS : I need to do this via the program . I saw sample code of them using DOM and XML but not pure Java JAK as such . Please guide me . I got as far as this updated : .. . .. . But I know I m going wrong somewhere . Please point me in the right direction . Here is the resulting KML output : .. . .. . I can t seem to access the Document again to add more placemarks . How do I do it .. . Answer : To put more than one Placemark in a KML file you need a Folder or a Document .. . .. . A basic kml element contains 0 or 1 Feature https : developers.google.com kml documentation kmlreference kml .. . .. . A Feature https : developers.google.com kml documentation kmlreference feature is an abstract element that can be a Placemark https : developers.google.com kml documentation kmlreference placemark . A Container https : developers.google.com kml documentation kmlreference container extends Feature and can be a Document https : developers.google.com kml documentation kmlreference document or a Folder https : developers.google.com kml documentation kmlreference folder .. . .. . To make a long story short if you want multiple Placemarks you need to include them in a Document or a Folder Comment : Right but that is pure KML . I want to create the structure of the KML in Java . And as you can see I tried doing that . I added a new Document and created a Placemark . How do I add the second one in the code Comment : you need to add the second placemark to the document element so the resulting kml has the structure as specified above currently you are adding it to the kml element not the document element . Comment : I see . I will try it out and let you know if and when I go wrong with it. . Thanks : Comment : Please update your question with your latest version it is very difficult to read code posted in comments . TO me it looks like you are now creating two documents both with the name MyMarkers . Posting the resulting kml would be helpful as well .", "Question : I m working on a project that involves KML creation using Java . Currently I m fooling with the sample Java code from the KML example at Micromata Labs JAK Example http : labs.micromata.de display jak HelloKML+ Quickstart . I tried to extend the code by adding multiple coordinates and getting two markers but I could not get it to work . Can you please tell me how I can add multiple coordinates and put markers on them and also draw a line between the markers . Thank you for your help PS : I need to do this via the program . I saw sample code of them using DOM and XML but not pure Java JAK as such . Please guide me . I got as far as this updated : .. . .. . But I know I m going wrong somewhere . Please point me in the right direction . Here is the resulting KML output : .. . .. . I can t seem to access the Document again to add more placemarks . How do I do it .. . Answer : The documentation is very bad .", "Question : I m trying to parse a Kml file in Java . Cause I need to take the coordinates of a Placemark to generate a poligon in java and use it . But my problem is that i m using JAK https : code.google.com p javaapiforkml this library to parse it and i m not able to extract the information that i want . I read the help in the official page but I didn t found any help abut my problem .. . .. . I m trying to do something like that : .. . .. . But in this point I don t know how to extract the coordinates . The file I m trying to parse is this one : la basa https : docs.google.com file d 0B8PlqUAyTdXPNFNUWmRvVGlVUkk edit usp sharing Comment : The quick start tutorial http : labs.micromata.de display jak HelloKML+ 28Quickstart 29 for JAK shows how to do that . Did you try it .. . Answer : Following the javadocs https : code.google.com p javaapiforkml downloads detail name JavaAPIforKml-apidocs.zip unofficial http : www.nilab.info docs jak091130 you need to check - using instanceof - each Feature whether is is a Placemark if yes cast to it and get the Geometry which itself needs to be checked whether it is a Polygon if yes then cast to it . After that the path to the coordinates is the following just as it come in the kml-file : .. . .. . Here is how it looks like in code : Comment : Amazing it works perfect I did t see the Javadocs : S sorry But I Download it and I m gonna read it . I m new in Java and there are things that I don t understand at all but I ll read these jdocs to understand the api And again..... . THANKS Comment : You re welcome I have to say that this a weird API since you have to cast a Feature to see what it is actually instanceof is actually bas practice in OOP I guess those guys know what they have to deal with when they wanted to make an API for kml and the kml xml schema forced them do it this way . A good help for you would be to look at a Feature in the debugger to see what inside it . Also you have to note that there may other xml-namespaces included in a kml document such as gs xal and so on .. . They also are documented in the javadoc .", "Question : I m building an application that serves up data to a standalone Google Earth client . I want to send over an initial set of data then update it dynamically using NetworkLinkControl and Update cookie tags as things change on the server . I m generating the KML using the Java API for KML JAK library . Unfortunately while I can confirm that GE is refreshing my NetworkLink and pulling down the Updates I m sending none of my updates are showing up in GE . After lots of reading it seems like it might be that the Update s targetHref might be the issue but I m 99.9 sure I m sending over the same string . Part of what has me confused is that I ve seen conflicting info on whether or not the cookie element s value needs to be appended to targetHref . I did actually see one early prototype updating when I was serving up hand-written test KML files from a static server URL so I suspect it s not . Actually that s what s frustrating at the moment : I ve seen updating work on my own machine but can t get it working now with what looks like valid and correct KML . The current setup looks like this extraneous XML namespaces stripped for clarity CLIENT ID is a GUID-like string : .. . .. . Root KML file served from http : server kml CLIENT ID : .. . .. . Initial content KML served from http : server kmlupdates CLIENT ID : .. . .. . Later update KML served from http : server kmlupdates CLIENT ID : .. . .. . If anyone has any suggestions on what I m missing here I d greatly appreciate it . Thanks .. . Answer : My original version of the question left out two facts that turned out to be relevant : 1 I m using the Java API for KML to generate this and 2 the XML namespaces inside kml . I finally figured this out after reading this Google KML Group post http : groups.google.com group kml-support-server-side-scripting msg 22355adfe5f3bdcb for the umpteenth time . The problem is the last XML namespace xmlns : xal . For some reason removing that from the KML allows the Update tags to actually change the items in Google Earth . JAK doesn t let you change the namespaces but you can strip it manually from the marshaled string . Absolutely bizarre but at least I found a solution .", "Question : I am using Java API for KML JAK to construct KML files . I would like to be able to delete a feature using its ID but I have not found a good example of how to do so . Ideally the code would be myFolder.deleteFeatureById theID but that is not the case . Is there any better method than the following .. . Answer : In Java you need to compare strings using String.equals method not the logical operator . checks if two things are EXACTLY the same thing not if they have the same content so some string comparisons can be equal same string but test differently with . The following should work . Here example code using JAK API that creates two placemarks in a folder then removes one by its id . Related details on this issue : .. . .. . .. . http : www.javapractices.com topic TopicAction.do Id 18 .. . http : programmers.stackexchange.com questions 193638 why-didnt-operator-string-value-comparison-make-it-to-java Comment : Noted . This has nothing to do with my question though . I wanted to know of a way to delete placemarks from folders documents not how to properly compare strings . Comment : Updated answer with code example that removes a folder by its id .", "Question : I am using the JAK library to generate some KML and creating a style . For some reason the URL is being malformed and its turning into amp .. . .. . Result .. . .. . What I need .. . .. . I didnt think it was java causing the problem but I could be wrong . The value seems to be correct all the way up until its written using .marshall .. . .. . I dont think cdata will work .. . .. . Cdata approach results in Comment : Bare ampersands are invalid in XML they need to be escaped to amp stackoverflow.com questions 1328538 http : stackoverflow.com questions 1328538 how-do-i-escape-ampersands-in-xml 1328557 1328557 Comment : CDATA might work also http : stackoverflow.com questions 1328538 how-do-i-escape-ampersands-in-xml 1328563 1328563 Comment : updated with kml value . I dont think cdata will work for an href Comment : I attempting to replace the in the url to amp but it just replaced it with amp amp . I also tried just amp but that didnt work either . Nor did amp amp .. . Comment : Does anyone have ideas on why I cannot put an amp in the href on a XML .. . Answer : This seems to work with JAK- KML", "Question : Is there any way to remove the extra namespace prefix i.e . ns2 in KML file This is an example of the kml I receive from my code : .. . .. . What I want is something like this : .. . .. . This is my java code : .. . .. . Any help is much appreciated Thanks Comment : possible duplicate of Java : Marshalling Object -- Removing extra ns2 annotation in xml http : stackoverflow.com questions 7014746 java-marshalling-object-removing-extra-ns2-annotation-in-xml Comment : I did not get any solution from there .. . .. . Answer : Can you try this code .. . .. . It produces for me .. . .. . If not I ll hunt for other changes I might have made to the jak code . Comment : Unfortunately this doesn t solve Google Maps problem . Their implementation expects no prefixes at all it seems including kml : It seems that source package have to have different annotation : Remove namespace prefix while JAXB marshalling http : stackoverflow.com a 22755785 194624 Comment : I didn t know you could import KML into Google Maps or didn t remember . Anyway I m pretty sure at a certain point I did manage to remove prefixes completely by playing with XMLStreamWriter properties docs.oracle.com javase 7 docs api javax xml stream https : docs.oracle.com javase 7 docs api javax xml stream XMLStreamWriter.html", "Question : I use KML object in java . I want to export this object to file . I try to write this with JAK library with the function KML.marshal but it not successFul . I get this error : .. . .. . I don t want use XML or String format . Only KMl object please- help me thanks .. . Answer : JAK http : labs.micromata.de projects jak.html depends on the Java Architecture for XML Binding JAXB http : docs.oracle.com javase tutorial jaxb intro index.html for the underlying XML serialization . KML is an XML format so you must add the JAXB jars to your classpath . These dependencies can be found in the POM.XML for the project . https : github.com micromata javaapiforkml blob master pom.xml .. . .. . If you use maven to build you can add the jaxb entries directly to your pom.xml file but they should be downloaded automatically if you add the JavaAPIforKml entry as shown below : .. . .. . Or you can download the jars directly and add them to your classpath : .. . http : download.java.net maven-2 com sun xml bind jaxb-impl 2.2 jaxb-impl-2.2.jar .. . http : download.java.net maven-2 javax xml bind jaxb-api 2.2 jaxb-api-2.2.jar .. . .. . Likewise you can directly search for the jars in Central Maven repository : .. . https : search.maven.org browse Comment : The versions you point to are quite old already . Also JAXB is now distributed via the Central Maven repo it is not recommended to use download.java.net .", "Question : I m trying to import a mkl file with jak but i get the following error : .. . .. . javax.xml.bind.UnmarshalException : unexpected element uri : http : earth.google.com kml 2.2 local : kml . Expected elements are .. . and then a big list .. . .. . Does anyone else run into this problem This is the code : .. . .. . And this is the kml file : .. . .. . Any other solutions are also welcome .. . Answer : Here is my quick and dirty way : Comment : nice clever solution", "Question : I ve been trying to figure out how to create a gx : Track with the current version of the Java API for KML . Even though JAK claims to support the latest 2.2 extensions the kml22gx.xsd that is packaged with the source code does not match the actual latest https : developers.google.com kml schema kml22gx.xsd csw 1 . Can someone detail the build-process for taking new XSD s and generating a new jak .. . Answer : I got the jar from someone on Google Groups here it is : https : drive.google.com file d 0B1Y3FuLhrOkHdDRNNTlpaGJuQTg edit usp sharing .. . .. . PS I may have made some little changes Comment : Given that this is a production project I can t just start including random jars from the internet . I appreciate it and I ll fool around with this one but I d at least need the source as well . Comment : production is a strong word . This project although a good one is abandonware . Feel free not to use this jar I won t get offended . Comment : By the way jar decompilers work quite well sourceforge.net projects jadclipse http : sourceforge.net projects jadclipse Comment : Finally building jak from schema involved way more than just using XSD they used Perl scripts to do customizations it wasn t pretty Comment : I sent an e-mail to info@micromata.de letting them know our intentions . I figured that would at least be the polite thing to do .", "Question : I m trying to parse a Kml file in Java . Cause I need to take the coordinates of a Placemark to generate a poligon in java and use it . But my problem is that i m using JAK https : code.google.com p javaapiforkml this library to parse it and i m not able to extract the information that i want . I read the help in the official page but I didn t found any help abut my problem .. . .. . I m trying to do something like that : .. . .. . But in this point I don t know how to extract the coordinates . The file I m trying to parse is this one : la basa https : docs.google.com file d 0B8PlqUAyTdXPNFNUWmRvVGlVUkk edit usp sharing Comment : The quick start tutorial http : labs.micromata.de display jak HelloKML+ 28Quickstart 29 for JAK shows how to do that . Did you try it .. . Answer : Came across this post so here is part of the code of function I have been using in my app to extract Place mark name coordinates from a String kmlText .", "Question : I m trying to import a mkl file with jak but i get the following error : .. . .. . javax.xml.bind.UnmarshalException : unexpected element uri : http : earth.google.com kml 2.2 local : kml . Expected elements are .. . and then a big list .. . .. . Does anyone else run into this problem This is the code : .. . .. . And this is the kml file : .. . .. . Any other solutions are also welcome .. . Answer : The namespace is incorrect but if you have 1700 files and this is the only problem you might consider simply using the two-argument form of Kml.unmarshal File file boolean validate . I ve also used the following cheezy perl script to correct my files .", "Question : Currently i m having a project which requires to set placemarks and link them with polylines i suppose lines which have an arc to it with properly segmented portions to the arc . I ve been able to generate kml file with jak library . But i can t produce more den 1 placemark in the kml file . And i m quite stuck at the link of paths . http : www.barnabu.co.uk google-earth-complete-us-air-routes .. . .. . This website is something that is close to what i m required to do . I m very new towards kml and java so please help me out . Thanks in advance . .. . Answer : As I don t know where-in the development-process you are stuck I may give only a generic advise at this stage : .. . .. . It helped me a lot to create a sample KML file by hand and determine the structures I needed for my GE API project . I then was able to select the correct functions to add elements to the KML tree dynamically . Check the code used by this http : dauda.at locator page - maybe you can get some inspirations .. . .. . Hope that helps Comment : just saw your other question on marshaling and the hints about KML files being text-files . Note : function PaintSubField Coord in js file found in above page link does exactly that .. . peek in Comment : Thanks Mike i will check on the website soon . Any more help from anyone would be appreciated as well . Thanks", "Question : In Java code I spawn a Thread which every second gathers DIS packets from a simulator and tries to format KML output . In my Java code I am creating a Document with Styles and Placemarks and Polygons . Once every second I can see that the marshal API routine does indeed create a KML file with my data . However randomly sometimes it creates a complete file and sometimes it creates a zero-length file . Even when I turn my DIS packet generator off and leave my Java code still running it continues to randomly create a complete file and sometimes create a zero-length file . When I change my timer from every second to every 10 seconds the behavior occurs every 10 seconds . I tried using marshal to a File object and to an OutputStream object Same weird behavior . .. . Answer : It could be due to concurrent access . Creating a marshaller is an expensive operation it takes time and as far as I know marshallers are not threadsafe . I use the jaxb connector in Restlet coupled with JAK and that s a good example https : github.com restlet restlet-framework-java blob master modules org.restlet.ext.jaxb src org restlet ext jaxb internal Marshaller.java on how to create marshallers and cache them in a threadsafe way : .. . .. . See there how the marshaller is created in a synchronized method and then stored in a ThreadLocal variable .", "Question : I write manually a KML file trying to import some polygons in MyMaps . This way works fine : .. . .. . I try to write a java program using JAK that generate a most possibile equal file but it doesn t work with Maps .. . .. . That s program : Comment : Where does the ns3 : come from Comment : Hello @stefano-r . Did you find solution for your problem I m experiencing the same issue but I have ns2 prefix . Can t find a way to get rid of it . Comment : nope i had to manual editing files . .. . Answer : I had the same problem . Instead of using kml.marshal new FileWriter D : prova.kml I did this.. . .. . .. . With a NameSpaceBeautifier like this .. . .. . .. . Hope this helps. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
markup
UNK_RELATION
markup@formatting@102
markup -- markup covers various systems for annotating text with extra information which defines its @placeholder or appearance .
{ "confidence": [ 36.659156799316406, 35.172462463378906, 34.149452209472656, 33.58924865722656, 33.51778793334961, 31.550865173339844, 31.103893280029297, 30.74225425720215, 30.170347213745117, 30.017894744873047, 30.017894744873047, 29.684877395629883, 29.623109817504883, 29.623109817504883, 29.488893508911133, 29.337446212768555, 28.899391174316406, 28.899391174316406, 28.899391174316406, 28.88655662536621, 28.88655662536621, 28.88655662536621, 28.812484741210938, 28.706504821777344, 28.676136016845703, 28.676136016845703, 28.676136016845703, 28.676136016845703, 28.548709869384766, 28.339191436767578, 28.12009048461914, 28.05365562438965, 27.84323501586914, 27.84323501586914, 27.84323501586914, 27.708250045776367, 27.556991577148438, 27.556991577148438, 27.556991577148438, 27.556991577148438, 27.556991577148438, 27.556991577148438, 27.556991577148438, 27.506378173828125, 27.363866806030273, 27.2338809967041, 27.2338809967041, 27.112823486328125, 26.890621185302734, 26.890621185302734, 26.86346435546875, 26.844980239868164, 26.844980239868164, 26.844980239868164, 26.799793243408203, 26.724090576171875, 26.724090576171875, 26.724090576171875, 26.724090576171875, 26.669544219970703, 26.63642692565918, 26.40097999572754, 26.28733253479004, 26.197887420654297, 26.123329162597656, 26.057720184326172, 26.057720184326172, 26.057720184326172, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 26.053972244262695, 25.98894691467285, 25.803525924682617, 25.7258358001709, 25.7258358001709, 25.7258358001709, 25.7258358001709, 25.7258358001709, 25.673980712890625, 25.61835289001465, 25.54429817199707, 25.40957260131836 ], "content": [ "All that said most markup systems on text have markup structure and raw text .", "I want to do .. . .. . Any other suggestions for how to markup the text so that it has a more structured appearance for the reader are also welcome .", "It will just display the markup text as is .", ".. . -webkit-appearance : none .. . -moz-appearance : none .. . .. . .. . .. . input value This is editable .. . br .. . input value this is readonly readonly .. . .. . By this method you don t have to change the HTML markup only add the readonly property when you need .", "It currently just displays the markup text .", "What is the best way in Silverlight then to display text with markup", "However this seems to problematic in at least Chrome and Firefox that is when using inspect element in Chrome the figure and the p text markup are reported to be like : .. . .. . Which effectively orphans the text The relationships between.. . outside of its p markup losing its styling and semantic meaning.. . at least to the human viewer of the website page .", "What should the proper markup be", "Markup : .. . .. . JS :", "There are many good markup languages and generally the more natural the markup is the higher the probability that users will use to do markup .", "The rest of the markup can be quite simple with focus on easy-writability of markup I find MediaWiki markup somewhat ugly sometimes .", "Then the question becomes : Which is the better markup language", "Table with markup and tr td .. . .. . 2 .", "I m sorry but this markup is totally wrong .", "HTML markup and Microdata markup are two separate worlds .", "Is it microformat markup", "The specific markup language used by StackOverflow is called Markdown .", "I am using creole as markup language on BitBucket .", "I found it out the markup language is Doxia .", "I am wondering if there is a correct way to markup text that is referring to a labelled diagram .", "Not all text has sufficient meaning to warrant semantic-markup .", "Markup is just a way of providing functionality above plain text .", "Could you include minimal markup", "The trick is to insert the markup into the markup editor Ctrl+Shift+D and it should work.. .", "A question about HTML5 markup .", "Is there no standards in writing semantic-markup", "Instead use HTML markup .", "Is RST markup also supported", "understand what is markup and what is text otherwise e.g .", "Such markup is used :", "Unordered list with ul markup and li div .. . .. . 3 .", "Some of our colored markup text is hard-coded in the XML .", ".. . .. . The Return of Spaghetti Markup", "Markup tool will look like this .. . .. .", "Is there an accepted way to markup such a scenario", "See gmail markup reference https : developers.google.com gmail markup reference order .", "that depends on what you want to markup .", "However the content is having wikipedia markup .", "Advantage : one click creation of markup .", "You should not see those in markup .", "Can you point this strange markup", "Don t store state in the Markup extension .", "Markdown is a play on words because it is markup .", "As an example I read the following HTML markup builder code in a web2py application reddish : .. . .. . Writing this code by plain HTML markup results in this : .. . .. . I find the plain HTML markup easier to read .", "The following markup uses the figure element to display an image inline with the text of a paragraph -- hence the figure is included inside the first p .", "So my question is this : which of the two markup patterns is more appropriate", "Which markup would you use for a language switcher element", "What do XAML Markup Extensions have to do with this", "Another alternative would be to dump wiki-markup languages at all and instead allow a set of defined HTML tags for markup .", "Markup is a general term for content formatting - such as HTML - but markdown is a library that generates HTML markup .", "I m looking for a script that parses markup like the one used in wikis and in stackoverflow.. .", "Below is the markup of 1 product .", "Does it has to be in markup", "I don t see the markup .", "My videos already have the video object markup but i wanted to include additional information about the video as a product .", "That seems like a lot of extraeneous markup .", "Copy the relevant markup into your question .", "Come up with some proprietary markup .", "Is there a way to markup just company details", "This page is a compilation of links descriptions and status reports of the various alternative MediaWiki parsers that is programs and projects other than MediaWiki itself which are able or intended to translate MediaWiki s text markup syntax into something else .", "Use CSS if you care only about how something looks like and always try to avoid any extra markup .", "One workaround would be to create a markup extension which does the construction e.g .", "one that generates static HTML and I found myself ensnared in markup languages templating systems etc .", "The problem is that when I got to insert a new piece of markup Confluence wont format the text if there is a large amount of text .", "But what i want is a java API which will take a HTML file content as input and give me the Wiki markup text .", "For a small number of items I can just copy over the generated markup into Confluence s markup editor and it will output correctly .", "Is there a free online polyglot-markup validation service that will correctly identify and validate polyglot-markup", "yep : I spend a little time watching the code of markup extensions with DotPeek and it seems there is no alternative for naming markup extensions .", "I ve been wrestling with semantic-markup tonight", "Here is the list of supported markup formats .. . .. . 1 .", "if you want to markup something in a link put span into a", "It doesn t matter when you re writing markup .", "class footnote is emulating markup semantics and is incorrect as well .", "I m using RepeatLayout Flow to avoid the markup for a table .", "What are some Pros Cons to wysiwyg markup .", "I m still looking for one for MediaWiki markup .", "The key is an extension for an already existing markup language .", "Does WordPress have MarkUp API within itself", "They should be valid in polyglot-markup as far as I m aware .", "The good news is that in polyglot-markup this won t be an issue .", "However : .. . .. . Polyglot markup is not constrained : .. . .. . to be valid XML .", "No I m asking for a markup language to NOT have to learn HTML5", "I have made my Markup language .", "Im a little lost on how to render the markup .", "So I need to have the markup in the html file .", "@user3312508 There are a lot of ways to drop your markup into the viewmodel .", "Included in your markup it displays the metadata it is able to extract .", "@MarcS : see You s answer for proper markup .", "I m perfectly ok with and prefer some kind of markup .", "I have a lot of unstandardised HTML Mixed in with a bunch of Wiki markup in which I need to strip certain tags and various brackets from it .", "For polyglot-markup I still add an extra space before the self closing tags .", "What would you need the markup for", "The resulting markup is likely more accurate .", "But there is no valid HTML markup to fit in this easily .", "Use it to markup the headers of your columns .", ": THIS IS NOT JUST ABOUT THE CUSTOM MARKUP EXTENSIONS .", "The Image WebControl will not take such markup .", "You wouldn t want to hear speech like The new version of HyperText Markup Language is HyperText Markup Language five which has-many extensions to HyperText Markup Language four . .. . .. . Third language markup is largely write-only .", ".. . .. . Update report : I tried to implement the markup extension myself with all the information I could find in internet .", "The word definition dumps which are my main interest are in raw wiki-markup which is not html nor xml etc . but its own unique format ." ] }
{ "confidence": [ 37.444000244140625, 37.064212799072266, 36.58028030395508, 36.36610794067383, 33.96112060546875, 33.937679290771484, 33.833412170410156, 33.03685760498047, 32.75929641723633, 32.68165969848633, 32.45158004760742, 32.445770263671875, 32.34765625, 32.1324577331543, 32.023460388183594, 31.972721099853516, 31.865375518798828, 31.749691009521484, 31.70929718017578, 31.6184024810791 ], "content": [ "Question : I m writing some documentation using Sphinx . Is there a way to format headings within a page which do not become part of the TOC Ideally with some hierarchy that is reflected in formatting E.g . I want to do .. . .. . Any other suggestions for how to markup the text so that it has a more structured appearance for the reader are also welcome . Comment : How about rubric http : sphinx-doc.org markup para.html highlight rubric directive-rubric Comment : I m using rubrics at the moment and semantically that s exactly what I want . My problem with this is that there is no way to do anything hierarchical with these . .. . Answer : You can create custom styles for rubrics that mimic your heading styles . 1 In your ReST source define custom styles like this : .. . .. . Here style is the handle to refer to these in ReST and class is the CSS class name . 2 Use the above as inline styles in rubrics : .. . .. . 3 In whatever CSS file makes sense define styles for the new classes : .. . .. . Here the whatever could be identical to existing styles for H1 H2 etc . if you wish . Note : in step 3 you could define the CSS selectors more broadly or narrowly . If the new class names are globally unique the selector could be as simple as .class1 or if you want to use the style just for top-level rubrics like my example you could use p.rubric span.class1 instead .", "Question : I m writing some documentation using Sphinx . Is there a way to format headings within a page which do not become part of the TOC Ideally with some hierarchy that is reflected in formatting E.g . I want to do .. . .. . Any other suggestions for how to markup the text so that it has a more structured appearance for the reader are also welcome . Comment : How about rubric http : sphinx-doc.org markup para.html highlight rubric directive-rubric Comment : I m using rubrics at the moment and semantically that s exactly what I want . My problem with this is that there is no way to do anything hierarchical with these . .. . Answer : Docutils http : docutils.sourceforge.net the reference implementation of reStructuredText upon which Sphinx is built allows you to pass options to the table of contents directive http : docutils.sourceforge.net docs ref rst directives.html table-of-contents which allow you to control how deep you want your table of contents to go into your document hierachy . From the reStructuredText documentation http : docutils.sourceforge.net docs ref rst directives.html the contents directive takes a depth option : .. . .. . depth : integer .. . .. . The number of section levels that are collected in the table of contents . The default is unlimited depth . So to get your document structure with only your top level headings included in the table of contents you could use .. . .. . Edit : It seems that Sphinx implements its own table of contents directive http : sphinx-doc.org markup toctree.html so you can use .. . .. . instead of the first code block above . Also take a look at the hidden option this might be useful to control further the levels included in the table of contents . Comment : For now I m using the depth setting and with the present document structure this is not a problem . Structures where there are different depths per branch are not possible however . A practical example would be an Introduction section which I may want to subdivide but where these divisions are certainly not of the same importance as those of a Device Administration section . I d want the subdivisions of the latter in the TOC but not those of the former .", "Question : Suppose you re developing a web site and blind users will be a significant chunk of your target market . If the web site includes document editing functionality what would be appropriate WYSIWYM http : en.wikipedia.org wiki WYSIWYM tools Are languages like Markdown http : daringfireball.net projects markdown dingus Textile http : textile.thresholdstate.com and Wiki Formatting http : www.mediawiki.org wiki Help 3aFormatting really accessible or are they inconvenient to blind users Comment : I ll just note that blind people are usually not interested in formatting or display options . I d guess that simple text entry would be sufficient . Comment : @Gilbert Le Blanc - Agreed . But this is why I asked about WYSIWYM http : en.wikipedia.org wiki WYSIWYM instead of WYSIWYG http : en.wikipedia.org wiki WYSIWYG there are still markup languages for annotating content denoting headers code blocks quotations etc.. . in a non-presentation way . .. . Answer : Picture yourself working in pure text 80x4 display just open a console and resize appropriately then use vi emacs ed and you ll soon realize what markup will get in the way . Try to do as much work as possible to understand plain text else use light markup like POD http : perldoc.perl.org perlpod.html finally things like AsciiDoc http : www.methods.co.nz asciidoc are very powerful but needs training .", "Question : Please identify the most popular lightweight markup languages and compare their strengths and weaknesses . These languages should be general-purpose markup for technical prose such as for documentation for example Haml doesn t count . See also : Markdown versus ReStructuredText http : stackoverflow.com questions 34276 markdown-versus-restructuredtext Comment : See also superuser.com questions 209897 text-formatter-tools http : superuser.com questions 209897 text-formatter-tools 209902 209902 .. . Answer : I am attempting to cover all the various lightweight markup languages here : .. . .. . http : www.subspacefield.org travis static blog generators.html .. . .. . As you can see it started with how can I make a secure blog - i.e . one that generates static HTML and I found myself ensnared in markup languages templating systems etc . Update .. . .. . I refocused only on LWMLs with python implementations and theyre here : .. . .. . http : www.subspacefield.org travis python lightweight markup languages.html .. . .. . So far I ve tried markdown and ReST and I like the latter better for anything but HTML snippets embedded in other pages . Tables cross refs indirect links etc.. .", "Question : Suppose you re developing a web site and blind users will be a significant chunk of your target market . If the web site includes document editing functionality what would be appropriate WYSIWYM http : en.wikipedia.org wiki WYSIWYM tools Are languages like Markdown http : daringfireball.net projects markdown dingus Textile http : textile.thresholdstate.com and Wiki Formatting http : www.mediawiki.org wiki Help 3aFormatting really accessible or are they inconvenient to blind users Comment : I ll just note that blind people are usually not interested in formatting or display options . I d guess that simple text entry would be sufficient . Comment : @Gilbert Le Blanc - Agreed . But this is why I asked about WYSIWYM http : en.wikipedia.org wiki WYSIWYM instead of WYSIWYG http : en.wikipedia.org wiki WYSIWYG there are still markup languages for annotating content denoting headers code blocks quotations etc.. . in a non-presentation way . .. . Answer : On a web page the most accessible embedded text-editor for blind users is one that uses standard HTML such as a textarea element with a corresponding label element : .. . .. . If a WYSIWYM tool is built using standard accessible HTML then blind users can easily enter text into it with full confidence that they re entering text in the right place . Then the question becomes : Which is the better markup language They all require memorization but some may be more intuitive than others . One way to find out which is best would be to do some usability testing with a wide variety of target users . Also be sure to providing easy accessible access to syntax help . Comment : I m not thinking about the intuitive nature of the language as much as I m wondering what it s like to have to listen to Markdown through a screen reader . Wouldn t it sounds something like Title of my post equals-equals-equals-equals-equals-equals-equals-equals-equals back-tick a code snippet back-tick.. . and wouldn t that suck : P Comment : Whether and how a screen reader announces all the markup is up to the user - screen-readers have highly configurable verbosity levels . There would need to be some detail in order for users to understand the structure of the text but I don t think it would be all that bad . An easy-to-access preview feature would be nice too so folks can read the text without the markup chatter then jump or toggle back to the editable version to make changes .", "Question : Please identify the most popular lightweight markup languages and compare their strengths and weaknesses . These languages should be general-purpose markup for technical prose such as for documentation for example Haml doesn t count . See also : Markdown versus ReStructuredText http : stackoverflow.com questions 34276 markdown-versus-restructuredtext Comment : See also superuser.com questions 209897 text-formatter-tools http : superuser.com questions 209897 text-formatter-tools 209902 209902 .. . Answer : The Wikipedia page on lightweight markup languages http : en.wikipedia.org wiki Lightweight markup language has a good comparison between the various options as well as showing syntax for common uses headings bold italics etc .", "Question : The following markup uses the figure element to display an image inline with the text of a paragraph -- hence the figure is included inside the first p . However this seems to problematic in at least Chrome and Firefox that is when using inspect element in Chrome the figure and the p text markup are reported to be like : .. . .. . Which effectively orphans the text The relationships between.. . outside of its p markup losing its styling and semantic meaning.. . at least to the human viewer of the website page . Moving the figure outside of the p seems to have more predictable results i.e . : .. . .. . But we kinda lose the textwrap effect when the figure is text-align ed left or right . Is this proper use of figure the former example Is the fault with the browser Safari Firefox Chrome all produce slightly different unexpected interpretations What should the proper markup be .. . Answer : The figure element is block level and therefore the behavior is correct . Permitted parent tags are those that allow flow elements - http : dev.w3.org html5 markup figure.html example div section article.. . .. . .. . Therefore the figure tag should be placed outside the p tag . You can float it to allow for wrap . Comment : Permitted parent elements of figure is any element that can contain flow elements where p belongs-to . w3c.github.io html-reference figure.html http : w3c.github.io html-reference figure.html w3c.github.io html-reference http : w3c.github.io html-reference common-models.html common.elem.flow Comment : It has been 5 years . I think the specification might have changed .", "Question : Suppose you re developing a web site and blind users will be a significant chunk of your target market . If the web site includes document editing functionality what would be appropriate WYSIWYM http : en.wikipedia.org wiki WYSIWYM tools Are languages like Markdown http : daringfireball.net projects markdown dingus Textile http : textile.thresholdstate.com and Wiki Formatting http : www.mediawiki.org wiki Help 3aFormatting really accessible or are they inconvenient to blind users Comment : I ll just note that blind people are usually not interested in formatting or display options . I d guess that simple text entry would be sufficient . Comment : @Gilbert Le Blanc - Agreed . But this is why I asked about WYSIWYM http : en.wikipedia.org wiki WYSIWYM instead of WYSIWYG http : en.wikipedia.org wiki WYSIWYG there are still markup languages for annotating content denoting headers code blocks quotations etc.. . in a non-presentation way . .. . Answer : I m a blind programmer and while I haven t used most of the languages you mention I ve found that any markdown language is fairly easy to use if you have the desire to learn it . I ve had no problem using either HTML or several markup languages for wiki s . Part of it will depend on how invested the users are in your site . If it s a site that will be visited infrequently or for short periods of time it s much less likely that a user will take the time to learn the required markup whether they are blind or not . Unfortunately I have not found an accessible JavaScript WYSIWYG editor but I find it easier to manually enter the markup so haven t looked very hard . Comment : +1 for first-hand experience.. . but I m also curious whether this would still hold true for a less technical user ie not a programmer", "Question : I am using Confluence to display a list of items taken from an XML file where each item is displayed as a small table containing its appropriate attributes . I am using an external program to generate the wiki-markup which represents how I want the data to look on the Confluence web page . For a small number of items I can just copy over the generated markup into Confluence s markup editor and it will output correctly . But when the number of items is very large it currently is and will only get bigger Confluence does not format the markup text into the correct output . It will just display the markup text as is . An example : .. . .. . How it should look : .. . .. . enter image description here https : cdn.pbrd.co images vz5T2Zu.png .. . .. . How it actually looks : .. . .. . Is there a way to make Confluence format my text even when there is a large amount 30k+ lines of it Comment : Copying is not the best way imo . I would create a macro that would load and parse the xml and then present it through velocity . Secondly can you try debug why this happens Edit a page that looks bad and check source code . Maybe ending tags missing Comment : I will look into using macros thanks The problem is that when I got to insert a new piece of markup Confluence wont format the text if there is a large amount of text . Comment : Let me know if you need me to explain my situation in more details I m quite new to confluence . Comment : I haven t had to opportunity to insert such big amount of markup go for some hardcoded macro like load all your lines in some java objects and render them into a velocity file or even hardcode them in the velocity file . This might help developer.atlassian.com confdev tutorials https : developer.atlassian.com confdev tutorials macro-tutorials-for-confluence creating-a-new-confluence-macro .. . Answer : The Wiki-markup hasn t been working for me for some time form the page directly . The trick is to insert the markup into the markup editor Ctrl+Shift+D and it should work.. .", "Question : Markup for different editions of my news site.. . .. . .. . US Edition : .. . .. . html lang en-US xml : lang en-US .. . html .. . .. . .. . India Edition : .. . .. . html lang en-IN xml : lang en-IN .. . html .. . .. . .. . Europe Edition in this case not a specific country i.e . news covers a broader region : .. . .. . html lang en-EU xml : lang en-EU .. . html .. . .. . .. . I am depending on the markup of the page to make the target language region of pages clear to the search engines because the different editions of the news site use a directory-based path e.g . example.com eu rather than a sub-domain eu.example.com or domain e.g . example.eu based path . Now coming to the point the lang attribute can have a value that is of the format language-region . But is en-EU a valid value PS : I think so but I d like to confirm with the knowledgeable folks here . Based on : http : www.iana.org assignments language-subtag-registry language-subtag-registry .. . .. . Via : http : www.w3.org International articles language-tags Comment : Because RFC 3066 didn t provide a list of valid subtags and just referred users to ISO 639 there was sometimes confusion about how to tag languages .. . . Now all valid subtags are listed in a single IANA registry http : www.iana.org assignments language-subtag-registry language-subtag-registry . Ctrl + F in this registry does not show any entry for en-EU Comment : No it is not : msdn.microsoft.com en-us library ms533052 vs.85 .aspx http : msdn.microsoft.com en-us library ms533052 vs.85 .aspx Comment : @RobW Wrong . The language codes and region codes are listed separately . For instance you can t find en-US either . Search for European Union and you ll see Subtag : EU . Comment : The lang attribute does not indicate the target language region of pages . It .. . specifies the primary language for the element s contents and for any of the element s attributes that contain text HTML5 . So it has nothing to do with the location of the target audience of your page . .. . Answer : Why not 1 . HTML5 CR defines http : www.w3.org TR 2013 CR-html5-20130806 dom.html the-lang-and-xml 3alang-attributes that the value must be a valid BCP 47 language tag or the empty string . 2 . BCP 47 http : www.ietf.org rfc bcp bcp47.txt defines that the IANA Language Subtag Registry contains a comprehensive list of all of the subtags valid in language tags . 3 . IANA Language Subtag Registry http : www.iana.org assignments language-subtag-registry contains the subtag EU of type region . It s not up to anyone to formally define if or which linguistic variations are spoken in which regions . Language changes constantly speakers live and die everywhere .", "Question : When you are developing a web-based application and you want to allow richly formatted text from the user you have to make a choice about how to allow that input . Many different markup languages have been created because it is arguably more difficult to sanitize HTML . What are the advantages and disadvantages of the various different markup languages like : .. . .. . HTML http : en.wikipedia.org wiki HTML .. . Markdown http : daringfireball.net projects markdown .. . BBCode http : en.wikipedia.org wiki BBCode .. . Textile http : www.textism.com tools textile .. . MediaWiki markup http : www.mediawiki.org .. . other http : en.wikipedia.org wiki Lightweight markup language .. . .. . Or to put it differently what factors do you consider when choosing to use a particular markup language . .. . Answer : Markdown BBCode Textile MediaWiki markup are all basically the same general concept so I would really just lump this into two categories : HTML and plain text markup . HTML .. . .. . The deal with HTML is the content is already in a presentable form-for web content . That s great saves processing time and it s a readily parse-able language . There are dozens of libraries in pretty much any language to handle HTML content convert to from HTML to other formats etc . The main downside is that because of the loose standards of the early web days HTML can be incredibly variable and you can t always depend on sane input when accepting HTML from users . As pointed out tidying or santizing HTML is often very difficult especially because it fails to follow normal markup rules the way XML does i.e . improperly closed tags are common . Plain Text Markup .. . .. . This category is frequently used for the following reasons : .. . .. . Easy to parse into multiple forms from one source - PDF HTML RTF .. . Content is stored in readable plain text usually much easier to read than raw HTML if needed at some later date rather than needing to extract from the HTML .. . Follows specific defined rules where HTML can be annoying variable and unstructured .. . Allows you to force a subset of content formatting that s more appropriate in many cases than simply allowing full HTML .. . In addition to forcing a subset of HTML makes it easy to sanitize input and prevent cross site scripting problems etc . Keeping the raw data in an abstracted format means that at a later date if you for instance wanted to convert your site from HTML 4 to XHTML you only need to change the parsing code . With HTML formatted user input you re stuck now having to convert all the HTML to XHTML individually which as HTML Tidy shows is not always a simple task . Similarly if a new markup language comes along at some point or you need to move to an alternative format RTF PDF TeX an abstracted restricted subset of text formatting options makes that a much simpler task . Bottom line is what is the user input being used for . If you re planning to keep the data around and may need to shuffle formats etc . then it makes sense to use a careful abstract format to store the information . If you need to work with the raw data manually for any reason then bonus points if that format is easily human-readable . If you re only displaying the content in a web page or HTML doc for a report etc . and you have no concerns about converting it or future-proofing it then it s a reasonable practice to store it in HTML .", "Question : I m developing a wiki with Python Django partly for educational purposes . Up to now I m still missing the right markup language . I tried quite a view including Creole and Markdown which worked well except for the table support . Common wiki-markup languages seem to support only rudimentary tables i.e . a single line per cell or no complex markups within cells . But the users of my wiki want to be able to create tables with bigger formatet text and lists within the cells . I have my problems with finding a markup language which actually can do this . I ve gazed upon the MediaWiki markup language which seems to support everything but I think using this would be overkill . The rest of the markup can be quite simple with focus on easy-writability of markup I find MediaWiki markup somewhat ugly sometimes . Furthermore there must be a Python module for translating markup into HTML which I can use in the webapp . I m still looking for one for MediaWiki markup . Another alternative would be to dump wiki-markup languages at all and instead allow a set of defined HTML tags for markup . But that makes it harder to write wiki articles since HTML is not invented for such use . and also finding and escaping forbidden HTML could be quite tricky . I would rather have a nice markup language with a lightweight Python implementation . Does anyone know of a markup language with extended table support and an implementation in Python which I could use Thanks in advance .. . Answer : I don t know if it meats your needs but you could use reStructuredText http : docutils.sourceforge.net rst.html . Sphinx http : sphinx.pocoo.org generates html from it for the python documentation and its written in python so it should be easy to use for this purpose . I find it very neat and easy to read as its designed to be and it can do quite complicated tables . Comment : +1 although I am not sure if rest is a markup language . Comment : I suppose the exact definition of a markup language is a bit varied so I don t know if rest does technically fall into this category but its easy to write easy to read and compiles to good-looking html so its probably quite a good candidate for this sort of usage . Comment : Thanks for the suggestion . reST does indeed support everything I need and has even integration in Django . However I don t find it that easy to read for non-techies and even harder too write if you look at the actual markup for a complex table . At least I would nt like being forced to adapt the whole column if one cell has grown a little . I would like to know how Python developers do that Anyway thank you Comment : Yes complex tables are a bit tricky but so far I have never actually needed to use one . The only reason for using a complex table rather than a simple one is if the first column needs to be wordwrapped which for me just never happens .", "Question : I m developing a wiki with Python Django partly for educational purposes . Up to now I m still missing the right markup language . I tried quite a view including Creole and Markdown which worked well except for the table support . Common wiki-markup languages seem to support only rudimentary tables i.e . a single line per cell or no complex markups within cells . But the users of my wiki want to be able to create tables with bigger formatet text and lists within the cells . I have my problems with finding a markup language which actually can do this . I ve gazed upon the MediaWiki markup language which seems to support everything but I think using this would be overkill . The rest of the markup can be quite simple with focus on easy-writability of markup I find MediaWiki markup somewhat ugly sometimes . Furthermore there must be a Python module for translating markup into HTML which I can use in the webapp . I m still looking for one for MediaWiki markup . Another alternative would be to dump wiki-markup languages at all and instead allow a set of defined HTML tags for markup . But that makes it harder to write wiki articles since HTML is not invented for such use . and also finding and escaping forbidden HTML could be quite tricky . I would rather have a nice markup language with a lightweight Python implementation . Does anyone know of a markup language with extended table support and an implementation in Python which I could use Thanks in advance .. . Answer : I have found a solution myself since I found reST to complicated to use for technically inexperienced users . I might be a bit elaborate but it works for me . The key is an extension for an already existing markup language . I found Markdown rather pleasant despite its lack of table support . Using Python-Markdown here http : freewisdom.org projects python-markdown Writing Extensions is everything you need to know for writing your own extension . It s not that complicated . I hacked something together in half an hour and it actually works so far . I would show the code here but I m not really proud of it yet Basically you parse a markup block and insert the table elements in the DOM as you like . I guess every usable implementation of a markup language should have some kind of extension mechanism so it should be possible to write extensions for other languages and implementations too . That s not the most convenient solution but still better than using some ugly language just for the feature s sake .", "Question : I am using Confluence to display a list of items taken from an XML file where each item is displayed as a small table containing its appropriate attributes . I am using an external program to generate the wiki-markup which represents how I want the data to look on the Confluence web page . For a small number of items I can just copy over the generated markup into Confluence s markup editor and it will output correctly . But when the number of items is very large it currently is and will only get bigger Confluence does not format the markup text into the correct output . It will just display the markup text as is . An example : .. . .. . How it should look : .. . .. . enter image description here https : cdn.pbrd.co images vz5T2Zu.png .. . .. . How it actually looks : .. . .. . Is there a way to make Confluence format my text even when there is a large amount 30k+ lines of it Comment : Copying is not the best way imo . I would create a macro that would load and parse the xml and then present it through velocity . Secondly can you try debug why this happens Edit a page that looks bad and check source code . Maybe ending tags missing Comment : I will look into using macros thanks The problem is that when I got to insert a new piece of markup Confluence wont format the text if there is a large amount of text . Comment : Let me know if you need me to explain my situation in more details I m quite new to confluence . Comment : I haven t had to opportunity to insert such big amount of markup go for some hardcoded macro like load all your lines in some java objects and render them into a velocity file or even hardcode them in the velocity file . This might help developer.atlassian.com confdev tutorials https : developer.atlassian.com confdev tutorials macro-tutorials-for-confluence creating-a-new-confluence-macro .. . Answer : For that type of processing use Bob Swift s Confluence CLI https : marketplace.atlassian.com plugins org.swift.confluence.cli . The CLI can upload the generated wiki-markup as a new page or update existing pages .", "Question : I am using Confluence to display a list of items taken from an XML file where each item is displayed as a small table containing its appropriate attributes . I am using an external program to generate the wiki-markup which represents how I want the data to look on the Confluence web page . For a small number of items I can just copy over the generated markup into Confluence s markup editor and it will output correctly . But when the number of items is very large it currently is and will only get bigger Confluence does not format the markup text into the correct output . It will just display the markup text as is . An example : .. . .. . How it should look : .. . .. . enter image description here https : cdn.pbrd.co images vz5T2Zu.png .. . .. . How it actually looks : .. . .. . Is there a way to make Confluence format my text even when there is a large amount 30k+ lines of it Comment : Copying is not the best way imo . I would create a macro that would load and parse the xml and then present it through velocity . Secondly can you try debug why this happens Edit a page that looks bad and check source code . Maybe ending tags missing Comment : I will look into using macros thanks The problem is that when I got to insert a new piece of markup Confluence wont format the text if there is a large amount of text . Comment : Let me know if you need me to explain my situation in more details I m quite new to confluence . Comment : I haven t had to opportunity to insert such big amount of markup go for some hardcoded macro like load all your lines in some java objects and render them into a velocity file or even hardcode them in the velocity file . This might help developer.atlassian.com confdev tutorials https : developer.atlassian.com confdev tutorials macro-tutorials-for-confluence creating-a-new-confluence-macro .. . Answer : Try https : marketplace.atlassian.com plugins org.swift.confluence.table - This renders a Confluence table using the JSON Table macro https : bobswift.atlassian.net wiki display TBL JSON+Table+Macro which is part of the Advanced Tables for Confluence add-on . XML to JSON should be the easier part .", "Question : It seems that as of right now there is little to no support in HTML5 for semantic-markup using RDFa or Microformats . I ve done a little bit of reading but if I were to start using HTML5 right now what could I do to support semantic-markup such as microformats and Semantic Web technologies such as RDFa If I want to utilize these technologies now should I stick with XHTML Comment : If you ve not already found it see dev.w3.org html5 rdfa http : dev.w3.org html5 rdfa .. . Answer : Some years have passed .. . .. . For semantically annotating your content in HTML5 documents you can use Microdata Microformats and or RDFa : .. . .. . Microdata http : www.w3.org TR 2013 NOTE-microdata-20131029 is an extension to HTML5 but now merely a W3C Working Group Note and it will not become a W3C Recommendation in the foreseeable future . It s still included https : html.spec.whatwg.org multipage microdata.html microdata and potentially under development in WHATWG s HTML Living Standard . Microformats http : microformats.org as in class values are obviously supported as these don t require any changes to the HTML language . Microformats as in rel values are supported as soon as they are registered in their own wiki under existing rel values : HTML5 link type extensions http : microformats.org wiki existing-rel-values HTML5 link type extensions this is the place where all link types have to be registered http : stackoverflow.com a 19866312 1591669 for HTML5 . RDFa http : www.w3.org TR 2013 REC-rdfa-core-20130822 is an extension to various markup languages including HTML5 http : www.w3.org TR 2013 REC-html-rdfa-20130822 . It can also be used in the form of the subset RDFa Lite http : www.w3.org TR 2012 REC-rdfa-lite-20120607 . All relevant specifications are W3C Recommendations .", "Question : When you are developing a web-based application and you want to allow richly formatted text from the user you have to make a choice about how to allow that input . Many different markup languages have been created because it is arguably more difficult to sanitize HTML . What are the advantages and disadvantages of the various different markup languages like : .. . .. . HTML http : en.wikipedia.org wiki HTML .. . Markdown http : daringfireball.net projects markdown .. . BBCode http : en.wikipedia.org wiki BBCode .. . Textile http : www.textism.com tools textile .. . MediaWiki markup http : www.mediawiki.org .. . other http : en.wikipedia.org wiki Lightweight markup language .. . .. . Or to put it differently what factors do you consider when choosing to use a particular markup language . .. . Answer : Many different markup languages have been created because it is arguably more difficult to sanitize HTML . Really How is it difficult There are functions to remove potentially dangerous attributes or tags and validate the HTML before you enter it in database or file . Can you give me examples of how it is difficult to sanitize HTML", "Question : Suppose you re developing a web site and blind users will be a significant chunk of your target market . If the web site includes document editing functionality what would be appropriate WYSIWYM http : en.wikipedia.org wiki WYSIWYM tools Are languages like Markdown http : daringfireball.net projects markdown dingus Textile http : textile.thresholdstate.com and Wiki Formatting http : www.mediawiki.org wiki Help 3aFormatting really accessible or are they inconvenient to blind users Comment : I ll just note that blind people are usually not interested in formatting or display options . I d guess that simple text entry would be sufficient . Comment : @Gilbert Le Blanc - Agreed . But this is why I asked about WYSIWYM http : en.wikipedia.org wiki WYSIWYM instead of WYSIWYG http : en.wikipedia.org wiki WYSIWYG there are still markup languages for annotating content denoting headers code blocks quotations etc.. . in a non-presentation way . .. . Answer : the first question is : how important is semantic structure could you get away with plain text . You could do simple parsing like treating blank lines as paragraph markers treating a series of lines which begin with as a bulleted list identify URLs and make them into links etc . As a blind developer myself I have no problem in understanding languages like Markdown . But if it s a syntax I m unfamiliar with I ll only learn it if I expect to use the site very often or care deeply about the content . Two final thoughts come to mind : while I certainly experience some accessibility challenges using TinyMCE you could develop something much simpler - provide less than 10 formatting options like inserting hyperlinks making lists centering text setting the style such as heading etc . And lastly when I talk to non-technical blind people they often just write their content in Word and paste into a wiki or blog post . This sounded strange when I first heard it but it does make sense . So an ideal solution would accept pasted in content . In closing - it depends how important this is and how much effort you want to expend . Maybe a Markdown editor with a live-preview like on this site buttons for inserting simple formatting like URLs and the ability to paste in rich text would tick all boxes : - Comment : +1 for leveraging what they re already using and supporting rich copy-paste Comment : I think it would be a bit better to strip down some mature markup language . Then you get ready to use tools and some of users may already know this markup language . And if they do not they can find lots of info about them . Otherwise you need to test your own implementation . And write DOCUMENTATION.. . So just trim something existing first", "Question : I am using Confluence to display a list of items taken from an XML file where each item is displayed as a small table containing its appropriate attributes . I am using an external program to generate the wiki-markup which represents how I want the data to look on the Confluence web page . For a small number of items I can just copy over the generated markup into Confluence s markup editor and it will output correctly . But when the number of items is very large it currently is and will only get bigger Confluence does not format the markup text into the correct output . It will just display the markup text as is . An example : .. . .. . How it should look : .. . .. . enter image description here https : cdn.pbrd.co images vz5T2Zu.png .. . .. . How it actually looks : .. . .. . Is there a way to make Confluence format my text even when there is a large amount 30k+ lines of it Comment : Copying is not the best way imo . I would create a macro that would load and parse the xml and then present it through velocity . Secondly can you try debug why this happens Edit a page that looks bad and check source code . Maybe ending tags missing Comment : I will look into using macros thanks The problem is that when I got to insert a new piece of markup Confluence wont format the text if there is a large amount of text . Comment : Let me know if you need me to explain my situation in more details I m quite new to confluence . Comment : I haven t had to opportunity to insert such big amount of markup go for some hardcoded macro like load all your lines in some java objects and render them into a velocity file or even hardcode them in the velocity file . This might help developer.atlassian.com confdev tutorials https : developer.atlassian.com confdev tutorials macro-tutorials-for-confluence creating-a-new-confluence-macro .. . Answer : a simpler way IMHO would be just to use the HTML plugin - it can render html or XSLT transformed XML files attached to a page or in the filesystem . I d try that first instead of rolling your own . https : bobswift.atlassian.net wiki display HTML XSLT+Macro .. . .. . no affiliation with Bob Swift", "Question : I m building a website that requires very basic markup capabilities . I can t use any 3rd party plugins so I just need a simple way to convert markup to HTML . I might have a total of 3 tags that I ll allow . What is the best way to convert Heading to h2 Heading h2 or --bold-- to b bold b Can this be done simply with Regex or does somebody have a simple function I m writing this in C but examples from other languages would probably work . Follow up : This is such a small part of my website that I liked the simplicity of using a simple Regex replace . I made this work in C with the following code : .. . .. . .NET uses 1 notation instead of the 1 notation that is used in other languages . Comment : blog.codinghorror.com parsing-html-the-cthulhu-way http : blog.codinghorror.com parsing-html-the-cthulhu-way .. . Answer : Maybe this http : www.mediawiki.org wiki Alternative parsers is what you need . This page is a compilation of links descriptions and status reports of the various alternative MediaWiki parsers that is programs and projects other than MediaWiki itself which are able or intended to translate MediaWiki s text markup syntax into something else ." ] }
[ "yes-answer-long", "yes-answer-short" ]
formatting
UNK_RELATION
apns-php@php@39
apns-php -- a full set of open-source @placeholder classes to interact with the apple push-notification service for the iphone ipad and the ipod-touch .
{ "confidence": [ 54.236873626708984, 52.01540756225586, 45.8150520324707, 43.93513488769531, 43.026885986328125, 42.78160858154297, 42.35383605957031, 38.75712585449219, 36.8621940612793, 36.07619094848633, 35.888389587402344, 35.249000549316406, 34.82587432861328, 34.80785369873047, 33.96464538574219, 33.58019256591797, 33.456817626953125, 32.92835235595703, 32.92153549194336, 32.60268783569336, 32.5487174987793, 32.5363655090332, 31.967208862304688, 31.779216766357422, 30.915510177612305, 30.568462371826172, 30.543699264526367, 30.405345916748047, 30.182851791381836, 29.966320037841797, 29.81131362915039, 29.463775634765625, 29.24566650390625, 29.24566650390625, 29.010299682617188, 28.94376564025879, 28.534963607788086, 28.19281768798828, 28.127920150756836, 27.93579864501953, 27.672664642333984, 27.672664642333984, 27.22157096862793, 27.21832275390625, 27.077617645263672, 26.957204818725586, 26.957204818725586, 26.957204818725586, 26.90900230407715, 26.759841918945312, 26.759841918945312, 26.263717651367188, 26.24551010131836, 26.160015106201172, 26.106342315673828, 26.106342315673828, 26.083053588867188, 25.893247604370117, 25.770191192626953, 25.637784957885742, 25.352630615234375, 25.339248657226562, 25.271432876586914, 24.989299774169922, 24.986495971679688, 24.915462493896484, 24.870874404907227, 24.846670150756836, 24.846670150756836, 24.846670150756836, 24.846670150756836, 24.81341552734375, 24.6790714263916, 24.66351318359375, 24.589927673339844, 24.29943084716797, 24.14425277709961, 24.14425277709961, 23.850093841552734, 23.838481903076172, 23.825332641601562, 23.782642364501953, 23.665531158447266, 23.652149200439453, 23.390335083007812, 23.390335083007812, 23.255769729614258, 23.122737884521484, 23.122737884521484, 23.076129913330078, 22.89703369140625, 22.880096435546875, 22.880096435546875, 22.878765106201172, 22.878765106201172, 22.878765106201172, 22.822010040283203, 22.822010040283203 ], "content": [ "APNs stands for the Apple Push Notification service .", "Possible duplicate of APNS Apple Push Notification Service reliability http : stackoverflow.com questions 13897575 apns-apple-push-notification-service-reliability", "Is it possible through some way through APNS Apple Push Notification service", "I have been working in an iOS project with APNS Apple Push Notification service + PHP Codeigniter library .", "To use Apple Push Notification service APNs your Mac and iOS clients need a direct and persistent connection to Apple s servers .", "I have learned these tutorials and apple document .. . .. . www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 .. . www.raywenderlich.com 3525 apple-push-notification-services-tutorial-part-2 .. . .. . We are pushing a notification from our server PHP to Apple Push Notification Server and APNS will push the notification to devices .", "I have a PHP script that sends push notifications to an Apple APNS server .", "Am new to Apple Push Notification services in iPhone app .", "APNs Provider API .. . .. . Apple Push Notification service includes the APNs Provider API that allows you to send remote notifications to your app on iOS tvOS and OS X devices and to Apple Watch via iOS .", "If I open execute this php-file with browser my iPhone receives the Notification and I receive a positive response from APNS .", "However there exists a feedback service described in the doc as : .. . .. . Apple Push Notification Service includes a feedback service that APNs continually updates with a per-application list of devices for which there were failed-delivery attempts", "I am following this great tutorial by Ali Hafizji on using APNS service for push notifications http : www.raywenderlich.com 32960 apple-push-notification-services-in-ios-6-tutorial-part-1 .", "i am trying to send apple push-notification using php i am using pem file for sending apple notification .", "Scenario 2 when logged in to IPAD with APP A and logged in to iPhone separate device with APP B Push notification is received for APP A and not for APP B .", "you can see related answer here http : stackoverflow.com questions 13897575 apns-apple-push-notification-service-reliability .. . .. . If you re not seeing Apple push notifications when you re connected to a network check with your network administrator to make sure related TCP ports are accessible .", "In my case I was using a PHP provider set as follows : .. . .. . I found the solution just modifying the url of the APNS service :", "I want to send multiple apple push-notification in an certain action .", "I have to know how we are posting push-notification in APN Server and how we push the notification to Apple APN Server And also how am i receive the notification from Apple and show the notification to user", "See the example at Working with Apple Push Notification http : learn-php-by-example.blogspot.com 2013 01 working-with-apple-push-notification.html to understand how to handle the return values .", "Scenario 1 When logged in to IPAD with APP A logged in to IPAD with APP B at the same time Push notification is received for APP A and not for APP B .", "I am facing issue with APNS php code for push-notification on IOS devices I have two separate connection for Development and Production .", "enter image description here http : i.stack.imgur.com OUPq0.png .. . .. . I m using apple push-notification service .", "is iphone apns-php not working for shared-hosting are you sure", "I m using simplepush.php to send Apple Push Notification to my phone .", "Please see this question : stackoverflow.com questions 10493949 http : stackoverflow.com questions 10493949 enable-disable-apple-push-notification-from-iphone-app", "On Android you have Google Cloud Messaging and on iOS Apple Push Notification Service .", "Production and Development push-notification certificates are different the push tokens received from Apple are different as well .", "I am trying to send APNS notification to invalid device token .", "I am using Push Notification service of my developer program .", "Scenario 3 when logged OUT from iPad with APP A and logged in to iPad same device or iPhone separate device with APP B Push notification is received App B . .. . .. . Im getting this error from apnsphp : .. . .. . Below are the logs :", "Post that you simply call the apple push servers to send a notification .", "But when I update this my certificate my php server can t push-notification Apple return error .. . .. . Unable to set private key file .. . .. . Seems problem come with recent update of Apple .", "now I am using my own linux server to send push-notification with the help of APNS and GCM .", "The most likely explanation is that you are sending a push-notification with a sandbox device token to the production APNS server .", "I have done apns code for php and objective-c from this Apns code http : www.easyapns.com .. . .. . and setup certificate from this link https : blog.serverdensity.com how-to-build-an-apple-push-notification-provider-server-tutorial .. . .. . Sandbox and production apns for sending notification to ios devices is working perfectly on my server.I moved code and same certificate to client-server then sending notification is not working .", "I use php to send push message to apns i use Enhanced notification format to sent . . but i can not get the return Codes in error-response packet anyone can help me", "I use a simple php script to send a push-notification from my server to my iPhone see below .", "Can you help me about how to implement sending notification with APNs http 2 from php", "I have one more doubt on Apple Push Notification can you please help on this .", "I am using the apns-php server provided at https : code.google.com p apns-php .", "is there a possibility of apns cert cache", "If it is not the same i will reconnect to apns .", "Am trying to setup apns-php in centos operating system.When i go through this link https : github.com immobiliare ApnsPHP .", "Testing APNS in production mode : .. . .. . To test APNS in production mode i archived the app for AdHoc distribution and installed it on device with iPhone Configuration Utility http : support.apple.com downloads iphone 20configuration 20utility .", "APNS PHP still works very well .", "How are you sending pushmagic payload using php-apns", "4 Consider using one of the numerous PHP APNS libraries .", "I am facing problem in connecting to APNS by using PHP .", "There is also another great tutorial by Ray Wenderlich which I used myself : .. . .. . http : www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 http : www.raywenderlich.com 3525 apple-push-notification-services-tutorial-part-2 .. . .. . Hope it helps you too .", "APNs then forwards the notification to your app on a specific user device .", "I received a notification from apns used this .pem certificate .", "I am trying to send push notifications using APNS .", "stackoverflow.com questions 18085086 http : stackoverflow.com questions 18085086 apple-push-notification-service-connection-through-proxy-timed-out-with-stream same problem not resolved caused by a proxy server the only way we found was to permits direct connections to apns", "URL : http : www.raywenderlich.com 3525 apple-push-notification-services-tutorial-part-2 .", "You will get sloutions from here code.google.com p apns-php wiki License https : code.google.com p apns-php wiki License .", "check this code.google.com p apns-php issues detail id 1 http : code.google.com p apns-php issues detail id 1", "we need not know that mdm payload cannot be send through apple push-notification service. . only we can send mdm : push magic token . . first try to install mdm payload manually. . after installation the device with payload will Initially first time will respond to check in url sending push magic token. . device token. . and udid. . then using push magic token we can send the push-notification .", "From here you can take a cue to proceed : raywenderlich.com 3443 http : www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12", "Now I am trying to execute the same php-file with the Command Prompt of my server by using this statement : .. . .. . I receive the same positive response from APNS as when I execute the php-file with my browser but my iPhone never receives the push-notification .", "I am trying to implement push-notification in apple and when i send the push it is sent locally from my machine but when i send it from a server it is not received on the device .", "I am sending a silent push-notification to my app then processing the content of the push-notification before deciding whether to send a local notification to the user .", "I m having trouble with using APNS with PHP and getting the following message : .. . .. . The problem only happens sometimes and other times it would actually send the push .", "this tutorial is useful please see http : mobiforge.com developing story programming-apple-push-notification-services .. . .. . when you receive push notificaion please NSLog userInfo .. . .. . push notificaion is come only one time pop is open for about 10 second Depend on notifcation type .. . if you click then didReceiveRemoteNotification delegte is call if you can t click any reason you see notificaion by go to setting- notification click...and check .. . .. . if you want store total push notifaction use the database and store in your database", "I m having problem with using APNS with PHP on Linux server .", "telnet .. . .. . Connection worked with telnet : .. . .. . pecl apn http : libcapn.org php-apn .. . .. . It didn t send push-notification .", "Check out this SO post for an idea how : PHP technique to query the APNs Feedback Server http : stackoverflow.com questions 1278834 php-technique-to-query-the-apns-feedback-server .. . .. . What you can do is have your iOS app record something whenever a push-notification arrives with application : didReceiveRemoteNotification but that only works if your app is running in the foreground .", "I want to generate push-notification in iOS device but from the server-side code I have no idea and my server-side code is in php .", "Everything works fine on localhost and my phone gets the push-notification successfully .", "Certificate .pem having issue that I was created for push-notification .", "What i have to done to send push-notification in production mode", "And what is the push-notification URL not sandbox url ssl : gateway.sandbox.push.apple.com : 2195 .. . .. . Thanks :", "APNs treats rapid connection and disconnection as a denial-of-service attack .", "If it s your only requirement there are many services to do this without creating specific backend like pusher push robot google push-notification service etc... . All take care of registration of the token .", "I am using php to send Push notifications .", "I know this is an old post but still I am contributing my comments to send push-notification for iOS iPhone as I have gone through the same issue once : .. . .. . I was able to connect through telnet over apple sandbox server but not with PHP socket script as it was giving gateway connection error .", "And seems I hate Apple Push Notifications .", "I was able to send a pushmagic payload using php-apns and the device sends a idle status as response to my server .", "I was wondering why the best APNS tutorials for PHP and other platforms advice you to sleep a little-o a lot", "Recent my certificate for push-notification time out so I must create new certificate Universal Push Notification Client SSL Certificate .", "MDM Server triggered APNS .. . 2 .", ".. . Keep your connections with APNs open across multiple notifications don t repeatedly open and close connections .", "I ve have set up th push-notification certificate but my code still throws an error on connect .", "This scenario works if my data is on while push-notification is triggered via APNS but only the latest one is received in case I am offline and come back after a while .", "The sandbox push service is rate limited .", "the code is based on reywenderlich s SimplePush that can be found here : http : www.raywenderlich.com 32960 apple-push-notification-services-in-ios-6-tutorial-part-1 .. . .. . The only part that need to change is the ck.pem file that will be different for each app .", "So the steps to proper cert generation are as follows : .. . .. . for detailed steps follow : http : www.raywenderlich.com 32960 apple-push-notification-services-in-ios-6-tutorial-part-1 .. . .. . Do this 6 steps separately for developer and then for production .", "Try some core PHP test notification separately .", "But I am not receiving any error-code response from APNS server .", "iOS devices try to connect to APNs using cellular data first .", "via my webspace and php i can send push notifications to the devices .", "I m totally frustrated and will appreciate any help . .. . .. . Thank you . .. . .. . The problem : .. . .. . The PHP code for sending Apple Push Notifications which successfully worked two weeks ago stopped to work now and throws following errors : .. . .. . It stopped to work on two separate servers which are using separate scripts for APNs sending .", "The problem is its taking time to response because its sending all the notification and response the web service call .", "I need web service call should response immediately and then it will send notification in background .", "I m using a dedicated-server to send push-notification to ios devices .", "Possible duplicate of Can a Webbased app have push-notification", "http : stackoverflow.com questions 4939698 can-a-webbased-app-have-push-notification", "Device receive the APNS and send idle response .. . 3 .", "after sending some messages to the APNS server ." ] }
{ "confidence": [ 61.119354248046875, 59.859737396240234, 57.9330940246582, 54.511985778808594, 54.3728141784668, 52.878116607666016, 51.2596549987793, 49.170265197753906, 47.35420608520508, 46.77027893066406, 46.39788818359375, 45.96424102783203, 44.83894348144531, 44.318782806396484, 44.235103607177734, 44.019287109375, 43.790977478027344, 42.52906036376953, 42.34656524658203, 42.330352783203125 ], "content": [ "Question : Am new to Apple Push Notification services in iPhone app . I have learned these tutorials and apple document .. . .. . www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 .. . www.raywenderlich.com 3525 apple-push-notification-services-tutorial-part-2 .. . .. . We are pushing a notification from our server PHP to Apple Push Notification Server and APNS will push the notification to devices . In this case how we can know the notification has delivered the user successfully or not from our server If we send notification to all subscribed users above 100 users can we have a delivery report for those 100 users .. . Answer : APNS does not tell you if a message is successfully delivered . The closest you can get is poll its Feedback Service https : developer.apple.com library ios documentation NetworkingInternet Conceptual RemoteNotificationsPG Appendixes BinaryProviderAPI.html apple ref doc uid TP40008194-CH106-SW4 to see if your app is uninstalled from a device . Check out this SO post for an idea how : PHP technique to query the APNs Feedback Server http : stackoverflow.com questions 1278834 php-technique-to-query-the-apns-feedback-server .. . .. . What you can do is have your iOS app record something whenever a push-notification arrives with application : didReceiveRemoteNotification but that only works if your app is running in the foreground . Comment : Hello Janson Wang . Thanks for your answer . I have one more doubt on Apple Push Notification can you please help on this . Please see my edited question . Thanks . Comment : Please see this question : stackoverflow.com questions 10493949 http : stackoverflow.com questions 10493949 enable-disable-apple-push-notification-from-iphone-app Comment : So is there a way to ensure that the server has actually notified the client using APNS If I have new data on the server that I need the client to have too how can I ensure that the client gets it Given that APSN does not guarantee delivery how could this be done", "Question : I have this function in php that will send 2 notifications to App A and App B when there is an action to the function . However I will only receive 1 notifications in one APP . I am using apnsphp to do the pushing of notifications . Below are my situation : I have a 2 app : app A and app B Both app are using different apns cert . is there a possibility of apns cert cache Scenario 1 When logged in to IPAD with APP A logged in to IPAD with APP B at the same time Push notification is received for APP A and not for APP B . Scenario 2 when logged in to IPAD with APP A and logged in to iPhone separate device with APP B Push notification is received for APP A and not for APP B . Scenario 3 when logged OUT from iPad with APP A and logged in to iPad same device or iPhone separate device with APP B Push notification is received App B . .. . .. . Im getting this error from apnsphp : .. . .. . Below are the logs : .. . Answer : I resolved it by editing the ApnsComponent file . i ve added in a new public variable : previousData This variable will be storing the current combined cert path it is connected . When i switch my cert path i will check if the cert path is the same as my connected cert path . If it is not the same i will reconnect to apns . If it is the same same path i will return true . The checking is to prevent server to reconnect and increase the sending time .", "Question : Am new to Apple Push Notification services in iPhone app . I have learned these tutorials and apple document .. . .. . www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 .. . www.raywenderlich.com 3525 apple-push-notification-services-tutorial-part-2 .. . .. . We are pushing a notification from our server PHP to Apple Push Notification Server and APNS will push the notification to devices . In this case how we can know the notification has delivered the user successfully or not from our server If we send notification to all subscribed users above 100 users can we have a delivery report for those 100 users .. . Answer : The Local and push-notification guide http : developer.apple.com library ios documentation NetworkingInternet Conceptual RemoteNotificationsPG Introduction Introduction.html says : .. . .. . The delivery of notifications is best effort and is not guaranteed . However there exists a feedback service described in the doc as : .. . .. . Apple Push Notification Service includes a feedback service that APNs continually updates with a per-application list of devices for which there were failed-delivery attempts Comment : Hello Vin . Thanks for your answer . I have one more doubt on Apple Push Notification can you please help on this . Please see my edited question . Thanks . Comment : should be posted as a separate question Comment : Yes thanks Vin . I will do it now . Comment : Please see this question : stackoverflow.com questions 10493949 http : stackoverflow.com questions 10493949 enable-disable-apple-push-notification-from-iphone-app Comment : you have already received answers there :", "Question : Development environment : .. . .. . iOS 9.3.2 iPh6ne 6+ .. . but it works on iOS 8.x .. . .. . Phonegap 6.2.7 .. . .. . Phonegap-plugin-push v1.7.2 .. . .. . PHP7 server-side - contentpush - ref https : cdn5.raywenderlich.com wp-content uploads 2016 03 WenderCast-Starter-1.1.zip .. . .. . My situation : .. . .. . 1 . the token was delivered to my server automatically .. . .. . 2 . message sent to ssl : gateway.push.apple.com 2195 successfully .. . .. . 3 . nothing received in device even alert .. . .. . push.on notification function data console.log data.message alert alert data.title+ Message : +data.message Comment : Possible duplicate of APNS Apple Push Notification Service reliability http : stackoverflow.com questions 13897575 apns-apple-push-notification-service-reliability .. . Answer : Apple doesn t give any guarantee on successful message delivery . you can see related answer here http : stackoverflow.com questions 13897575 apns-apple-push-notification-service-reliability .. . .. . If you re not seeing Apple push notifications when you re connected to a network check with your network administrator to make sure related TCP ports are accessible . To use Apple Push Notification service APNs your Mac and iOS clients need a direct and persistent connection to Apple s servers . iOS devices try to connect to APNs using cellular data first . If the device can t connect to Apple s servers over the cellular connection it then tries to connect using Wi-Fi . If you use Wi-Fi behind a firewall or a private Access Point Name APN for cellular data you ll need a direct unproxied connection to the APNs servers on these ports : .. . .. . The APNs servers use load-balancing so your devices won t always connect to the same public IP address for notifications . It s best to allow access to these ports on the entire 17.0.0.0 8 address block which is assigned to Apple . APNs stands for the Apple Push Notification service . APN stands for Access Point Name the gateway between a cellular data network and the Internet . check this link for same explanation http : support.apple.com en-in HT203609 .. . .. . and also check for How do I troubleshoot issues with Push Notifications on iOS https : support.layer.com hc en-us articles 204632870-How-do-I-troubleshoot-issues-with-Push-Notifications-on-iOS-", "Question : I have done apns code for php and objective-c from this Apns code http : www.easyapns.com .. . .. . and setup certificate from this link https : blog.serverdensity.com how-to-build-an-apple-push-notification-provider-server-tutorial .. . .. . Sandbox and production apns for sending notification to ios devices is working perfectly on my server.I moved code and same certificate to client-server then sending notification is not working . I debug all php code and found that it stops at this line of code .. . .. . apns.log file shows the error Failed to connect to APNS : 110 Connection timed out . Not getting the mistake . Why this error am i getting and not sending notification to ios devices Can anyone guide me for this Comment : Your client s server may be behind a firewall that blocks port 2195 . Comment : stackoverflow.com questions 18085086 http : stackoverflow.com questions 18085086 apple-push-notification-service-connection-through-proxy-timed-out-with-stream same problem not resolved caused by a proxy server the only way we found was to permits direct connections to apns Comment : ah a problem like this will occur when you are in a shared-hosting too Comment : Thanks to all for comment . Yes i have shared-hosting . Any solution for that Comment : Try to looking for a VPS or an external service for push-notification like push.io http : push.io or pushwoosh.com http : www.pushwoosh.com or openpush.im http : openpush.im .. . Answer : Finally i took vps instead of shared-hosting . Lucabro s comments helped me to solve . Thanks Lucabro . Comment : is iphone apns-php not working for shared-hosting are you sure Comment : @ReNiShAR Yes i am sure . Comment : I also ran into this problem with a script that was on shared-hosting . We told the host about the problem and they enabled port 2195 in their firewall for us - so that might be worth a try .", "Question : Recent my certificate for push-notification time out so I must create new certificate Universal Push Notification Client SSL Certificate . But when I update this my certificate my php server can t push-notification Apple return error .. . .. . Unable to set private key file .. . .. . Seems problem come with recent update of Apple . APNs Provider API .. . .. . Apple Push Notification service includes the APNs Provider API that allows you to send remote notifications to your app on iOS tvOS and OS X devices and to Apple Watch via iOS . This API is based on the HTTP 2 network protocol . Each interaction starts with a POST request containing a JSON payload that you send from your provider server to APNs . APNs then forwards the notification to your app on a specific user device . Anyone faced with it can help me . If have sample I will very appreciate . Thank alot .. . Answer : Finally I found out problem . Each certificate have an identity so with new certificate have new identity . If you don t check it in code PHP Apple will return error above . If anyone work with it and face same error they should check it . Comment : Hi . Can you help me about how to implement sending notification with APNs http 2 from php Some snippets or so.. . Thank you . Comment : @Jim75 You can using this : easyapns.com http : www.easyapns.com Comment : easyapns.com does not have any code for HTTP 2 that I can see . It s all the old interface .", "Question : I am developing an MDM solution . I have installed a configuration-profile on device . So I have all the required things like Device Token Push Magic String UDID of device etc . Now I want to send a mdm payload to the device using APNS . I am able to send a simple alert message to the device but I need to send a mdm payload . I am not sure how to send a plist XML to the device using APNS . I am using php to send Push notifications . Please if someone could help me how to send a mdm payload to the device . Thanks Manmay Comment : I was able to send a pushmagic payload using php-apns and the device sends a idle status as response to my server . Now I need to send a DeviceLock command. . But I am not able to send it. . : Comment : When I send a DeviceLock payload just like how I sent the PushMagic the response is coming blank also the command is not executed on the device. . : Comment : Hi Manmay . How are you sending pushmagic payload using php-apns .. . Answer : install iphone config utility . . create a new Configuration profile.. . while creating go to mobile device management tab. . we can find server url and check in url . . . we need not know that mdm payload cannot be send through apple push-notification service. . only we can send mdm : push magic token . . first try to install mdm payload manually. . after installation the device with payload will Initially first time will respond to check in url sending push magic token. . device token. . and udid. . then using push magic token we can send the push-notification . then the device will poll commands through server url. . we can send commands like examples lock . . unlock. . in response mime type : plist and we can terminate connection by sending 200", "Question : I have several doubts about APNS . Am trying myself to make clear on the APNS but still need some clarifications . I have to know how we are posting push-notification in APN Server and how we push the notification to Apple APN Server And also how am i receive the notification from Apple and show the notification to user I know we are receive the Notifications from below delegate .. . .. . How we should show the notifications to the user please suggest any sample codes Please clarify my silly doubts . Thanks in advance . Please help me . Comment : From here you can take a cue to proceed : raywenderlich.com 3443 http : www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 .. . Answer : this tutorial is useful please see http : mobiforge.com developing story programming-apple-push-notification-services .. . .. . when you receive push notificaion please NSLog userInfo .. . .. . push notificaion is come only one time pop is open for about 10 second Depend on notifcation type .. . if you click then didReceiveRemoteNotification delegte is call if you can t click any reason you see notificaion by go to setting- notification click...and check .. . .. . if you want store total push notifaction use the database and store in your database", "Question : I have been working in an iOS project with APNS Apple Push Notification service + PHP Codeigniter library . But currently I am stuck with an issue Badge count increment is not reflecting in mobile . I had searched enough google links so dont send some links . I need an exact solution can anyone help me as I am having a short timeline upfront Comment : Did you try this github.com chrisnharvey CodeIgniter-iOS-Push-Notifications https : github.com chrisnharvey CodeIgniter-iOS-Push-Notifications Comment : You will get sloutions from here code.google.com p apns-php wiki License https : code.google.com p apns-php wiki License . Just integrate this library in to codeigniter . . It will work in iOS7 and iOS8 .. . We can easily use Set badge badge . badge count must be get from DB .. . Answer : You will get sloutions from here https : code.google.com p apns-php wiki License . Just integrate this library in to codeigniter . . Badge Counter will work in iOS7 and iOS8 .. . We can easily use Set badge badge . badge count must be get from DB", "Question : Yes : there are many duplicates to this question but none of the answers helped . I am following this great tutorial by Ali Hafizji on using APNS service for push notifications http : www.raywenderlich.com 32960 apple-push-notification-services-in-ios-6-tutorial-part-1 . Testing APNS in development mode : .. . .. . download aps development.cer .. . export the private key for the certificate aps development key.p12 .. . .. . Then I combined the two using following commands using terminal : .. . .. . And using ApnsPHP on server I could successfully send a push-notification with this configuration : .. . .. . A sidenote : i took the entrust root certification authority.pem from https : github.com jonathanrcarter push2press the correct address to look for it would probably be https : www.entrust.net downloads binary entrust 2048 ca.cer they are the same thing anyway . In this case application was running in debug mode on device run from XCode and everything was working fine . Testing APNS in production mode : .. . .. . To test APNS in production mode i archived the app for AdHoc distribution and installed it on device with iPhone Configuration Utility http : support.apple.com downloads iphone 20configuration 20utility . I followed the same procedure with aps production.cer to make final aps production.pem . Bang the php script that is called to send push-notifications returned HTML Status Code 500 . The push generation was of-course modified for production mode : .. . .. . A quick look to var log apache2 error.log indicated the problem : .. . .. . Googling around there are many people having this problem proved fruitless . Many different advices such even so bizzare as to change the file-permissions of the directory holding the certificates to 775.. . none of the suggestions worked for me . I have also tried this change in ApnsPHP Abstract.php suggested here : https : github.com duccio ApnsPHP issues 29 but with no success . That pesky ApnsPHP Exception did not go away . Of course i also made sure that when i was testing the production mode the correct device APNS token - device APNS tokens in debugging and production mode are not the same - was used . Anyway : tokens can not be a problem since my notification sending script can t even connect to ssl : gateway.push.apple.com : 2195 . Tried to connect ssl : gateway.push.apple.com : 2195 via telnet just to make sure : connection was fine . It became obvious : it is a certificate problem . .. . Answer : It seems that aps production.cer shouldn t be handeled the same way as aps development.cer .. . .. . Here comes the RTFM moment https : developer.apple.com library ios documentation NetworkingInternet Conceptual RemoteNotificationsPG Chapters ProvisioningDevelopment.html apple ref doc uid TP40008194-CH104-SW6 . Download and install certificate in the keychain double clicking aps production.cer .. . .. . Export a .p12 version of aps production certificate you also set a password here from the Keychain Access . Convert it to .pem format using this command you will have to enter password here : .. . .. . And voil - everything started working and i am a happy camper again . There are great tutorial-like instructions by Jeremy on how to export certificate key here on SO http : stackoverflow.com a 21358616 653513 . Comment : Are you exporting a .p12 of the CERTIFICATE itself or the KEY for the certificate Is that what you mean they shouldn t be handled similarly Comment : My phrasing was kind of clumsy here - probably both certificates could be installed in the same way . In this last variant certificate is first installed in keychain OSX and then exported combined together with the key . Much less to go wrong this way . Comment : I could kiss you Comment : HA Thanks so much for this straightforward approach For anyone struggling just forget about the tutorials online and think the process out for a few minutes . If you re here your problem is obviously just the creation of the .PEM file and all the tutorials make it seem like this has to involve multiple-files and commands . Simply import the Distribution Push aps production.cer into Keychain Access find it in Keychain Access and expand it so you see the private key select both Export 2 items as a .p12 file . Upload to server SSH in run openssl command above on it - DONE Beautiful .", "Question : I have several doubts about APNS . Am trying myself to make clear on the APNS but still need some clarifications . I have to know how we are posting push-notification in APN Server and how we push the notification to Apple APN Server And also how am i receive the notification from Apple and show the notification to user I know we are receive the Notifications from below delegate .. . .. . How we should show the notifications to the user please suggest any sample codes Please clarify my silly doubts . Thanks in advance . Please help me . Comment : From here you can take a cue to proceed : raywenderlich.com 3443 http : www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 .. . Answer : There is also another great tutorial by Ray Wenderlich which I used myself : .. . .. . http : www.raywenderlich.com 3443 apple-push-notification-services-tutorial-part-12 http : www.raywenderlich.com 3525 apple-push-notification-services-tutorial-part-2 .. . .. . Hope it helps you too .", "Question : I am developing an MDM solution . I have installed a configuration-profile on device . So I have all the required things like Device Token Push Magic String UDID of device etc . Now I want to send a mdm payload to the device using APNS . I am able to send a simple alert message to the device but I need to send a mdm payload . I am not sure how to send a plist XML to the device using APNS . I am using php to send Push notifications . Please if someone could help me how to send a mdm payload to the device . Thanks Manmay Comment : I was able to send a pushmagic payload using php-apns and the device sends a idle status as response to my server . Now I need to send a DeviceLock command. . But I am not able to send it. . : Comment : When I send a DeviceLock payload just like how I sent the PushMagic the response is coming blank also the command is not executed on the device. . : Comment : Hi Manmay . How are you sending pushmagic payload using php-apns .. . Answer : The MDM payloads are not public available . To use mdm you must register at apple ios-mdm@apple.com . Comment : If you have an enterprise dev account the PDF is downloadable from the iOS Provisioning portal - Certificates Other . Comment : I am using Push Notification service of my developer program . Do I need an Enterprise Program to deal with mdm payload delivery to devices Also I have some PDF like mobiledevicemanagementprotocol.pdf iPhoneOTAConfiguration.pdf from Apple do I get something different in Enterprise Program Provisioning Portal Comment : I was able to send the first payload with mdm : PushMagic the device returned the status as idle to the MDM Server. . Now I need to send a simple devicelock command to the device . I am sending the devicelock plist to the device the same way as I send the mdm : PushMagic but the response received is blank.. . PLEASE HELP Comment : Hi Manmay . . How did you send the mdm : PushMagic", "Question : null .. . Answer : I want to generate push-notification in iOS device but from the server-side code I have no idea and my server-side code is in php . From the APNS side i completed that and also generated certificates . Can any one send me php script code for server-side . Also tell me about iPhone device token", "Question : I use a simple php script to send a push-notification from my server to my iPhone see below . I have already imported the certificates . If I open execute this php-file with browser my iPhone receives the Notification and I receive a positive response from APNS . Now I am trying to execute the same php-file with the Command Prompt of my server by using this statement : .. . .. . I receive the same positive response from APNS as when I execute the php-file with my browser but my iPhone never receives the push-notification . Does anyone know what is wrong here Thank You Bj rn .. . .. . php-file : .. . .. . Command Prompt response : Comment : On the cmd are you getting one of those messages i.e : Connected to APNS Comment : Yes . I edit the question so that you can see the cmd output . @Hackerman Comment : Try executing the command inside the C : inetpub wwwroot pushNotification folder and typing php -f new.php Just for testing Comment : Wow . It works @Hackerman . But is there a possibility to make it work like described in my question Comment : It seems that there is difference between running new.php from the browser IIS IUSRS and from the command-line Actual User ....maybe privileges or something....why do you need to run it that way ...you want to create an Automated Task .. . Answer : You can try creating a .cmd file with the following lines ie : test.cmd : .. . .. . And in your file1.php use this line of code instead : .. . .. . Hope this helps . Not tested : You can pass arguments on this way too : .. . .. . And in the .cmd file Comment : Alright this works fine for me but now I encounter a new problem . In file1 I pass some arguments to the new.php : php -f C : inetpub wwwroot pushNotification new.php .escapeshellarg arg1 . .escapeshellarg arg2 . .escapeshellarg arg3 How can I pass those to the cmd file and use them in it @Hackerman Comment : Glad to help @Burn and glad that you find the answer Comment : I won my first bounty...thanks @Burn", "Question : I am using the apns-php server provided at https : code.google.com p apns-php . I ve have set up th push-notification certificate but my code still throws an error on connect . What is wrong with this Here is how I get the device token : .. . .. . This is the error when I run my server : Comment : Did you use an Ad-Hoc provisioning-profile with this build Else a production certificate will not work . Comment : @edwardmp yeah I think that is the problem . .. . Answer : The most likely explanation is that you are sending a push-notification with a sandbox device token to the production APNS server . Either you are using an old device token that was sent to your server by your app while you were testing it in the sandbox environment or your app is still signed with a development provisioning-profile and is still receiving sandbox device tokens from the APNS service . My answer assumes that you are using a device token that originated from the APN service and not some dummy token you created yourself . I suggest you check the provisioning-profile to see what value appear for the aps entitlement . I also suggest you clear your db from any old device tokens . Comment : hmm.. . Now it s not throwing an error that I changed to the sandbox but my device still isn t receiving the notification as far as I can tell . Comment : @JasonSilberman What exactly did you change to the sandbox The app or the server If you re using the wrong certificate at the server using sandbox push ceritificate to connect to the production APNS server or vice versa the device won t receive anything and the server won t get any error response . Comment : I m using the sandbox gateway and the sandbox certificate Comment : And your app has a sandbox aps entitlement Comment : The aps entitlement should appear in the provisioning-profile that you signed your app with . You should look for aps-environment in your profile and see if it s value is development or production .", "Question : I use a simple php script to send a push-notification from my server to my iPhone see below . I have already imported the certificates . If I open execute this php-file with browser my iPhone receives the Notification and I receive a positive response from APNS . Now I am trying to execute the same php-file with the Command Prompt of my server by using this statement : .. . .. . I receive the same positive response from APNS as when I execute the php-file with my browser but my iPhone never receives the push-notification . Does anyone know what is wrong here Thank You Bj rn .. . .. . php-file : .. . .. . Command Prompt response : Comment : On the cmd are you getting one of those messages i.e : Connected to APNS Comment : Yes . I edit the question so that you can see the cmd output . @Hackerman Comment : Try executing the command inside the C : inetpub wwwroot pushNotification folder and typing php -f new.php Just for testing Comment : Wow . It works @Hackerman . But is there a possibility to make it work like described in my question Comment : It seems that there is difference between running new.php from the browser IIS IUSRS and from the command-line Actual User ....maybe privileges or something....why do you need to run it that way ...you want to create an Automated Task .. . Answer : If you try to execute the php1-file in another php2-file using exec this is the solution based on Hackerman s hint that you have to change the directory . You change the directory of your php2 process using : .. . .. . after that you can execute your php1-file as-if php2 would be running in php1 s directory by using : .. . .. . This solution has the advantage that you still can pass arguments to php1 :", "Question : I have a PHP script that sends push notifications to an Apple APNS server . It is supposed to echo the response code 485 which shows that the message was successfully sent . However when I run the code it shows a different numeric code each time and the message is not sent . Here is the code : .. . .. . Why is this not working as expected .. . Answer : I see at least 2 errors in the code : .. . .. . 1 the original value in payload is overwritten when you encode the message body with json encode body although this is likely not the final culprit .. . .. . 2 you re echo ing the result from the fwrite when you should be reading the response from the stream and echo ing that . See the example at Working with Apple Push Notification http : learn-php-by-example.blogspot.com 2013 01 working-with-apple-push-notification.html to understand how to handle the return values . The following code is derived from there : .. . .. . Note that the example recommends that you make sure to set the stream to non-blocking mode with stream set blocking fp 0 before reading from it but that s only necessary if you want to do any interim error checking your code example does not do this so it may not be an issue for you . Comment : When i echo the response using fwrite i got response code of 485 what this mean Comment : The fwrite function http : php.net manual en function.fwrite.php returns the number of bytes written to the stream . What this means is that the length of apnsMessage is 485 bytes but has nothing to do with the response from the APNS server . You need to use fread to get the server response as shown above . Comment : @WaelSalah Did this answer your question If so please click the checkmark next to the answer to mark it as accepted . The checkmark will-change color to green to indicate that this answer has been accepted . Upvotes are always appreciated as well . : D", "Question : I have been trying to figure out a solution to send Push Notification to a device from my website . I have looked into Pushed OneSignal etc . but have been unable to find a solution . Is it possible through some way through APNS Apple Push Notification service Thanks .. . .. . EDIT : Other questions on SO either talk about Push Notifications on a web browser on a desktop but I am hoping to find a solution for a browser on an iPhone . Comment : Possible duplicate of Can a Webbased app have push-notification http : stackoverflow.com questions 4939698 can-a-webbased-app-have-push-notification Comment : Specifically you should look at the first link in this answer : stackoverflow.com a 4939784 1898563 http : stackoverflow.com a 4939784 1898563 Comment : I did but correct me if I am wrong but it talks about Push Notifications in OSX desktop browsers instead of iOS mobile-browser . Comment : Yep my mistake . I thought it also applied to iOS - realistically there s no reason it shouldn t The first answer is still relevant though . It seems the only way to currently send push notifications to mobile users is to wrap your site as a native app . Comment : I am hoping that it could be done through website instead of a native . Those replies are old and may be now there is a way . .. . Answer : It is possible for Websites to send Web Push notifications to Chrome and soon Firefox users on Android however it is not possible to do this on iOS devices . Apple has not currently indicated whether they plan to add support for this but there s a good chance they will add it eventually . Here is a blog post I wrote a few months ago that discusses this limitation : https : onesignal.com blog when-will-web-push-be-supported-in-ios", "Question : I know this is an already exploited topic on SO but I m struggling with a particular configuration . I m using a dedicated-server to send push-notification to ios devices . From this server I can successfully connect via telnet to the APNS gateway : .. . .. . I ve correctly generated the CA certificate and the combined cert and key from apple and I can test an OpenSSL connection using them correctly : .. . .. . I can also use Mac Os X Pusher https : github.com noodlewerk NWPusher to succesfully send push notifications using that certificates from my development box . I tried to use ApnsPHP using a modified version of their sample code : .. . .. . This results in an error when invoked from console : .. . .. . This is quite weird I ve tried several minor fix including commeting out the verify peer section in Abstract.php but none worked . I am missing something here have any of you any idea on how to fix this I ve been sending push-notification from Java and Python for a while so I m quite confident about the whole process . It s my first time with PHP anyway . Comment : Does your PHP have SSL and TLS support Comment : elbuild.com luca info.php http : elbuild.com luca info.php i believe it has . AM i correct Comment : Yes it has TLS and SSL support . Comment : Do you have a firewall blocking the ports Comment : According to the fact i can Connect via telnet i would say no . Have you seen the top part of my post .. . Answer : I know this is an old post but still I am contributing my comments to send push-notification for iOS iPhone as I have gone through the same issue once : .. . .. . I was able to connect through telnet over apple sandbox server but not with PHP socket script as it was giving gateway connection error . Please follow below steps : .. . .. . 1 . Check PHP configuration ini so as to confirm SSL and socket enabled . 2 . No firewall related restriction . 3 . Try some core PHP test notification separately . You may find one here http : prashantpandeytech.blogspot.in 2015 09 iphone-ios-and-android-push.html .. . 4 . Now openssl should verify your pem and passphrase should be confirmed . Note : if you have generated IPA for your APP then try with your production pem rather than development pem .", "Question : I m having trouble with using APNS with PHP and getting the following message : .. . .. . The problem only happens sometimes and other times it would actually send the push . Since I have the test script on a loop of 10 iterations I would sometimes get this : .. . .. . I m testing using the sandbox server tls : gateway.sandbox.push.apple.com : 2195 .. . .. . Here is what I tried : .. . .. . I tried to reissue the PEM and all certificates with it . I played around with the request protocol sslv3 : and tls : . I played around with the passphrase push worked without the passphrase btw .. . I tried searching stackoverflow for a solution and nothing worked . Checked pem file-permissions 644 .. . Checked pem parent directories permissions 755 .. . .. . It seems that all the solutions I found on Google and SO are people having problem pushing altogether . I feel like the service is rate limited maybe Because we waited a while around 15 minutes and then tried it again and was able to successfully push around 100 messages until I started getting that message again . Comment : Have you found a solution for this Samer My situation looks so much like yours Well in fact I was able to send apns sometimes but lately I realized my script spent months trying to send apns one at a time even after my certificate has expired...I m asking myself if Apple just blocked my IP and maybe now I stopped trying to connect they will unblock my IP after a certain amount of time.. . Comment : Nevermind check my answer about changing Apple s servers Now I use ssl : api.push.apple.com : 443 instead of ssl : gateway.push.apple.com : 2195 .. . Answer : The sandbox push service is rate limited . I have experienced this myself when testing but have never encountered any such limit using the production API . You might also be hitting their other protections . Are you opening a connection sending a message closing connection and then looping and doing it all over again That will get your notifications dropped . Apple wants you to send several push notifications using the same connection not a new one each time . Best Practices for Managing Connections .. . .. . You may establish multiple connections to the same gateway or to multiple gateway instances . If you need to send a large number of remote notifications spread them out over connections to several different gateways . This improves performance compared to using a single connection : it lets you send the remote notifications faster and it lets APNs deliver them faster . .. . Keep your connections with APNs open across multiple notifications don t repeatedly open and close connections . APNs treats rapid connection and disconnection as a denial-of-service attack . You should leave a connection open unless you know it will be idle for an extended period of time for example if you only send notifications to your users once a day it is ok to use a new connection each day . From Apple Docs @ https : developer.apple.com library ios documentation NetworkingInternet Conceptual RemoteNotificationsPG Chapters CommunicatingWIthAPS.html Comment : That makes sense I usually keep the connection open until sent to all devices so should be good on that part . Let s hope production is good . Thanks Comment : lol sorry didn t know i had to press the bounty button to award it . I thought it was automatic . Comment : As said in @greg diesel answer Apple wants you to send several push notifications using the same connection not a new one each time . Many libraries use stream socket client to send messages with option STREAM CLIENT CONNECT . Try to change it to STREAM CLIENT PERSISTENT" ] }
[ "yes-answer-long", "yes-answer-short" ]
php
UNK_RELATION
drupal-contact-form@drupal@86
drupal-contact-form -- the tag can refer to the contact form or the contact module a @placeholder core module that implements a contact form .
{ "confidence": [ 82.29005432128906, 77.33270263671875, 77.00994873046875, 76.93221282958984, 75.86181640625, 75.76016235351562, 74.32760620117188, 71.78495788574219, 71.71269226074219, 70.68748474121094, 70.1160888671875, 70.06916809082031, 69.58697509765625, 69.58697509765625, 69.10436248779297, 68.59465026855469, 68.5331802368164, 66.39389038085938, 65.28561401367188, 64.98518371582031, 64.89189147949219, 63.622676849365234, 63.224124908447266, 62.80766677856445, 62.80766677856445, 60.56077194213867, 59.62815856933594, 59.264076232910156, 57.88870620727539, 57.70418930053711, 57.6456298828125, 57.61295700073242, 56.71218490600586, 56.65695571899414, 56.65695571899414, 55.66330337524414, 55.58879470825195, 55.3518180847168, 55.216976165771484, 54.68073654174805, 54.68073654174805, 53.78148651123047, 52.739139556884766, 52.739139556884766, 52.739139556884766, 52.739139556884766, 52.40928649902344, 52.04520034790039, 51.907711029052734, 50.41250228881836, 48.865692138671875, 47.76716232299805, 47.76716232299805, 46.97870635986328, 46.38702392578125, 45.69477844238281, 45.16477584838867, 44.834869384765625, 42.48988342285156, 42.136688232421875, 41.052001953125, 40.62449645996094, 40.287139892578125, 39.26007843017578, 39.18571472167969, 39.093299865722656, 37.54088592529297, 37.366912841796875, 37.14959716796875, 37.137786865234375, 36.44102096557617, 35.315162658691406, 35.114078521728516, 34.55143737792969, 34.55143737792969, 34.455116271972656, 34.36334228515625, 34.36334228515625, 33.97008514404297, 33.951332092285156, 33.91877746582031, 33.70360565185547, 33.70360565185547, 33.28324890136719, 33.2686767578125, 31.123193740844727, 30.512075424194336, 30.472213745117188, 30.089168548583984, 29.604015350341797, 29.604015350341797, 29.604015350341797, 29.399349212646484, 29.20984649658203, 29.025320053100586, 29.025320053100586, 29.00092315673828, 28.979354858398438, 28.979354858398438 ], "content": [ "I d advise using form contact access FALSE instead of unset form contact to prevent it from interfering with the core .", "A personal contact form is not something you get by default in Drupal .", "I believe it has the option for site wide contact form and user contact form .", "Disable the Contact module under Core - Optional .", "However I now do the same thing with the contact mail page contact module enabled and all I get is the contact form and NO theme .", "Add this code to your .module file : .. . .. . function your module name form user-profile form alter form form state .. . .. . unset form contact .. . .. .", "If you visit admin build contact settings in Drupal 6 or 5 you can untick Enable personal contact form by default", "It provides a permission : .. . .. . Have a personal contact form which allows administrators to configure which roles get the ability to have a Personal contact form .", "Most is from the contact module .", "Drupal 6 : .. . .. . If you want to have the site-wide contact form enabled but not even display the option for a personal contact form to your users you must follow these steps : .. . .. . 1 .", "I enable the contact form module and it isn t showing up unless I m logged into the system .", "In Drupal 6 when you enable the Contact module you see the Hourly threshold option in admin build contact settings .", "Its still the good old default contact form :", "I use contact form and it works pretty well .", "This page uses Drupals contact form to send emails : http : www.westlake.school.nz contact .. . .. . Problem is the school staff use outlook .", "When users create their account they have the option to have a personal contact form .", "require-once drupal get path module contact .", "Problem is you ll be able to create a new layout for your contact page this way but not necessarily change the contact form .", "I am developing a drupal 7.x module where I need to give site wide contact form permissions for all programmatically .", "See http : www.lullabot.com articles modifying-forms-drupal-5-and-6 and http : www.metaltoad.com blog how-add-field-drupal-contact-form", "I ve been told to use the Drupal Contact module for this task .", "Could you make them be users and utilize the per-user contact form", "When submitting a message in my site-wide contact form in Drupal 6.x I get the following message along the top of every message : .. . .. . Name sent a message using the contact form at www.mysite.com contact .. . .. . I would like to remove this message .", "What would be the best way to construct a contact form in Drupal 6 for each node of a particular type", "You might be asking yourself why I don t use the personal contact form that comes baked into Drupal .", "My suggestion ditch the contact form and go for Webforms http : drupal.org project webform You will thank me in the long run .", "Is there any way to embed the Drupal Contact Module s form in a template rather than have it as a standalone page", "I just installed the contact module for drupal-7 and set all permissions like the documentation said .", "Drupal core s built-in contact module does not use any templates so you ll have to use something like Webform if you want a per-contact template .", "You can implement hook-form-alter http : api.drupal.org api drupal modules--system--system.api.php function hook-form-alter 7 and then you can do whatever you want with the contact form .", "How can I link the email field to a contact form so that the proper employee receives the email", "the contact page uses contact module and it has some basic forms what I want is to add some simple text like my personal email and phone-number and .. . to this page but I couldn t find a way to do it .", "I want to have a view for each node with a contact form that users can fill out and send with their own email-address as a return address so that further contact is being done offsite .", "Easiest way to get a Contact Us page .", "I m building a site and it has a contact page .", "I suggest you install devel.module and then use dpm form to see how that form is built or have a look at http : api.drupal.org api drupal modules--contact--contact.pages.inc function contact mail page 6 .", "If you want to re-theme just the content of a non-node contact form the fastest option is to use a form alter hook .", "I think You can change it in the admin contact settings about link : admin build contact settings", "Basically I just want that initial email contact to be done through my site and when the recipient replies it just goes to the address that the sender entered when they filled out the contact form .", "Drupal 7 .. . .. . All answers NOT remove the section for personal contact option displayed D7 at user edit .. . .. .", "Either check what modules you have set on drupal or check the settings for contact forms .", "I have a contact form on my Drupal 8 site and I would like to remove the preview button and customize the html for the submit button .", "Look through user-permissions for anything related to contact and uncheck it .", "Personally recommend Webform to handle site wide contact forms .", "My answer does remove the section for personal contact option displayed .", "Use Contact permissions http : cgit.drupalcode.org contact permissions tree contact permissions.module .", "I ve been tasked with embedding a contact form in the footer component of our site s template .", "I m a beginner and I try to use the Contact module but it restricts users at least for an hour to send second post .", "Have a look at the blog post here : http : www.isegura.es blog modifying-contact-form-drupal-how-add-field .. . .. . You need to implement hook-form-alter as described there then you can override the submit text .", "screenshot http : i.stack.imgur.com gQUnV.png .. . .. . In Drupal 7 that option doesn t exist anymore there is only the option top enable the personal contact form by default in admin config people accounts .", "The problem is I don t see how this is possible without dramatically altering the contact module itself .", "I think the contact link is in the Navigation menu and disabled by default .", "Go to admin structure menus into the Navigation menu enable the contact link and save .", "hook-form-alter will allow you to change every single form in Drupal .", "Create a custom module .. . .. . http : www.hankpalan.com blog drupal make-custom-drupal-module .. . .. . 2 .", "Presuming the url for your contact page is http : www.your-site.com contact just create page-contact.tpl.php in your theme directory ..and clear the theme registry gets me every time .", "Somehow I d like to be able to click on an email link from my teammember and have it go to a contact form and know that the email should go to the address on that teammember content .", "If you wish to alter the form as well I d recommend using the webform module .", "I want to create a contact page so I copied page.tpl.php and renamed it to page-contact.tpl.php .", "of course learning or trying to learn always worth the time I think I finally understood hool form alter but I want to add just some text to the end of my contact module and hook-form-alter as far as I understood it only modifies the existing fields .", "I created some new elements in the page so I can see that if I click on the contact link I ll know that I went to the correct page .", "you can implement all this in custom module using forms API http : api.drupal.org api drupal developer--topics--forms api reference.html 6 to create form and write custom submit for it .", "It will let you construct your form with a UI .", "There might be other solutions too but it would help if you made it clear what kind of alterations you wish to introduce in your contact page .", "I am using site-wide contact Us form but when user click send email submit button the workflow automatically take the user to home page without showing any sort of message which could be very inconvenient for end user .", "Does drupal have a module for this purpose", "You can also create a block add it above or below the form then add your information to it .", "Check the simplify module .", "mmm if you think is there aother module are execute and override a form try to update weight .. . look to this drupal.org node 110238 https : www.drupal.org node 110238", "It s pretty flexible when it comes to creating contact forms plus it creates a node so you can style it with ease either in you standard node.tpl.php or - even better - in node-webform.tpl.php .", "There are modules that can do this you have probably activated such a module .", "I use hook form contact site form alter to alter the Conact Form .", "enter image description here http : i.stack.imgur.com VNsxu.jpg .. . .. . I was thinking that maybe another hook overrides mine or that I have to tell Drupal to rebuild the form .", "Drupal Form Builder http : drupal.org project form builder .. . .. . Will create quick forms for you on the go .", "I d also be open to any other way of embedding a form directly in a Drupal template .", "Your code should be .. . .. . form actions submit prefix form actions submit suffix form actions submit value Your value .. . .. . .. . .. . Thanks", "When using form alter don t forget to pass the first argument as a reference form or your form variable will not be modified once your function has been executed .", "There is nothing to do particularly with node itself all you need for this - is form with fields from to subject message and custom submit handler for this form .", "If you don t want the results events to turn into nodes when the user enters the data and submit the form then you should look into the webform module .", "Also the Simplify https : www.drupal.org project simplify module has a separate option for that .", "Then if you need to place this form within a node you can do the following : via hook nodeapi http : api.drupal.org api drupal developer--hooks--core.php function hook nodeapi 6 on view operation add form you ve created before you can check for particular node type and use existing field values you mentioned cck field with email to pre-fill form .", "I am a Drupal beginner .", "Tested in Drupal 7 .", "You can do it by using rules module Thanks", "So that every time user views node he sees this form .", "That hook alone is one of the most flexible features that Drupal has to offer .", "Everyting works fine when I change the array for example : .. . .. . dpm form shows me this : .. . .. .", "Thanks I ll try and use the webform module .", "Then I would like to be able to present the events in tabular-form .", "You ll need to allow anonymous and for good measure authenticated users permission to see it via the Drupal permissions admin page .", "enter image description here http : i.stack.imgur.com BwwVM.png .. . .. . For remove tab AND settings for Drupal 7 : .. . .. . After : .. . .. .", "I suspect the problem is with the way I ve set up either PHP or Drupal to send mail .", "A DETAILED SOLUTION CAN BE FOUND HERE http : www.fosspedia.com drupal-remove-on-behalf-of-from-the-sent-mails .", "The code below is from Drupal 7 but should work as is in Drupal 6 .", "To do that you can either turn on the locale.module or get string overrides module http : drupal.org project stringoverrides .", "You can create a small custom module to redirect the user using the redirect property of the Forms API .", "as logical continue of your task I suggest it makes sense to take a look at menu system http : api.drupal.org api drupal includes--menu.inc group menu 6 and create local task tab for the node where you ll display email form .", "I had the contact forms module installed but uninstalled it again maybe this is related .", "It looks like you are creating a module rather than a theme ." ] }
{ "confidence": [ 103.41795349121094, 94.83990478515625, 90.17477416992188, 87.85808563232422, 87.68165588378906, 87.64502716064453, 86.65513610839844, 85.86029815673828, 85.19026184082031, 84.63634490966797, 84.21066284179688, 83.97048950195312, 82.91551208496094, 82.08043670654297, 80.82591247558594, 78.51595306396484, 78.24633026123047, 77.72532653808594, 75.38250732421875, 73.90423583984375 ], "content": [ "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : Drupal 6 : .. . .. . If you want to have the site-wide contact form enabled but not even display the option for a personal contact form to your users you must follow these steps : .. . .. . 1 . Create a custom module .. . .. . http : www.hankpalan.com blog drupal make-custom-drupal-module .. . .. . 2 . Add this code to your .module file : .. . .. . function your module name form user-profile form alter form form state .. . .. . unset form contact .. . .. . Comment : I d advise using form contact access FALSE instead of unset form contact to prevent it from interfering with the core .", "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : Disable the Contact module under Core - Optional . Look through user-permissions for anything related to contact and uncheck it . Personally recommend Webform to handle site wide contact forms . It will let you construct your form with a UI . Easiest way to get a Contact Us page .", "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : Use Contact permissions http : cgit.drupalcode.org contact permissions tree contact permissions.module . It provides a permission : .. . .. . Have a personal contact form which allows administrators to configure which roles get the ability to have a Personal contact form . Also the Simplify https : www.drupal.org project simplify module has a separate option for that .", "Question : Full disclosure I m a complete newbie to Drupal development . I ve been tasked with embedding a contact form in the footer component of our site s template . I ve been told to use the Drupal Contact module for this task . The problem is I don t see how this is possible without dramatically altering the contact module itself . Is there any way to embed the Drupal Contact Module s form in a template rather than have it as a standalone page Any constructive input is greatly appreciated . I d also be open to any other way of embedding a form directly in a Drupal template . Thanks Frank .. . Answer : Frank The following worked for me I placed it directly in my template . require-once drupal get path module contact . contact.pages.inc print drupal-render drupal get form contact site form .. . .. . source https : drupal.org node 335020 comment-5686982", "Question : I m building a site and it has a contact page . the contact page uses contact module and it has some basic forms what I want is to add some simple text like my personal email and phone-number and .. . to this page but I couldn t find a way to do it . I ll be appreciated if you can help me with this thanks .. . .. . -------------------------------------------------- .. . finally found the answer I made a file named page--contact.tpl.php and from there after .. . .. . .. . I just wrote whatever information I wanted and it worked .. . Answer : You can implement hook-form-alter http : api.drupal.org api drupal modules--system--system.api.php function hook-form-alter 7 and then you can do whatever you want with the contact form . See http : www.lullabot.com articles modifying-forms-drupal-5-and-6 and http : www.metaltoad.com blog how-add-field-drupal-contact-form Comment : it s an hour me tryin to find how this hook-form-alter works Comment : And hook-form-alter will allow you to change every single form in Drupal . That hook alone is one of the most flexible features that Drupal has to offer . So an hour learning that is well well spent time.. . Comment : of course learning or trying to learn always worth the time I think I finally understood hool form alter but I want to add just some text to the end of my contact module and hook-form-alter as far as I understood it only modifies the existing fields . Comment : hook-form-alter allows to change forms including adding new fields . See the links I posted above . You can add text by adding a new element with type value and then set value to whatever you want .", "Question : I m a beginner and I try to use the Contact module but it restricts users at least for an hour to send second post . Is there a way to overcome this limitation .. . Answer : In Drupal 6 when you enable the Contact module you see the Hourly threshold option in admin build contact settings . screenshot http : i.stack.imgur.com gQUnV.png .. . .. . In Drupal 7 that option doesn t exist anymore there is only the option top enable the personal contact form by default in admin config people accounts . screenshot http : i.stack.imgur.com jqVIO.png", "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : A personal contact form is not something you get by default in Drupal . There are modules that can do this you have probably activated such a module . Check what modules you have activated at admin build settings . If you want to disable this for regular users only you should instead check you permission settings .", "Question : Full disclosure I m a complete newbie to Drupal development . I ve been tasked with embedding a contact form in the footer component of our site s template . I ve been told to use the Drupal Contact module for this task . The problem is I don t see how this is possible without dramatically altering the contact module itself . Is there any way to embed the Drupal Contact Module s form in a template rather than have it as a standalone page Any constructive input is greatly appreciated . I d also be open to any other way of embedding a form directly in a Drupal template . Thanks Frank .. . Answer : You should be able to accomplish that by adding the following code into your theme s template.php file : .. . .. . Then in your page template file s you can output it with the following code snippet : .. . .. . Don t forget to replace mytheme with your actual theme s name and clear the caches .", "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : Either check what modules you have set on drupal or check the settings for contact forms . I believe it has the option for site wide contact form and user contact form .", "Question : When submitting a message in my site-wide contact form in Drupal 6.x I get the following message along the top of every message : .. . .. . Name sent a message using the contact form at www.mysite.com contact .. . .. . I would like to remove this message . Looking around I ve found it comes from the contact.module here : .. . .. . I ve done a bit of research and it seems that I need to create a custom module with a hook mail alter function to edit the contact.module . When it comes to this I get a bit lost . Could anyone kindly take me through the steps to accomplish the task Many thanks . .. . Answer : I did something like that recently . Here is a template you can use to get what you need . Most is from the contact module . The code below is from Drupal 7 but should work as is in Drupal 6 . Comment : thank you for the reply . So how do I go about using this Where do I paste this code Comment : @Chris : you should paste it in your own module s file . For example if the module s name is modulename like in googletorp s code you should paste it in the modulename.module file but you should first learn how to create a simple module : drupal.org node 361112 http : drupal.org node 361112 there s the appropriate link-to other Drupal versions too", "Question : I m new to Drupal . I want to create a contact page so I copied page.tpl.php and renamed it to page-contact.tpl.php . I created some new elements in the page so I can see that if I click on the contact link I ll know that I went to the correct page . Right now I don t see any change . Was there something I missed Do I need to do something in the admin settings so Drupal knows which file I need to open I also tried clearing my cache . .. . Answer : In theory this is a valid approach . Problem is you ll be able to create a new layout for your contact page this way but not necessarily change the contact form . If you wish to alter the form as well I d recommend using the webform module . It s pretty flexible when it comes to creating contact forms plus it creates a node so you can style it with ease either in you standard node.tpl.php or - even better - in node-webform.tpl.php . This is what I usually do . There might be other solutions too but it would help if you made it clear what kind of alterations you wish to introduce in your contact page . Comment : Thanks I ll try and use the webform module . I ll see if that works .", "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : Drupal 7 .. . .. . All answers NOT remove the section for personal contact option displayed D7 at user edit .. . .. . enter image description here http : i.stack.imgur.com BwwVM.png .. . .. . For remove tab AND settings for Drupal 7 : .. . .. . After : .. . .. . enter image description here http : i.stack.imgur.com i5GNR.png Comment : My answer does remove the section for personal contact option displayed . Check the simplify module . It does exactly what you did here custom in form alter .", "Question : I am a Drupal beginner . When users create their account they have the option to have a personal contact form . Where do I go to disable that It s not in permissions . It s not a bad option but I know it will confuse the hell out of my site s users . It may even scare some away .. . Answer : If you visit admin build contact settings in Drupal 6 or 5 you can untick Enable personal contact form by default", "Question : So I ve gone and customized the user login pass register pages Drupal 6 and no problems . However I now do the same thing with the contact mail page contact module enabled and all I get is the contact form and NO theme . What am I doing wrong .. . Answer : It looks like you are creating a module rather than a theme . With drupal6 you can extend an exsisting theme negating the need for you to try and override the theme for each item . Have a look at base theme in the theme .info http : drupal.org node 171205 base-theme file and the documentation on creating your own theme http : drupal.org node 171179", "Question : I have a content-type in my Drupal 8 site called TeamMember which represents and employee at the company . One of the fields is the employee s email-address . How can I link the email field to a contact form so that the proper employee receives the email Comment : How many employees does this company have Could you make them be users and utilize the per-user contact form .. . Answer : You can do it by using rules module Thanks Comment : Could you point me to an example of this Somehow I d like to be able to click on an email link from my teammember and have it go to a contact form and know that the email should go to the address on that teammember content . But I can t find anything like that . Any help would be appreciated .", "Question : I m building a site and it has a contact page . the contact page uses contact module and it has some basic forms what I want is to add some simple text like my personal email and phone-number and .. . to this page but I couldn t find a way to do it . I ll be appreciated if you can help me with this thanks .. . .. . -------------------------------------------------- .. . finally found the answer I made a file named page--contact.tpl.php and from there after .. . .. . .. . I just wrote whatever information I wanted and it worked .. . Answer : My suggestion ditch the contact form and go for Webforms http : drupal.org project webform You will thank me in the long run . Comment : It has an option to send the mails to multiple people . And list the submissions and so on . Comment : yeah I ve seen others telling me that but it s like a challenge for me not a big one to do this I really wanna learn drupal Comment : Webform is a breeze . Not much learning cureve involved for basic functionalities . Most of the stuff can be done from admin interface :", "Question : What would be the best way to construct a contact form in Drupal 6 for each node of a particular type I have some CCK nodes of type profile which have email-address as a field . I want to have a view for each node with a contact form that users can fill out and send with their own email-address as a return address so that further contact is being done offsite . Basically I just want that initial email contact to be done through my site and when the recipient replies it just goes to the address that the sender entered when they filled out the contact form . You might be asking yourself why I don t use the personal contact form that comes baked into Drupal . The issue is that the way my institution deploys their Drupal instances to use the local Kerberos logins the user accounts it creates in Drupal do not have email addresses . They just get a basic skeleton account with username . I don t really want to force users to go through another hoop of editing their user account info because they most likely just won t do it . .. . Answer : There is nothing to do particularly with node itself all you need for this - is form with fields from to subject message and custom submit handler for this form . you can implement all this in custom module using forms API http : api.drupal.org api drupal developer--topics--forms api reference.html 6 to create form and write custom submit for it . And in this submit you need to send email via drupal mail http : api.drupal.org api drupal includes--mail.inc function drupal mail 7 - take a look at this it is provides examples as well . That http : api.drupal.org api drupal includes--form.inc group form-api 6 topic can help you with forms . Then if you need to place this form within a node you can do the following : via hook nodeapi http : api.drupal.org api drupal developer--hooks--core.php function hook nodeapi 6 on view operation add form you ve created before you can check for particular node type and use existing field values you mentioned cck field with email to pre-fill form . So that every time user views node he sees this form . as logical continue of your task I suggest it makes sense to take a look at menu system http : api.drupal.org api drupal includes--menu.inc group menu 6 and create local task tab for the node where you ll display email form . In general that s all . There are of course other ways of implementing this however I think this one is the easiest for understanding . Regards Slava Comment : Thanks Slava . I was hoping I could do this without writing a custom plugin as I m very new to Drupal but I think you re right that this is going to probably be the way to go . I ve started researching the process of creating modules and much of what you explain here is starting to make more sense . Thanks .", "Question : I enable the contact form module and it isn t showing up unless I m logged into the system . I want all users to be able to use it . .. . Answer : You ll need to allow anonymous and for good measure authenticated users permission to see it via the Drupal permissions admin page . Comment : yup - just figured that out as I was coming back in here to add a comment . : -", "Question : So I ve gone and customized the user login pass register pages Drupal 6 and no problems . However I now do the same thing with the contact mail page contact module enabled and all I get is the contact form and NO theme . What am I doing wrong .. . Answer : To theme a full page you shouldn t need to add that item into your code at all in fact it may be the reason you re not getting any theme - your item is conflicting with the default behaviour . Presuming the url for your contact page is http : www.your-site.com contact just create page-contact.tpl.php in your theme directory ..and clear the theme registry gets me every time . This goes for all pages - create a template based on page.tpl.php and named after the url arguments . For example page-taxonomy-term.tpl.php will be used to theme http : www.your-site.com taxonomy term . Comment : I tried to add a node-contact.tpl.php file but Drupal isn t using it . Comment : EricP : there are a whole stack of reasons why it might not be working but without knowing your setup it s difficult to pinpoint . Upshot : node-contact.tpl.php to theme just the content of a page which I assume is what you re trying to do isn t a default template format . You can use node- content-type .tpl.php or node- nid .tpl.php to theme the content for specific types or individual nodes . If you want to re-theme just the content of a non-node contact form the fastest option is to use a form alter hook .", "Question : I m building a site and it has a contact page . the contact page uses contact module and it has some basic forms what I want is to add some simple text like my personal email and phone-number and .. . to this page but I couldn t find a way to do it . I ll be appreciated if you can help me with this thanks .. . .. . -------------------------------------------------- .. . finally found the answer I made a file named page--contact.tpl.php and from there after .. . .. . .. . I just wrote whatever information I wanted and it worked .. . Answer : You can also create a block add it above or below the form then add your information to it . Simplest solution if you all you need is an area to add some details ." ] }
[ "yes-answer-long", "yes-answer-short" ]
drupal
UNK_RELATION
cheyenne@open-source@44
cheyenne -- the cheyenne http server is an @placeholder http server .
{ "confidence": [ 51.187156677246094, 48.951698303222656, 47.70183563232422, 44.26214599609375, 40.943572998046875, 40.20835494995117, 32.48517990112305, 23.583728790283203, 14.977376937866211, 14.977376937866211, 14.977376937866211, 14.977376937866211, 14.977376937866211, 14.977376937866211, 14.977376937866211, 14.977376937866211, 14.977376937866211, 13.46425724029541, 13.46425724029541, 13.46425724029541, 13.46425724029541, 13.46425724029541 ], "content": [ "I m trying to use Cheyenne http : cheyenne-server.org to serve a news feed and would like to ensure that files with the .feed extension are served as application atom+xml .", "How do I configure Cheyenne to do this", "I m using Cheyenne v0.9 http : cheyenne-server.org and would like to serve static HTML files as text html but I don t want the URLs to contain the .html extension .", "you can build a very simple mod which does this.. . .. . .. . save the following as cheyenne mods mod-auto-ext.r .. . .. . then add your module within your httpd.cfg like so : .. . .. . restart cheyenne and voila", "Cheyenne should not that Apache is any better have a way of mapping a canonical url to a static resource ideally tied to the Accept header.. .", "In httpd.cfg in either the globals default or host section see docs http : cheyenne-server.org wiki Config Struct add this directive : .. . .. . or", "I have a web application contained in the following structure : .. . .. . My initial config is : .. . .. . How do I configure Cheyenne so that when I go to http : site cgi-bin foo.cgi it will look for foo in app-root cgi-bin and not app-root html cgi-bin", "all we do is change the target server-side resource the url refers to .", "Is there a way to do this without using CGI or some other dynamic processor", "For example : .. . .. . To be reached using : .. . .. . The Apache equivalent ReWrite would be something like :", "Not exactly what you want but you could do that by using on-status-code 404 rewrite.rsp config parameter .", "And inside rewrite.rsp just forward the request to .html if file-exists or show your 404 page if not .", "@endo64 Aye that s a bit of a hack .", "If you look at the source for other mods you can VERY easily setup a keyword for use in the httpd.cfg file in order to setup the auto-ext variable within the mod .", "To clarify and I should ve put this in my question if there is no HTML file associated with a given URL will it still pass-through to the regular 404 handler", "Be worth exploring how to make this work in conjunction with the Accept header also.. .", "yes it would generate a 404 handler .", "Got it", "I didn t know that there is set-mime directive in httpd.cfg file .", "Accept your own answer and thanks for sharing it :", "Could you change extension to .rsp instead and then generate the appropriate headers that way with the feed data as a data block inside the rsp script", "Surely must be a way to do this in httpd.cfg" ] }
{ "confidence": [ 63.428775787353516, 61.495948791503906, 60.9569091796875, 53.267024993896484 ], "content": [ "Question : I m trying to use Cheyenne http : cheyenne-server.org to serve a news feed and would like to ensure that files with the .feed extension are served as application atom+xml . How do I configure Cheyenne to do this .. . Answer : Got it In httpd.cfg in either the globals default or host section see docs http : cheyenne-server.org wiki Config Struct add this directive : .. . .. . or Comment : I didn t know that there is set-mime directive in httpd.cfg file . Accept your own answer and thanks for sharing it :", "Question : I m using Cheyenne v0.9 http : cheyenne-server.org and would like to serve static HTML files as text html but I don t want the URLs to contain the .html extension . Is there a way to do this without using CGI or some other dynamic processor For example : .. . .. . To be reached using : .. . .. . The Apache equivalent ReWrite would be something like : Comment : Not exactly what you want but you could do that by using on-status-code 404 rewrite.rsp config parameter . And inside rewrite.rsp just forward the request to .html if file-exists or show your 404 page if not . Comment : @endo64 Aye that s a bit of a hack . Cheyenne should not that Apache is any better have a way of mapping a canonical url to a static resource ideally tied to the Accept header.. . .. . Answer : you can build a very simple mod which does this.. . .. . .. . save the following as cheyenne mods mod-auto-ext.r .. . .. . then add your module within your httpd.cfg like so : .. . .. . restart cheyenne and voila If you look at the source for other mods you can VERY easily setup a keyword for use in the httpd.cfg file in order to setup the auto-ext variable within the mod . Comment : To clarify and I should ve put this in my question if there is no HTML file associated with a given URL will it still pass-through to the regular 404 handler Comment : Be worth exploring how to make this work in conjunction with the Accept header also.. . Comment : yes it would generate a 404 handler . all we do is change the target server-side resource the url refers to .", "Question : I m trying to use Cheyenne http : cheyenne-server.org to serve a news feed and would like to ensure that files with the .feed extension are served as application atom+xml . How do I configure Cheyenne to do this .. . Answer : Could you change extension to .rsp instead and then generate the appropriate headers that way with the feed data as a data block inside the rsp script Comment : Surely must be a way to do this in httpd.cfg", "Question : null .. . Answer : I have a web application contained in the following structure : .. . .. . My initial config is : .. . .. . How do I configure Cheyenne so that when I go to http : site cgi-bin foo.cgi it will look for foo in app-root cgi-bin and not app-root html cgi-bin" ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
getusermedia@webcam@85
getusermedia -- method of programmatically accessing external device data such as a @placeholder video stream from a browser .
{ "confidence": [ 34.607635498046875, 34.26664352416992, 33.85845947265625, 32.00303649902344, 31.680583953857422, 31.593196868896484, 31.082014083862305, 31.082014083862305, 31.082014083862305, 30.353708267211914, 29.970500946044922, 29.329315185546875, 29.329315185546875, 29.14093017578125, 28.76809310913086, 27.089618682861328, 26.55368423461914, 26.503459930419922, 26.38011932373047, 25.886550903320312, 25.886550903320312, 25.55225372314453, 25.39649772644043, 25.23989486694336, 25.165433883666992, 25.165433883666992, 25.112510681152344, 25.06725311279297, 25.06725311279297, 25.06725311279297, 24.9957218170166, 24.781221389770508, 24.746047973632812, 24.68305015563965, 24.379789352416992, 24.16921043395996, 24.042861938476562, 23.985151290893555, 23.985151290893555, 23.985151290893555, 23.940746307373047, 23.85235595703125, 23.6986141204834, 23.575626373291016, 23.575626373291016, 23.548133850097656, 23.38188934326172, 23.364208221435547, 23.306228637695312, 23.28399085998535, 23.237079620361328, 23.237079620361328, 23.237079620361328, 23.237079620361328, 23.237079620361328, 23.237079620361328, 23.20227813720703, 23.201906204223633, 23.201906204223633, 23.14463996887207, 23.094364166259766, 22.985687255859375, 22.872676849365234, 22.551471710205078, 22.545719146728516, 22.545719146728516, 22.54071807861328, 22.54071807861328, 22.424240112304688, 22.326751708984375, 22.314544677734375, 22.28484344482422, 22.259063720703125, 22.212688446044922, 22.212688446044922, 22.212688446044922, 22.154590606689453, 22.127635955810547, 22.090255737304688, 22.08316421508789, 21.983177185058594, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.739849090576172, 21.734420776367188, 21.70671844482422, 21.676836013793945, 21.600204467773438, 21.530925750732422, 21.516324996948242, 21.516324996948242, 21.401620864868164 ], "content": [ "Using getUserMedia I can able to get video stream but no audio .", ".. . NotFoundError .. . .. . return stream .. . .. . .. . getUserMedia video : true audio : true .. . .then stream video.srcObject stream .. . .catch e console.log e.name + : + e.message .. . .. . .. . video id video width 160 height 120 autoplay video", "I m assuming there is a way to create a video file from a getUserMedia stream on ChromeOS .", "The MediaStream API is able stream data from the camera but as a video at a video resolution .", "Is it possible to use Chrome to capture video webcam and audio microphone from the browser and then save the stream as video file", "But in this case in browser 2 the remote stream is still using the old getusermedia configuration .", "I am using getUserMedia and mediaRecorder API to record an video from webcam .", "I am using the getUserMedia function to record video from a webcam .", "How to remove audio video call icon from firefox and chrome in getusermedia .", "Moverio glasses do show the video stream when getUserMedia is accessed through a Firefox webpage though .", "Apparently it is quite tricky for video source : Capture video from several webcams with getUserMedia http : stackoverflow.com questions 21182518 capture-video-from-several-webcams-with-getusermedia .. . .. . I was wondering if for the audio source the problem was different .", "Most getUserMedia demos show the video stream in a visible canvas area but that s not required .", "You can capture an image using getUserMedia without displaying the video stream in a visible canvas .", "You just set a timeout for your JS before accessing the getUserMedia .", "Is there way to get the video from webcamera getUserMedia pass it to canvas make some effects with this video and get back in video format mp4 for example", "Apparently the default camera used by GetUserMedia is the front camera .", "There are currently 2 production ready solutions for recording audio and video on the web none of which involve getUserMedia .", "getUserMedia gives you access to the device but it s up to you to record the audio .", "here is a great post on how to save your video http : ericbidelman.tumblr.com post 31486670538 creating-webm-video-from-getusermedia .. . .. . and a usefully utillity to save your audio .. . .. . https : github.com mattdiamond Recorderjs", "You need to call getUserMedia again .", "How does that work with the getUserMedia call", "I m working with getUserMedia to access the user s camera and pipe the data to a canvas .", "maybe have a look here html5rocks.com en tutorials getusermedia intro http : www.html5rocks.com en tutorials getusermedia intro", "getUserMedia and Flash", "@DarrenSweeney getUserMedia is not deprecated .", "Then it is possible to capture this input with the GetUserMedia .", "But if I set both audio and video to true I would have an error in cases when users have a microphone but do not have access to a camera which is ok according to my application logic .. . .. . How I can make a video stream optional get getUserMedia", "I m trying to share the computer s audio via webRTC and GetUserMedia but I don t know if it is possible to obtain this stream .", "http : caniuse.com stream .. . .. . getUserMedia constraints successCallBack errorCallBack .. . .. . In errorCallBack check for the error you are getting .", "In Firefox you can directly give the media stream created by getUserMedia to the mozSrcObject attribute of the audio element .", "A solution I have found is to call getUserMedia with video and audio enabled if the call fails meaning that they either don t have a camera or a mic then you call getUserMedia again from the failure callback that you provide requesting access to the microphone only .", "I followed this guide to utilise the getUserMedia API .", "But a side effect from this is that if the user also has access to a camera video is not present in stream .", "I can not get microphone access by getusermedia from the extension .", "I was under the wrong impression that adapter.js will automatically translate the getUserMedia call to navigator.mediaDevices.getUserMedia if the underlying browser supports the newer namespaced API .", "So when I am in browser 1 and trying to share the screen the share screen stream should replace the local video in browser 1 and remote video in browser 2 .", "Does anybody have any suggestions how to pass this client-side audio stream opened with getUserMedia to the server-side Java", "If you want to take high-resolution photos on a phone go with 1 since getUserMedia is limited to video resolution atm .", "I also noted in my update that getUserMedia doesn t need to show the live video .", "Ok although my use is only for mobile it s worth to know getUserMedia doesn t require to show the live video .", "For testing check also the --use-fake-device-for-media-stream option .", "If you have more question about getUserMedia you can check this tutorial http : www.html5rocks.com en tutorials getusermedia intro .", "Still the same I just get the video stream from front cam.. .", "I am currently using an Android tablet and GetUserMedia to take pictures in my program .", "Here s my code for GetUserMedia : .. . .. . I inserted facingMode in the mandatory part but didn t work .", "Possible duplicate of GetUserMedia - facingmode http : stackoverflow.com questions 32086122 getusermedia-facingmode", "getUserMedia is deprecated anyway - I d look for another solution developer.mozilla.org en docs Web API Navigator getUserMedia https : developer.mozilla.org en docs Web API Navigator getUserMedia", "I m trying to get a stream of data from my microphone ex .", "For example browser 1 has video streams A local video video streams B remote video browser 2 has video streams B local video video streams A remote video .", "MediaStreamRecorder is a WebRTC API for recording getUserMedia streams still under implementation .", "The whole UX for dealing with permissions around getUserMedia stinks .", "See : http : www.html5rocks.com en tutorials getusermedia intro", "Are there any option for the getUserMedia or any workaround to get this audio", "and by pausing you mean i set a timeout on the getUserMedia", "Getusermedia is invoked when a user hits a playbutton .", "I have a problem when detecting support for getUserMedia .", "I m trying to create a Object URL from an audio blob created from getUserMedia .", "I need to build a web application that uses WebRTC to get digital video and audio stream from USB TV Tuner .", "How can I stream both video and audio with WebRTC to access digital signals from TV Tuner", "Is there anyway I can get a 16bit 16khz WAV file out of a Web Audio API getUserMedia stream by using only javascript", "I have a working code on desktop browsers supporting getUserMedia Api I can correctly see a video preview of my webcam in the div videoPreview .", "You must use standard http : stackoverflow.com a 28911694 918910 constraints however : use https fiddle https : jsfiddle.net j2oe36eL for Chrome : .. . .. . .. . var gum mode .. . navigator.mediaDevices.getUserMedia video : facingMode : exact : mode .. . .then stream video.srcObject stream .. . .catch e log e .. . .. . var stop video.srcObject video.srcObject.getTracks .forEach t t.stop .. . .. . var log msg div.innerHTML + msg + br .. . .. . .. . button onclick stop gum user Front button .. . button onclick stop gum environment Back button .. . div id div div br .. . video id video height 320 autoplay video .. . script src https : webrtc.github.io adapter adapter-latest.js script .. . .. . The exact : https : developer.mozilla.org en-US docs Web API MediaDevices getUserMedia Syntax syntax means the constraint is required and things fail if the user doesn t have the right camera .", "Is there any way to send the data inside a MediaStream acquired by getUserMedia via HTTP eg .", "How would I go directly from video capture to a data-url in javascript", "The quality of the picture taken inside the browser using the getUserMedia API is quite poor and the letters on the identity cards are sometimes not easily readable in the image .", "The problem is that the android-browser acts as-if it have support for getUserMedia but when using it I neither get a call to the success function nor the fail function .", "I need use getUserMedia and https in pages of WeChat.But WeChat of android can not support getUserMedia with https.followings are demos that I tested.Who can help me", "getUserMedia supports promises natively now https : developer.mozilla.org en-US docs Web API MediaDevices getUserMedia so no need to wrap it .", "So if your user chooses an option in a select element for a specific microphone device you would take the ID for that device and pass it to getUserMedia .", "phones don t allow you to capture a video at the full native resolution of the device .", "Here s how I m approaching this : .. . .. . In Firefox the video element to which the local stream is attached correctly renders blackness on mute .", "Example use https fiddle https : jsfiddle.net srn9db4h in Chrome : .. . .. . .. . navigator.mediaDevices.getUserMedia video : true audio : true .. . .then stream video.srcObject stream .. . .catch e console.log e.name + : + e.message .. . .. . .. . video id video width 160 height 120 autoplay video br .. . script src https : webrtc.github.io adapter adapter-latest.js script", "We developed a web application accessed from the tablet with the Chrome browser which accesses the tablet s webcam using the getUserMedia API the implementation is simple based on JavaScript similar to the one here for example : https : davidwalsh.name demo camera.php .", "Im trying to record a 48000Hz recording via getUserMedia .", "getUserMedia isn t deprecated it just changed name to navigator.mediaDevices.getUserMedia .", "Chrome moved to requiring https for getUserMedia a while back .", "I would recommend returning the actual getUserMedia function from hasGetUserMedia instead of returning a boolean .", "I m using the recorder.js https : github.com mattdiamond Recorderjs and getUserMedia to do some audio-recording in the browser .", "I m using getUserMedia for the audio input .", "I tryed the getUserMedia method but i can t figure how to get the microphone name with this .", "I am writing a software that manipulates camera stream video in firefox .", "Code : .. . .. . Firefox error : TypeError : getUserMedia called on an object that does not implement interface MediaDevices .", "IE error : Unable to get property getUserMedia of undefined or null reference", "At this point in Chrome and Firefox any subsequent requests with getUserMedia default to the denied state .", "TypeError : getUserMedia called on an object that does not implement interface MediaDevices .", "It works on Chrome and Opera because they remind your decision for getUserMedia .", "You re asking about getUserMedia here which is effectively about camera resolutions .", "For example this doesn t work anymore http : www.html5rocks.com en tutorials getusermedia intro", "I am not able to get the getUserMedia promised based API working in Chrome .", "https : developer.mozilla.org en-US docs Web API Navigator getUserMedia .", "If instead of using getUserMedia I use navigator.mediaDevices.getUserMedia then the promise based API works .", "For now I ve been using getUserMedia to access my microphone audio .", "There is a library MIT licenced which should work I believe I have seen this exact library being used for saving ogg files from a getUserMedia audio stream on a website not long ago .", "So do you mean when share application in local stream of browser 1 then trigger a command to server and notify back browser 2 to update its remote stream which the local stream in browser 1 .", "I m attempting to randomly capture an image from a webcam and then save it to my server right now i m using getUserMedia to stream the webcam to video element then I can capture an image to a canvas using a button but i m not sure how to save that image from the canvas to my server .", "I am unfamiliar with this API or getUserMedia but I am guessing getUserMedia is required to request permission to use the microphone .", "The problem is that I stop the video when I call the function stopCamera but the LED indicator is still active it means that the I stop the stream to the video tag but not the camera itself .", "Possible duplicate of getUserMedia in chrome 47 without using https http : stackoverflow.com questions 34197653 getusermedia-in-chrome-47-without-using-https", "refer to thread getUserMedia for Firefox OS http : stackoverflow.com questions 21813121 getusermedia-for-firefox-os .. . .. . WebRTC for audio is supported in Firefox OS 1.2 .", "I have limited experience with the mediastream and mediasource apis what do you think is the best way to go about getting data from getusermedia and then appending that data to a mediasource ." ] }
{ "confidence": [ 42.59198760986328, 41.80707550048828, 41.802772521972656, 41.2682991027832, 40.67889404296875, 40.675384521484375, 39.511573791503906, 39.41299819946289, 39.26237487792969, 38.2132568359375, 38.147212982177734, 38.12643814086914, 37.80577850341797, 37.40972137451172, 37.07171630859375, 36.975364685058594, 36.51164245605469, 36.45880889892578, 36.29798126220703, 36.201568603515625 ], "content": [ "Question : I read a lot of ways to acquire an image from an html5 page . I m still unsure what s the best for my needs : .. . .. . wide support for browsers and os : at least : chrome firefox android default safari .. . I don t need real-time acquisition . The user must press a button to take a picture requesting the system camera application .. . .. . There are at least three solutions : .. . .. . input-type-file accept image capture camera .. . Navigator.getUserMedia it seems deprecated .. . MediaDevices.getUserMedia it seems experimental .. . .. . Anyway I see a lot of examples to embed the camera into the page w getUserMedia so I don t know if I can rely only on the first method . Comment : getUserMedia isn t deprecated it just changed name to navigator.mediaDevices.getUserMedia . If you want to take high-resolution photos on a phone go with 1 since getUserMedia is limited to video resolution atm . Comment : Ok thanks . I was confused by this link : developer.mozilla.org en-US docs Web API Navigator getUserMedia https : developer.mozilla.org en-US docs Web API Navigator getUserMedia I didn t understand it just changed the name but it s the same class Comment : It returns a promise rather than taking success and failure callbacks but otherwise is the same . .. . Answer : Using the WebRTC getUserMedia API is going to cover all modern browsers apart from Safari : http : caniuse.com feat stream .. . .. . Here https : mdn-samples.mozilla.org s webrtc-capturestill is an example page that uses getUserMedia to take a still picture with a link-to a page https : developer.mozilla.org en-US docs Web API WebRTC API Taking still photos describing the code . Most getUserMedia demos show the video stream in a visible canvas area but that s not required . You can capture an image using getUserMedia without displaying the video stream in a visible canvas . Unfortunately Apple has been slow to adopt WebRTC APIs so I think the file input tag is about the best your can hope for there unless you are willing to use something like Cordova . Here https : www.raymondcamden.com 2013 05 20 capturing-camerapicture-data-without-phonegap is a description of how to use the file input tag . The Media Capture API https : www.w3.org TR html-media-capture is a candidate recommendation which means it is on its way to becoming a standard however I don t know of any browsers that implement the current W3C recommendation using a bare capture attribute in the input tag . The input-type-file accept image style currently only seems to be supported by mobile browsers . In summary if you want to have broad browser support in the near future you are going to need to support both methods until Apple starts supporting WebRTC APIs or until other desktop browsers start supporting the Media Capture API or the variant with the capture attribute that is currently supported by mobile browsers . Comment : As far as I understand getUserMedia API allows to embed the camera output into the webpage . Because I don t need to embed anything but just acquire and process in background a still image I think the first method is still better . Comment : @Mark I updated my answer . If you want broad browser support in the near future unfortunately you ll probably need to support both methods . Unless your use is just mobile in which case the input tag method may suffice although it may change slightly at some point given the W3C recommendation . I also noted in my update that getUserMedia doesn t need to show the live video . Most demos show it because it s more interesting that way for demo purposes . Comment : Ok although my use is only for mobile it s worth to know getUserMedia doesn t require to show the live video .", "Question : How to remove audio video call icon from firefox and chrome in getusermedia . I have pass constraints audio+video and browser have accessed my camera and headphone and it is showing audio+video icons in top of bar so how can i remove these icons . Thank you . Comment : Are you asking how to stop accessing the user s camera or how to remove the indicator that warns the user that camera access is in progress Comment : asking for remove the indicator of camera access progress .. . Answer : Not possible thankfully . In all browsers today indicators warn users any time they potentially could be recorded and the indicators stay on until the user navigates away or until the website stops all camera and microphone streams it is accessing whichever is sooner . To stop a stream do : .. . .. . I personally find this quite reassuring as I don t like to be recorded without my knowledge . If a website could circumvent the indicators then the indicators would have no value and users would wonder whether websites they previously granted camera+mic access to are still observing them . While some cameras have hardware indicator lights not all do and even those that do don t turn on for microphone-only access . Comment : how can i get stream in other function Comment : What other function Can you rephrase", "Question : Is it possible to use Chrome to capture video webcam and audio microphone from the browser and then save the stream as video file I would like to use this to create a video photobooth-like application that allows users to record a simple 30 second message both video and audio to files that can later be watched . I have read the documentation but I have not yet seen any examples on how to capture both audio video also I did not find a way yet to store the results in a video file . Who can help .. . Answer : Use the following : .. . .. . Then treat the form as a normal file in your php Comment : How does that work with the getUserMedia call Comment : maybe have a look here html5rocks.com en tutorials getusermedia intro http : www.html5rocks.com en tutorials getusermedia intro Comment : That s the HTML Media Capture specification and unfortunately it only works on mobile-devices . It works quite well with the exception that on iOS trying to record audio only will still bring up the video recorder .", "Question : I came across several questions on this subject . I m trying to select the rear camera on an Android device running Chrome . So after some reading : .. . .. . Then as I m using Three.js in this app I m binding this ID to Jerome Etienne three extension WebcamGrabbing https : github.com jeromeetienne threex.webar : .. . .. . Then I had to modify THREEx.WebcamGrabbing class this way I removed the irrelevant parts : .. . .. . But still Chrome on Android is still giving me the stream of the face camera whatever device I select.. . .. . .. . What do I miss EDIT : Based on this topic GetUserMedia - facingmode http : stackoverflow.com questions 32086122 getusermedia-facingmode I came up with some logs to see what s happening here : Comment : Possible duplicate of GetUserMedia - facingmode http : stackoverflow.com questions 32086122 getusermedia-facingmode Comment : @jib Also tried the way provided in this topic but it keeps selecting the front cam . Comment : Did you try the fiddle https : jsfiddle.net j2oe36eL in the other answer Worked in Chrome on my S4 . - Also your own logs suggest you got the back camera : Using video device : camera 0 facing back . Comment : It works well on my device too . That s why I don t see any reason that my code is still selecting the front cam as I practically copy pasted the fiddle Comment : The important bit in the other answer is that facingMode support in Chrome for Android is provided by the adapter.js https : github.com webrtc adapter polyfill . Did you copy that .. . Answer : An alternative way to select the back camera on chrome is to use the enumerateDevices method . First get all the video input id s : .. . .. . Then the first element of the array will contain the id of the front camera the second element will contain the id of the back camera . Finally put the id of the camera that you want to use Comment : I used that method in my first attempt first code in the question : I got the right ID back camera but I got the stream of the front cam.. . Comment : You have to make sure that only one camera stream is active if the front camera stream is active then you need to stop it before starting the rear camera . Comment : Just a thought you have made the video source id as optional maybe you could try video : sourceId : VideoId It works for me on chrome on android . Comment : Those two things could help me a lot . I will try it tomorrow and tell you . Comment : I tried sourceId : VideoId where VideoId is the good ID label camera facing back . Still the same I just get the video stream from front cam.. .", "Question : null .. . Answer : I m trying to get access to my webcam from my WinForms application using Chromium webbrowser-control to do that I installed my HTML file - which is shown below - to a server on my machine then I tried to navigate to it from my application but the error callback of getUserMedia method was executed showing Permission Denied Error on the other hand it s working fine if I tried to navigate to it directly from chrome . So is there anyone could know what causes this error client.js file .. . .. . function .. . window.onerror function errorMsg url lineNumber .. . alert errorMsg URL : + url + Line : + lineNumber .. . return true .. . .. . .. . .. . function hasUserMedia .. . check if the browser supports the WebRTC .. . return navigator.getUserMedia navigator.webkitGetUserMedia .. . navigator.mozGetUserMedia .. . .. . .. . .. . if hasUserMedia .. . navigator.getUserMedia navigator.getUserMedia navigator.webkitGetUserMedia .. . navigator.mozGetUserMedia .. . .. . enabling video and audio channels .. . navigator.getUserMedia video : true audio : true function stream .. . var video document.querySelector video .. . .. . inserting our stream to the video tag .. . video.src window.URL.createObjectURL stream .. . function err alert err.name + : + err.message .. . else .. . alert WebRTC is not supported .. . .. . .. . .. . DOCTYPE html .. . .. . html lang en xmlns http : www.w3.org 1999 xhtml .. . head .. . meta charset utf-8 .. . title title .. . head .. . body .. . video autoplay video .. . script src client.js script .. . body .. . html Comment : Chrome moved to requiring https for getUserMedia a while back . That change seems to be getting in the way here given the error . Comment : Thanks for the replay @jib I have found the solution since I m using chromium web browser control to render my HTML pages using CefSharp library I should have sent a command-line argument to enable the media stream as follows : CefSettings settings new CefSettings settings.CefCommandLineArgs.Add enable-media-stream enable-media-stream Cef.Initialize settings", "Question : Here is my code . Here when video constraint is not yet allowed by user but audio is already allowed due to other just audio recordings and when prompted for the same and user closes the prompt successCallback is called and I won t be getting the VideoStream but just Audio . How can I make sure that both the video and audio permissions are allowed when successCallback is called .. . Answer : This is actually a bug in Chrome and Firefox as it should https : w3c.github.io mediacapture-main getusermedia.html dom-mediadevices-getusermedia call the errorCallback in this case . It s been fixed in Firefox Developer Edition 49 . As a workaround check that you got two tracks : .. . .. . A polyfill might look something like this use https fiddle https : jsfiddle.net hjp59reb in Chrome : .. . .. . .. . let getUserMedia constraints .. . navigator.mediaDevices.getUserMedia constraints .then stream .. . if constraints.audio stream.getAudioTracks .length .. . constraints.video stream.getVideoTracks .length .. . stream.getTracks .forEach track track.stop .. . throw new DOMException The object can not be found here . .. . NotFoundError .. . .. . return stream .. . .. . .. . getUserMedia video : true audio : true .. . .then stream video.srcObject stream .. . .catch e console.log e.name + : + e.message .. . .. . .. . video id video width 160 height 120 autoplay video Comment : Yup I ended up checking if I got both audio and video tracks in successCallback . Thanks for your answer though", "Question : I am currently using an Android tablet and GetUserMedia to take pictures in my program . Apparently the default camera used by GetUserMedia is the front camera . How do I use the rear camera as a default Here s my code for GetUserMedia : .. . .. . I inserted facingMode in the mandatory part but didn t work . Please help . Thanks .. . Answer : Update : facingMode is now available in Chrome for Android through the adapter.js https : github.com webrtc adapter polyfill facingMode is not yet implemented in Chrome for Android https : code.google.com p chromium issues detail id 290161 but works natively in Firefox for Android . You must use standard http : stackoverflow.com a 28911694 918910 constraints however : use https fiddle https : jsfiddle.net j2oe36eL for Chrome : .. . .. . .. . var gum mode .. . navigator.mediaDevices.getUserMedia video : facingMode : exact : mode .. . .then stream video.srcObject stream .. . .catch e log e .. . .. . var stop video.srcObject video.srcObject.getTracks .forEach t t.stop .. . .. . var log msg div.innerHTML + msg + br .. . .. . .. . button onclick stop gum user Front button .. . button onclick stop gum environment Back button .. . div id div div br .. . video id video height 320 autoplay video .. . script src https : webrtc.github.io adapter adapter-latest.js script .. . .. . The exact : https : developer.mozilla.org en-US docs Web API MediaDevices getUserMedia Syntax syntax means the constraint is required and things fail if the user doesn t have the right camera . If you leave it out then the constraint is optional which in Firefox for Android means it only changes the default in the camera chooser in the permission prompt . Comment : Alternatively you could use enumerateDevices https : developer.mozilla.org en-US docs Web API MediaDevices enumerateDevices to let the user flip cameras . See webrtc.github.io samples src content devices input-output https : webrtc.github.io samples src content devices input-output", "Question : In recent days I tried to use javascript to record audio stream . I found that there is no example code which works . Is there any browser supporting Here is my code Comment : I too am looking for a tutorial on how to do this . .. . Answer : getUserMedia gives you access to the device but it s up to you to record the audio . To do that you ll want to listen to the device building a buffer of the data . Then when you stop listening to the device you can format that data as a WAV file or any other format . Once formatted you can upload it to your server S3 or play it directly in the browser . To listen to the data in a way that is useful for building your buffer you ll need a ScriptProcessorNode . A ScriptProcessorNode basically sits between the input microphone and the output speakers and gives you a chance to manipulate the audio data as it streams . Unfortunately the implementation is not straightforward . You ll need : .. . .. . getUserMedia https : developer.mozilla.org en-US docs Web API Navigator.getUserMedia to access the device .. . AudioContext https : developer.mozilla.org en-US docs Web API AudioContext to create a MediaStreamAudioSourceNode and a ScriptProcessorNode .. . MediaStreamAudioSourceNode to represent the audio stream .. . ScriptProcessorNode https : developer.mozilla.org en-US docs Web API ScriptProcessorNode to get access to the streaming audio data via an onaudioprocessevent . The event exposes the channel data that you ll build your buffer with . Putting it all together : .. . .. . Rather than building all of this yourself I suggest you use the AudioRecorder https : github.com cwilso AudioRecorder code which is awesome . It also handles writing the buffer to a WAV file . Here s a demo http : www.webaudiodemos.appspot.com AudioRecorder index.html . Here s another great resource http : typedarray.org from-microphone-to-wav-with-getusermedia-and-web-audio .", "Question : In my application a user can make calls if he can produce an audio stream . So I need to require access to the microphone audio stream . Without it the application should throw an error . Video is optional . So I call navigator.getUserMedia and put constraints like this : .. . .. . audio : true video : false .. . .. . And it throws an error when a microphone is not present just like I need . But a side effect from this is that if the user also has access to a camera video is not present in stream . But if I set both audio and video to true I would have an error in cases when users have a microphone but do not have access to a camera which is ok according to my application logic .. . .. . How I can make a video stream optional get getUserMedia Comment : Check github.com alongubkin phonertc https : github.com alongubkin phonertc or refer to @Alon Gubkin . Comment : @barakmanos sc-cdn.scaleengine.net i a09d947bd5fe171b8c8fdc1b1f9f1a00.jpg http : sc-cdn.scaleengine.net i a09d947bd5fe171b8c8fdc1b1f9f1a00.jpg Comment : Then use the other option that I mentioned.. . .. . Answer : A solution I have found is to call getUserMedia with video and audio enabled if the call fails meaning that they either don t have a camera or a mic then you call getUserMedia again from the failure callback that you provide requesting access to the microphone only . Of course you can handle successes and failures however you like . NOTE : if there is no camera the pop-up requesting the initial camera feed that will fail never occurs . So the user will only get one request for access which makes this solution a tad bit more palatable . Comment : exactly like the only solution I can imagine in this situation but it seems a bit rough for me.. . Comment : the options to enable audio or video in the constraints are Boolean only . It sucks but it is the way it was designed . The good thing is that they won t get two pop-ups if there is no camera the request for video never happens .", "Question : Is it possible to use Chrome to capture video webcam and audio microphone from the browser and then save the stream as video file I would like to use this to create a video photobooth-like application that allows users to record a simple 30 second message both video and audio to files that can later be watched . I have read the documentation but I have not yet seen any examples on how to capture both audio video also I did not find a way yet to store the results in a video file . Who can help .. . Answer : MediaStreamRecorder is a WebRTC API for recording getUserMedia streams still under implementation . It allows web apps to create a file from a live audio video session . http : www.w3.org TR mediastream-recording Comment : Where did you test that code AFAIK this has not been implemented by any browser yet.. . Comment : Does postVideoToServer above really works or it was just assumed to work in future Comment : In the above code webcamstream.record is not a function . Will throw an error Comment : The MediaRecorder API has been implemented in Chrome 49 demo @ addpipe.com media-recorder-api-demo https : addpipe.com media-recorder-api-demo", "Question : I m trying to implement a webcam into a website using a video tag . It works in Chrome but FireFox and IE return errors in the console . Anyone have any ideas why Thank you Code : .. . .. . Firefox error : TypeError : getUserMedia called on an object that does not implement interface MediaDevices . IE error : Unable to get property getUserMedia of undefined or null reference .. . Answer : You forgot navigator.mozGetUserMedia for Firefox . IE doesn t have it though MS Edge does . Also remove navigator.mediaDevices.getUserMedia from that list since it works differently . My advice : Skip the prefix mess and try adapter.js https : github.com webrtc adapter the official WebRTC polyfill . Then use navigator.mediaDevices.getUserMedia https : developer.mozilla.org en-US docs Web API MediaDevices getUserMedia exclusively as everything else has been deprecated . Example use https fiddle https : jsfiddle.net srn9db4h in Chrome : .. . .. . .. . navigator.mediaDevices.getUserMedia video : true audio : true .. . .then stream video.srcObject stream .. . .catch e console.log e.name + : + e.message .. . .. . .. . video id video width 160 height 120 autoplay video br .. . script src https : webrtc.github.io adapter adapter-latest.js script", "Question : null .. . Answer : What happens if I close my browser does the file get deleted that MediaRecorder is storing while recording video I want to know does it store the recording in browser-cache before we post it to server . Comment : stackoverflow.com help how-to-ask http : stackoverflow.com help how-to-ask - please read this page for details on how to ask a question Comment : Are you not able to get my question Comment : getUserMedia is deprecated anyway - I d look for another solution developer.mozilla.org en docs Web API Navigator getUserMedia https : developer.mozilla.org en docs Web API Navigator getUserMedia Comment : but my question was that does it store data in browser-cache while recording is on . Comment : @DarrenSweeney getUserMedia is not deprecated . It was merely renamed to navigator.mediaDevices.getUserMedia .", "Question : null .. . Answer : I need to build a web application that uses WebRTC to get digital video and audio stream from USB TV Tuner . Using getUserMedia I can able to get video stream but no audio . So the question is : is it possible now What technologies should I use Should I use WebRTC to Access TV Tuner in my Web Application . I have referred : https : github.com samdutton simpl tree master but I can able to get video stream without audio . How can I stream both video and audio with WebRTC to access digital signals from TV Tuner", "Question : Is it possible to use Chrome to capture video webcam and audio microphone from the browser and then save the stream as video file I would like to use this to create a video photobooth-like application that allows users to record a simple 30 second message both video and audio to files that can later be watched . I have read the documentation but I have not yet seen any examples on how to capture both audio video also I did not find a way yet to store the results in a video file . Who can help .. . Answer : As far as i am aware there is no such way to record audio and video together and save them as one file . it is possible to capture and save the audio as a wav file and the video as a webm file . here is a great post on how to save your video http : ericbidelman.tumblr.com post 31486670538 creating-webm-video-from-getusermedia .. . .. . and a usefully utillity to save your audio .. . .. . https : github.com mattdiamond Recorderjs", "Question : I have a working code on desktop browsers supporting getUserMedia Api I can correctly see a video preview of my webcam in the div videoPreview . However when running on Android device this same code takes a picture with my front camera when I accept to share it in Chrome browser then the preview keeps frozen on this first frame . Comment : Just add autoplay attribute to video tag .. . Answer : For those encountering same problem : I fixed it by adding autoplay attribute to my video tag . Was stuck with this for a while I hope this will help someone else .", "Question : This question already has an answer here : .. . .. . How do I return the response from an asynchronous call questions 14220321 how-do-i-return-the-response-from-an-asynchronous-call 15 answers .. . .. . I want to access streamObject outside the getUserMedia . Here are the codes . Normally you would run script functions inside success callback but I don t to do that because the function getUserMedia is used many times and I don t want to repeat coding same function . I also tried code below but did not work because the myCallback needs stream in the first place. . .. . Answer : You can must use Promise for example : .. . .. . Wherever you need the stream object : .. . .. . .. . .. . As @jib said newer syntax for getUserMedia supports Promise natively so you can just : .. . .. . For now you will also need the adapter.js https : github.com webrtc adapter polyfill . Comment : getUserMedia supports promises natively now https : developer.mozilla.org en-US docs Web API MediaDevices getUserMedia so no need to wrap it . Just return navigator.mediaDevices.getUserMedia video : true audio : true Comment : Yap . i saw it . I d never used promise before . Now I know . Thank you .", "Question : I am trying to close the webcam with javascript function it has to be closed after receive some Ajax response but it seems impossible to close without refreshing the page . All the methods for close it like video.src null video.pause...etc don t work at all in any browser . The unique way is to close the stream passed as parameter on the success functions so there is any way to use this object outside the function success to close the webcam I know that this question has been asked before Stop Close webcam using getUserMedia and RTCPeerConnection Chrome 25 http : stackoverflow.com questions 15137069 stop-close-webcam-using-getusermedia-and-rtcpeerconnection-chrome-25 but my needs are different so I would need some help to solve this problem .. . .. . thanks EDIT : My working code trying to close the webcam : .. . .. . uff..it s really complicated to post here the code XD .. . Answer : I was having a problem closing the video stream track front facing camera and opening an alternate track rear facing camera in Chrome 49 . I found that MediaStream.stop has been deprecated since version 45 and has been replaced with MediaStreamTrack.stop . You can read more from a posting https : developers.google.com web updates 2015 07 mediastream-deprecations hl en on Google s developer site by Sam Dutton .", "Question : In my application a user can make calls if he can produce an audio stream . So I need to require access to the microphone audio stream . Without it the application should throw an error . Video is optional . So I call navigator.getUserMedia and put constraints like this : .. . .. . audio : true video : false .. . .. . And it throws an error when a microphone is not present just like I need . But a side effect from this is that if the user also has access to a camera video is not present in stream . But if I set both audio and video to true I would have an error in cases when users have a microphone but do not have access to a camera which is ok according to my application logic .. . .. . How I can make a video stream optional get getUserMedia Comment : Check github.com alongubkin phonertc https : github.com alongubkin phonertc or refer to @Alon Gubkin . Comment : @barakmanos sc-cdn.scaleengine.net i a09d947bd5fe171b8c8fdc1b1f9f1a00.jpg http : sc-cdn.scaleengine.net i a09d947bd5fe171b8c8fdc1b1f9f1a00.jpg Comment : Then use the other option that I mentioned.. . .. . Answer : There now exists another way . You can now check directly how many cameras and microphones the user has before calling getUserMedia : .. . .. . The old way still works as well but this may be a bit cleaner . Note that is using enumerateDevices https : developer.mozilla.org en-US docs Web API MediaDevices enumerateDevices which in Chrome at this time requires enabling a flag or using adapter.js https : github.com webrtc adapter blob master adapter.js . Update : Chrome now supports enumerateDevices as well .", "Question : I am trying to use media streams with getUserMedia on Chrome on Android . To test I worked up the script below which simply connects the input stream to the output . This code works as-expected on Chrome under Windows but on Android I do not hear anything . The user is prompted to allow for microphone access but no audio comes out of the speaker handset speaker or headphone jack . In addition the feedback beeps when rolling the volume up and down do not sound as-if Chrome is playing back audio to the system . Is it true that this functionality isn t supported on Chrome for Android yet The following questions are along similar lines but neither really have a definitive answer or explanation . HTML5 audio-recording not woorking in Google Nexus http : stackoverflow.com q 18664316 362536 .. . detecting support for getUserMedia on Android browser fails http : stackoverflow.com q 18358031 362536 .. . .. . As I am new to using getUserMedia I wanted to make sure there wasn t something I was doing in my code that could break compatibility . I should also note that this problem doesn t seem to apply to getUserMedia itself . It is possible to use getUserMedia in an audio tag as demonstrated by this code utilizes jQuery : Comment : I find the same error . I ve built a simple site that grabs a mic stream using getusermedia which works on Chrome for OS X but doesnt work for android . I get no errors etc . just 0 s in the streamed samples Comment : Looks like Google may not have fully implemented streaming from android mics yet : stackoverflow.com questions 18664316 http : stackoverflow.com questions 18664316 html5-audio-recording-not-woorking-in-google-nexus 18672536 18672536 .. . Answer : Chrome on Android now properly supports getUserMedia . I suspect that this originally had something to do with the difference in sample rate between recording and playback which exhibits the same issue on desktop Chrome . In any case all started working some time on the latest stable around February 2014 . Comment : It currently 12 09 2014 - Version 37 does not stream video on android - the same code works in desktop pc chrome but not android chrome .", "Question : From MDN s page on Navigator.getUserMedia https : developer.mozilla.org en-US docs Web API Navigator getUserMedia : .. . .. . Deprecated .. . This feature has been removed from the Web standards . Though some browsers may still support it it is in the process of being dropped . Do not use it in old or new projects . Pages or Web apps using it may break at any time . .. . So how in heaven can we access user media in browsers I see around some webapps that are perfectly capable to detect a smartphone camera so what is the solution For example this doesn t work anymore http : www.html5rocks.com en tutorials getusermedia intro Comment : MDN : Navigator.getUserMedia https : developer.mozilla.org en docs Web API Navigator getUserMedia tells you : This is a legacy API for backwards compatibility . Please use : MediaDevices.getUserMedia https : developer.mozilla.org en docs Web API MediaDevices getUserMedia Comment : Did you check the link MediaDevices has no support in mobile browsers at all and limited support on desktop browsers . Comment : Browser vendors wont adapt new features immediately and also wont kick out deprecated ones immediately there will always be a transition time . MediaDevices.getUserMedia is the new standard way you have to do it . To support as many browsers as possible while still staying up to-date you would first test for the existence of MediaDevices.getUserMedia and use it if possible and otherwise fall back to Navigator.getUserMedia Comment : Please post a link-to a demo that actually works and uses this technology . I can t find any . Comment : MDN : Navigator.getUserMedia : Examples https : developer.mozilla.org en docs Web API MediaDevices getUserMedia Examples has an example that will use the new API or the old one as fallback first asking for permission to access the camera otherwise you won t be able to detect if there is a camera and then streaming it to a video element . Camera detection without permission of the user might only be possible with flash . But even that is either already disable by default or will be in future . .. . Answer : The state of the art at the moment is navigator.mediaDevices.getUserMedia https : developer.mozilla.org en docs Web API MediaDevices getUserMedia using the adapter.js https : github.com webrtc adapter polyfill which is a shim more than a library in that its goal is to disappear once all browsers are up to spec http : iswebrtcreadyyet.com promisegum . The following works in Chrome Chrome for Android Firefox Firefox for Android Edge and Opera use https fiddle https : jsfiddle.net srn9db4h in Chrome : .. . .. . .. . navigator.mediaDevices.getUserMedia video : true audio : true .. . .then stream video.srcObject stream .. . .catch e log e.name + : + e.message .. . .. . var log msg div.innerHTML + msg + br .. . .. . .. . script src https : webrtc.github.io adapter adapter-latest.js script .. . video id video width 160 height 120 autoplay video br .. . div id div div .. . .. . The spec has settled so the main reason for the polyfill is that Chrome is catching up see this Google Developers post on choosing input-devices https : developers.google.com web updates 2015 10 media-devices hl en . The difference is the return of a promise and the new constraints syntax http : stackoverflow.com questions 28282385 webrtc-firefox-constraints 28911694 28911694 . Chrome Canary 52 supports mediaDevices.getUserMedia and video.srcObject natively . Chrome for Android still needs the polyfill . The old navigator.webkitGetUserMedia Chrome Opera navigator.mozGetUserMedia Firefox and navigator.getUserMedia Edge are around for backwards compatibility for now ." ] }
[ "yes-answer-long", "yes-answer-short" ]
webcam
UNK_RELATION
ahoy@javascript@77
ahoy -- ahoy provides a solid foundation to track visits and events in ruby @placeholder and native apps .
{ "confidence": [ 59.40031433105469, 53.08528137207031, 50.158836364746094, 49.2119140625, 44.32738494873047, 43.043548583984375, 43.043548583984375, 41.763816833496094, 41.763816833496094, 41.657020568847656, 41.57093811035156, 41.06342315673828, 40.23002243041992, 40.23002243041992, 40.14875030517578, 39.571044921875, 39.358009338378906, 39.24690246582031, 38.29131317138672, 38.29131317138672, 38.0560188293457, 36.84373474121094, 36.75752258300781, 36.75752258300781, 36.433380126953125, 34.92069625854492, 34.89360809326172, 34.89360809326172, 34.89360809326172, 34.89360809326172, 34.89360809326172, 34.58726119995117, 33.61387634277344, 33.61387634277344, 33.332130432128906, 32.08008575439453, 32.08008575439453, 32.08008575439453, 30.223134994506836, 29.795745849609375, 28.283565521240234, 27.54486656188965, 27.309898376464844, 26.91048240661621, 26.101255416870117, 26.01107406616211, 26.01107406616211, 23.933469772338867, 22.97972297668457, 22.529979705810547, 22.073991775512695, 22.053966522216797, 21.549213409423828, 21.413347244262695, 19.620182037353516, 19.606666564941406, 19.351436614990234, 19.23787498474121, 19.23787498474121, 18.340450286865234, 18.13648223876953, 18.13648223876953, 18.13648223876953, 18.13648223876953, 17.873485565185547, 17.480039596557617, 17.480039596557617, 16.96539306640625, 16.90241241455078, 16.8428955078125, 16.19837188720703, 15.597831726074219, 14.596253395080566, 14.596253395080566, 14.596253395080566, 14.596253395080566, 14.02937126159668, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938, 12.667221069335938 ], "content": [ "I m using Ahoy gem to track visits .", "I consider using Ahoy gem that can store Visits and Events .", "Events are being recorded and stored in the Ahoy : : Event table .", "github.com matsadler ahoy https : github.com matsadler ahoy .", "I am using the ahoy gem .", "I m using the Ahoy gem to get visit information .", "I am using ahoy gem for analytics .", "Did you require require ahoy in application.js", "Ahoy : : Event actually doesn t return anything useful .", "github.com ankane ahoy postgresql-94--jsonb https : github.com ankane ahoy postgresql-94--jsonb", "I followed the documentation and added a .. . .. . in one of my models but I get .. . .. . Are controllers the only place where I can track ahoy events", "Ahoy Events stores events with a number of text attributes and a properties attribute that contains data I want to query .", "Ahoy gem creates a visitor id like UUID in the database .", "so ahoy data model should contain jsonb", "For example here is the last event I return via the rails console .. . .. . Ahoy : : Event.last Ahoy : : Event Load 3.8ms SELECT ahoy events .", "I m not sure how to use custom event-tracking in ahoy .", "In the ahoy docs there is a ahoy.trackClicks function where you could track clicks based on class - https : github.com ankane ahoy.js clicks", "But I notice in production I m frequently getting the below error : .. . .. . No route matches GET ahoy visits .. . .. . But the traceback doesn t show any files I recognize .", "I am requiring ahoy in js and I can access the Javascript methods", "I am using the Ahoy gem in a Rails 4.2 app .", "I want to create some seed data for Ahoy Analytics Gem https : github.com ankane ahoy for a demo .. . .. . How would I simulate page visits but also alter the date recorded in the db to simulate past visitor data", "I am having issues with getting Ahoy to register information to the database but the logs are showing a post request : .. . .. . Any ideas why this isn t saving to the database", "The gems I m using : groupdate ahoy and kickchart .. . .. . Database : PostgreSQL 9.4", "I also added require ahoy after jquery in the application.js assets file .", "What do I need to do differently with my ahoy setup to enable it to start writing records to the visits table in my pg database .", "I have installed the Gem Ahoy as per the instruction in the link - https : github.com ankane ahoy .. . .. . Add this line to your application s Gemfile : .. . .. . And add the javascript file in app assets javascripts application.js after jQuery .", "If you look closer you can see that the Event class is inside Ahoy module .", "The problem is that ahoy is part of the controller view layer as is logs about user behaviour like request information browser etc .", "So even when you fix it somehow that you access ahoy from the model it is not the right thing to do .", "In the rails c I ran Ahoy : : Event.find by properties : class : bigyapan-6 and it gave me an err", "I am using the Ahoy gem to record user actions in a Rails 4 app .", "The events get recorded but the visits don t .", "After installing the Ahoy Gem and adding .. . ahoy.trackAll to my application.js my application is continually redirected to undefined .", "To get all records in an array return object you need to use Ahoy : : Event.all .", "I am following the suggested syntax in the gem docs here : https : github.com ankane ahoy querying-properties which gives an example of Ahoy : : Event.where properties LIKE store id : 1 .count for querying a properties text hash but I have been unable to return accurate results .", "I have installed Ahoy to give some user analytics on my rails application .", "Windows7 64 bit and rails 4.0.9 by following the doc at https : github.com ankane ahoy .", "I have been trying to set up Ahoy in my Rails 4 application .", "So I manually coded this into my landing page index controller action : .. . .. . And this line causes the following error : .. . .. . Listed in full here : https : gist.github.com renegadeandy 835a7fb0db2bb9d8ea95 .. . .. . Can anybody help me get ahoy logging visits and events please", "Accounts Controller .. . .. . Ahoy Events Model .. . .. . I have intermediate skills and apologize if this question has a simple fix please provide any details on how I would solve this issue .", "Here is the controller event I am tracking to test this : .. . .. . def show @article Article.friendly.find params : id .. . ahoy.track Viewed article article id : @article.id .. . end .. . .. . In console as expected I can see one event is returned when I search for articles with the name : Viewed Article : .. . .. . Ahoy : : Event.where name : Viewed article Ahoy : : Event Load 89.1ms SELECT ahoy events .", "So what you actually need to do is something along the lines of this : .. . .. . Ahoy : : Event.all.select event event.properties text View .size .. . .. . The run time isn t going to be that nice but I think this is what you need .", "name 1 name Viewed article ActiveRecord : : Relation Ahoy : : Event id : 6cda3790-625d-4b73-8ef0-262a26b29618 visit id : 2d56efa6-3590-4a64-acec-c0fd0ba07727 user id : nil name : Viewed article properties : article id 562 time : 2016-06-03 18 : 49 : 28 .. . .. . But when I attempt to find the same event by querying for events with the corresponding article id the event is not found : .. . .. . Ahoy : : Event.where properties LIKE article id : 562 .count 207.5ms SELECT COUNT FROM ahoy events WHERE properties LIKE article id : 562 0 .. . .. . Any suggestions are much appreciated .", "id DESC LIMIT 1 Ahoy : : Event id : fffff17f-44e6-41d7-9c32-fa895338f54e visit id : 6b05b1ca-3863-46da-9c48-a3ab5fa4a9ee user id : 1 name : click properties : tag a page conversations 2 text View href conversations 2 time : 2015-08-23 13 : 25 : 51 .. . .. . How would I retrieve all events where properties text View .. . .. . I have tried Ahoy : : Event.where : properties text View .count .. . .. . which returns : .. . .. . Ahoy : : Event.where : properties text View .count NoMethodError : undefined method to sym for nil : NilClass from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record sanitization.rb : 59 : in block in expand hash conditions for aggregates from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record sanitization.rb : 58 : in each from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record sanitization.rb : 58 : in expand hash conditions for aggregates from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record relation query methods.rb : 957 : in build where from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record relation query methods.rb : 584 : in where", "When I check the tables in my production db that resides in my original Ruby on Rails directory I see all my lovely ahoy analytics tables : .. . .. . However after I run warbler compiled war and add the war file to Tomcat s webapps directory here s what tables I have in WEB-INF db production.sqlite3 : .. . .. . Any ideas where ahoy events and visits could have gone", "edit : .. . .. . I detail my idea : if you have any js code not compliant that make browser didn t get 200 http success and then the page loading fail if your ahoy call is after that browser didn t execute it", "The problem with question involving gems is that only people using that gem have the experience to answer and with a gem that is not very commonly used and not maintained like Ahoy last update 3 years ago you can get into a situation like this .", "I m using ahoy email https : github.com ankane ahoy email ruby gem to track the emails I send .", "I was not sure if visits and events would be tracked automatically - so I went to a couple of pages and checked manually in the DB and I see no entries in the visits or ahoy events tables .", "I decided after apneadiving s insight to just create an action in my controller for each of my downloadable links - and used the rails API from ahoy combined with the rails send file method - which gives me the kind of behaviour I expect .", "I would like to use this gem to track user visits and ip addresses in particular and then restrict the number of sign-in s per IP address .", "did you add track click : true and track open : true", "When I logged the values of visitId and track all their values were null .", "But after clicking links lots of times the links visits aren t generated .", "To track if the mail is opened or clicked i am using ahoy email .", "Though the above js code track it is it possible just to track clicks on ads and nothing else", "This is a syntax-error since properties : class is not a valid hash key in Ruby .", "I only want to track clicks on specific page .", "I want to track the visit clicking my links .", "I found out that there are ways like ahoy.trackClicks to track clicks .", "For today s visits example : .. . .. . Like this I have working : Month Yesterday and Week visitors .", "I ve followed the readme file but unable to see records in visits table in my pg db .", "I ve now noticed that visits table does gets populated if i access website from IE Or Firefox .", "have you try to find some js code that may not be compliant with browsers that doesn t appear in visits table", "I have just tried to query Events in console and I get the following error message : .. . .. . Is this expected behavior", "Thanks", "Alright worked it out for some reason in my initialiser it had : .. . .. . As opposed to :", "from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record relation query methods.rb : 574 : in where from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record querying.rb : 10 : in where from irb : 13 from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands console.rb : 110 : in start from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands console.rb : 9 : in start from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands commands tasks.rb : 68 : in console from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands commands tasks.rb : 39 : in run command", "from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands.rb : 17 : in top required from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 274 : in require from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 274 : in block in require from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 240 : in load dependency from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 274 : in require from Users dariusgoore development blackops bin rails : 8 : in from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 268 : in load from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 268 : in block in load from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 240 : in load dependency from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 268 : in load from Users dariusgoore .rubies ruby-2.2.1 lib ruby 2.2.0 rubygems core ext kernel require.rb : 54 : in require from Users dariusgoore .rubies ruby-2.2.1 lib ruby 2.2.0 rubygems core ext kernel require.rb : 54 : in require .. . .. . I have looked online for querying hash attributes without success .", "class UserMailer ApplicationMailer track utm campaign : boom default from : myemailid .. . .. . opened is working fine but clicked is showing nil in the table even after i clicked the link in email .", "Odd.. . Have you marked any models visitable and have you tried setting ahoy.track in your Ruby instead of your js", "Ideally I want it to track everything automatically if there is some golden switch I need to press :", "I am trying to use ahoy.js to log the users activity on my site .", "I don t know where I got it wrong .", "I didn t make modifications to ahoy.js .", "What could be the problem", "I have some code which calls a function like this : .. . .. . However because this track call is asynchronous - sometimes it doesn t complete before the PDF has loaded - and therefore the event is not tracked .", "It should give me the time at when it is opened and clicked .", "But it s not working properly to give the time .", "What I m missing .", "Note : I run the project in my localhost", "@RajarshiDas yes I added .", "That didn t help", "I had a similar issue .", "Make sure your server is accessible from the outside world so the image can be fetched .", "A little background : I eventually figured that it worked from the godaddy webclient but not gmail and thats because the webclient was just loading the image from my browser so it could see my localhost but I believe gmail uses a proxy server to load images https : filippo.io how-the-new-gmail-image-proxy-works-and-what-does-this-mean-for-you so it couldn t find it .", "I ve been using ngrok https : ngrok.com lately to make my localhost outside accessible temporarily", "and been liking it .", "Here is my model : .. . .. . And Schema : .. . .. . Thanks", "When a class is inside a module you can access it that way : ModuleNmae : : ClassNmae .. . .. . so in your case : .. . .. . and you can use that as normal class for example : .. . .. . other properties you gave the event can be found under properties .", "for example :", "The book-model should not know that somebody viewed the book .", "It is better to do something like this in a controller :", "That was my guess but I wanted confirmation .", "Here s the full trace : .. . .. . Is this just a bot crawling all URLs", "How can I find out where it s originating from based on the trace", "In the ahoy events table I have properties column of json data type .", "I want to find specific data based on that column .", "Suppose I have .. . .. . this as data and I want to find by class ." ] }
{ "confidence": [ 64.59911346435547, 62.307090759277344, 61.183494567871094, 57.82282257080078, 57.636810302734375, 57.636810302734375, 57.57917785644531, 56.279541015625, 55.51470947265625, 54.38322448730469, 52.692989349365234, 51.5290641784668, 50.291770935058594, 48.267295837402344, 46.91569519042969, 46.83244323730469, 46.48768615722656, 45.47211456298828, 39.55890655517578, 34.72880554199219 ], "content": [ "Question : I have installed Ahoy to give some user analytics on my rails application . I am running rails 4.1.10 and using Postgres 9.3.10 .. . .. . I have added the gem to my gemfile : .. . .. . And I have run : .. . .. . As per the docs . I also added require ahoy after jquery in the application.js assets file . I was not sure if visits and events would be tracked automatically - so I went to a couple of pages and checked manually in the DB and I see no entries in the visits or ahoy events tables . So I manually coded this into my landing page index controller action : .. . .. . And this line causes the following error : .. . .. . Listed in full here : https : gist.github.com renegadeandy 835a7fb0db2bb9d8ea95 .. . .. . Can anybody help me get ahoy logging visits and events please Ideally I want it to track everything automatically if there is some golden switch I need to press : Comment : Have you restarted your server Sorry - I have to check Comment : That was the exact problem . Oh lordy .. . Answer : The problem was that the server had not been restarted : .. . .. . Closing the server and reopening it - solved the problem", "Question : I m not sure how to use custom event-tracking in ahoy . I followed the documentation and added a .. . .. . in one of my models but I get .. . .. . Are controllers the only place where I can track ahoy events .. . Answer : The problem is that ahoy is part of the controller view layer as is logs about user behaviour like request information browser etc . The book-model should not know that somebody viewed the book . So even when you fix it somehow that you access ahoy from the model it is not the right thing to do . It is better to do something like this in a controller : Comment : That was my guess but I wanted confirmation . Thanks", "Question : null .. . Answer : I would like to build a simple analytics section for a Rails 4.2 app . I consider using Ahoy gem that can store Visits and Events . I already managed to display a line-graphic the number of visitors using kickchart . For today s visits example : .. . .. . Like this I have working : Month Yesterday and Week visitors . But I was asked to show the recurrent visitors and the new visitors . Ahoy gem creates a visitor id like UUID in the database . So with this I can know which visitor is returning and which is new . I don t know how to retrieve this data and group it so I can display it in kickchart . I need today yesterday this week and this month recurrent and new visitors . The gems I m using : groupdate ahoy and kickchart .. . .. . Database : PostgreSQL 9.4", "Question : null .. . Answer : I m using Ahoy gem to track visits . The installation went well and it seems to work fine on my local machine but when running on Heroku the current visit is null .. . .. . I log in the following way : .. . .. . on my machine I get : .. . .. . while running on Heroku I get : .. . .. . and yes it was bundles and the db was migrated . any ideas what went wrong Thanks Comment : Sorry to see you haven t gotten any response . The problem with question involving gems is that only people using that gem have the experience to answer and with a gem that is not very commonly used and not maintained like Ahoy last update 3 years ago you can get into a situation like this . You could try contacting the developer Mat Sadler . github.com matsadler ahoy https : github.com matsadler ahoy . Advice I would give is that before investing time into any gem take a look and make sure it s alive and being actively maintained .", "Question : null .. . Answer : I m using the Ahoy gem to get visit information . But I notice in production I m frequently getting the below error : .. . .. . No route matches GET ahoy visits .. . .. . But the traceback doesn t show any files I recognize . Here s the full trace : .. . .. . Is this just a bot crawling all URLs How can I find out where it s originating from based on the trace", "Question : I want to create some seed data for Ahoy Analytics Gem https : github.com ankane ahoy for a demo .. . .. . How would I simulate page visits but also alter the date recorded in the db to simulate past visitor data Any help is appreciated Thanks .. . Answer : could simulate in part with capybara and could also alter value in capybara routine .. . .. . also https : github.com jnicklas capybara in case that may be of interest", "Question : I am using the Ahoy gem in a Rails 4.2 app . Ahoy Events stores events with a number of text attributes and a properties attribute that contains data I want to query . For example here is the last event I return via the rails console .. . .. . Ahoy : : Event.last Ahoy : : Event Load 3.8ms SELECT ahoy events . FROM ahoy events ORDER BY ahoy events . id DESC LIMIT 1 Ahoy : : Event id : fffff17f-44e6-41d7-9c32-fa895338f54e visit id : 6b05b1ca-3863-46da-9c48-a3ab5fa4a9ee user id : 1 name : click properties : tag a page conversations 2 text View href conversations 2 time : 2015-08-23 13 : 25 : 51 .. . .. . How would I retrieve all events where properties text View .. . .. . I have tried Ahoy : : Event.where : properties text View .count .. . .. . which returns : .. . .. . Ahoy : : Event.where : properties text View .count NoMethodError : undefined method to sym for nil : NilClass from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record sanitization.rb : 59 : in block in expand hash conditions for aggregates from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record sanitization.rb : 58 : in each from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record sanitization.rb : 58 : in expand hash conditions for aggregates from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record relation query methods.rb : 957 : in build where from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record relation query methods.rb : 584 : in where from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record relation query methods.rb : 574 : in where from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activerecord-4.2.5.1 lib active record querying.rb : 10 : in where from irb : 13 from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands console.rb : 110 : in start from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands console.rb : 9 : in start from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands commands tasks.rb : 68 : in console from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands commands tasks.rb : 39 : in run command from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems railties-4.2.5.1 lib rails commands.rb : 17 : in top required from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 274 : in require from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 274 : in block in require from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 240 : in load dependency from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 274 : in require from Users dariusgoore development blackops bin rails : 8 : in from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 268 : in load from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 268 : in block in load from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 240 : in load dependency from Users dariusgoore development blackops .bundle gems ruby 2.2.0 gems activesupport-4.2.5.1 lib active support dependencies.rb : 268 : in load from Users dariusgoore .rubies ruby-2.2.1 lib ruby 2.2.0 rubygems core ext kernel require.rb : 54 : in require from Users dariusgoore .rubies ruby-2.2.1 lib ruby 2.2.0 rubygems core ext kernel require.rb : 54 : in require .. . .. . I have looked online for querying hash attributes without success . Any guidance is much appreciated . .. . Answer : Ahoy : : Event actually doesn t return anything useful . To get all records in an array return object you need to use Ahoy : : Event.all . So what you actually need to do is something along the lines of this : .. . .. . Ahoy : : Event.all.select event event.properties text View .size .. . .. . The run time isn t going to be that nice but I think this is what you need . Comment : you are right the run time is nothing nice but i ll take it . Thanks very much", "Question : null .. . Answer : I am using the Ahoy gem to record user actions in a Rails 4 app . Events are being recorded and stored in the Ahoy : : Event table . Each event has a properties hash attribute stored as text . In this case am trying to return the number of article views for a specific article . I am following the suggested syntax in the gem docs here : https : github.com ankane ahoy querying-properties which gives an example of Ahoy : : Event.where properties LIKE store id : 1 .count for querying a properties text hash but I have been unable to return accurate results . Here is the controller event I am tracking to test this : .. . .. . def show @article Article.friendly.find params : id .. . ahoy.track Viewed article article id : @article.id .. . end .. . .. . In console as expected I can see one event is returned when I search for articles with the name : Viewed Article : .. . .. . Ahoy : : Event.where name : Viewed article Ahoy : : Event Load 89.1ms SELECT ahoy events . FROM ahoy events WHERE ahoy events . name 1 name Viewed article ActiveRecord : : Relation Ahoy : : Event id : 6cda3790-625d-4b73-8ef0-262a26b29618 visit id : 2d56efa6-3590-4a64-acec-c0fd0ba07727 user id : nil name : Viewed article properties : article id 562 time : 2016-06-03 18 : 49 : 28 .. . .. . But when I attempt to find the same event by querying for events with the corresponding article id the event is not found : .. . .. . Ahoy : : Event.where properties LIKE article id : 562 .count 207.5ms SELECT COUNT FROM ahoy events WHERE properties LIKE article id : 562 0 .. . .. . Any suggestions are much appreciated .", "Question : I m trying to use ahoy matey gem in development env . i.e . Windows7 64 bit and rails 4.0.9 by following the doc at https : github.com ankane ahoy . I would like to use this gem to track user visits and ip addresses in particular and then restrict the number of sign-in s per IP address . I ve followed the readme file but unable to see records in visits table in my pg db . Below are the steps I ve followed so far - .. . .. . The below command generated an error- Could not find generator ahoy : stores : fluentd . .. . .. . I ve tried including below script in layout application.html.erb and other pages as well inside script tags without success . included the below in my sign in method in session controller .. . .. . Included the below in my index method of landing page without success . ahoy.track Viewed Landing title : Landing page viewed .. . .. . The only thing that has worked so far is below code which I ve added in my application controller and it is populating my ahoy events table . I ve also restarted my rails webserver I m using thin in dev and puma in prod . Could you please let me know what I m missing here . What do I need to do differently with my ahoy setup to enable it to start writing records to the visits table in my pg database . Any pointers will be appreciated . TIA Comment : Hi Just another update. . I ve now noticed that visits table does gets populated if i access website from IE Or Firefox . I m unable to see any record if i access it from chrome browser . Any idea why this would be the case .. . Answer : have you try to find some js code that may not be compliant with browsers that doesn t appear in visits table edit : .. . .. . I detail my idea : if you have any js code not compliant that make browser didn t get 200 http success and then the page loading fail if your ahoy call is after that browser didn t execute it", "Question : null .. . Answer : After installing the Ahoy Gem and adding .. . ahoy.trackAll to my application.js my application is continually redirected to undefined . I ve tried uninstalling and recreating the database but no luck . Here s the server log . Comment : Have you run rails generate ahoy : stores : active record -d postgresql rake db : migrate Did you require require ahoy in application.js Comment : I ran the mysql equivalent of rails generate . I am requiring ahoy in js and I can access the Javascript methods Comment : Odd.. . Have you marked any models visitable and have you tried setting ahoy.track in your Ruby instead of your js", "Question : null .. . Answer : I am using JRuby 9.0.0.0.rc2 with jdk1.8.0 65 on a Windows Server 2013 box . When I check the tables in my production db that resides in my original Ruby on Rails directory I see all my lovely ahoy analytics tables : .. . .. . However after I run warbler compiled war and add the war file to Tomcat s webapps directory here s what tables I have in WEB-INF db production.sqlite3 : .. . .. . Any ideas where ahoy events and visits could have gone I d appreciate any tips you have for troubleshooting this", "Question : I am using the ahoy gem . I found out that there are ways like ahoy.trackClicks to track clicks . But it also tracks clicks on dropdown and signin and signout . I only want to track clicks on specific page . I have a page with ads and clicking on that ads will lead to new tab with external page . Though the above js code track it is it possible just to track clicks on ads and nothing else .. . Answer : In the ahoy docs there is a ahoy.trackClicks function where you could track clicks based on class - https : github.com ankane ahoy.js clicks Comment : i added class to my a tag and still it records every clicks . Even it records the click when I closed the alert box .", "Question : null .. . Answer : I am getting the following postgres error : .. . .. . operator does not exist : jsonb integer .. . .. . operator does not exist : jsonb integer http : i.stack.imgur.com 7WJXL.png .. . .. . I have my application hosted on Heroku and am using a Postgres 9.4 DB . Below is what my accounts controller looks like with the ahoy matey analytics gem . Accounts Controller .. . .. . Ahoy Events Model .. . .. . I have intermediate skills and apologize if this question has a simple fix please provide any details on how I would solve this issue . Thanks Comment : I assume ahoy events . properties column is jsonb and you are trying to compare it with integer value 1 . btw - are you using json OR jsonb github.com ankane ahoy postgresql-94--jsonb https : github.com ankane ahoy postgresql-94--jsonb Comment : @Dmitry I am using jsonb Comment : so ahoy data model should contain jsonb Comment : @Dmitry is that a solution or a question.. . I m getting confused :", "Question : I am having issues with getting Ahoy to register information to the database but the logs are showing a post request : .. . .. . Any ideas why this isn t saving to the database Thanks .. . Answer : Alright worked it out for some reason in my initialiser it had : .. . .. . As opposed to :", "Question : I am using ahoy gem for analytics . In the ahoy events table I have properties column of json data type . I want to find specific data based on that column . Suppose I have .. . .. . this as data and I want to find by class . In the rails c I ran Ahoy : : Event.find by properties : class : bigyapan-6 and it gave me an err .. . Answer : Try the following : .. . .. . I think it is getting confused with string followed by : Comment : This won t work - he s trying to query a JSON column and the above is not a hash if that is what you where aiming for .", "Question : I am using ahoy gem for analytics . In the ahoy events table I have properties column of json data type . I want to find specific data based on that column . Suppose I have .. . .. . this as data and I want to find by class . In the rails c I ran Ahoy : : Event.find by properties : class : bigyapan-6 and it gave me an err .. . Answer : This is a syntax-error since properties : class is not a valid hash key in Ruby . To query Postgres JSON columns you need to provide the query as a string : .. . .. . ActiveRecord does not take a nested hash in this case like it would for an association . I doubt that ActiveRecord will ever support this since its very RBDMS specific and the type coercion thing - vs - would make it really complex . See : .. . .. . http : edgeguides.rubyonrails.org active record postgresql.html json .. . http : robertbeene.com rails-4-2-and-postgresql-9-4 Comment : Thanks max and I will take a good look at the links that you have provided .", "Question : I have just tried to query Events in console and I get the following error message : .. . .. . Is this expected behavior Here is my model : .. . .. . And Schema : .. . .. . Thanks .. . Answer : If you look closer you can see that the Event class is inside Ahoy module . When a class is inside a module you can access it that way : ModuleNmae : : ClassNmae .. . .. . so in your case : .. . .. . and you can use that as normal class for example : .. . .. . other properties you gave the event can be found under properties . for example :", "Question : null .. . Answer : I have installed the Gem Ahoy as per the instruction in the link - https : github.com ankane ahoy .. . .. . Add this line to your application s Gemfile : .. . .. . And add the javascript file in app assets javascripts application.js after jQuery . MySQL or SQLite .. . .. . Add activeuuid to your Gemfile . And run : .. . .. . The last command produces following error Comment : binary doesnt exist in sqlite", "Question : I have some code which calls a function like this : .. . .. . However because this track call is asynchronous - sometimes it doesn t complete before the PDF has loaded - and therefore the event is not tracked . I do not necessarily want to have to go and handle this tracking in the controller as it would be far simpler for me to use this method if possible - so is there any way I can force this ahoy.track call to be run synchronously Comment : based on the code I doubt it . github.com ankane ahoy.js blob master ahoy.js L214-L231 https : github.com ankane ahoy.js blob master ahoy.js L214-L231 Silly it doesnt provide callback or promise chain Comment : Agreed - thanks for the insight . .. . Answer : I decided after apneadiving s insight to just create an action in my controller for each of my downloadable links - and used the rails API from ahoy combined with the rails send file method - which gives me the kind of behaviour I expect .", "Question : null .. . Answer : I have been trying to set up Ahoy in my Rails 4 application . The set up was for SQLite . In development it seems to work fine . But When I run my specs I get this error..... . .. . .. . And I can t seem to run it in production on Heroku which uses PostgreSQL . So 2 questions : .. . .. . 1 . How do I fix this error above and run my tests . 2 . How do you go about using this gem in production if it requires a different database set up for PostgreSQL .. . .. . I am fairly new to this so I apologise if this is simple .. . .. . This appears to be related but I can t see what the solution is exactly from this.. . https : github.com jashmenn activeuuid issues 55" ] }
[ "yes-answer-long", "yes-answer-short" ]
javascript
UNK_RELATION
secs@s@39
secs -- secs gem is the semiconductor @placeholder equipment interface protocol for equipment-to-host data communications .
{ "confidence": [ 42.80449676513672, 40.1163330078125, 32.92457580566406, 29.01871109008789, 25.84490966796875, 18.65854263305664, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 14.271293640136719, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789, 12.829507827758789 ], "content": [ "I have to implement a communication between my app and another PC using the industrial standard protocol SECS GEM http : en.wikipedia.org wiki SECS GEM PV2 .", "This array of bytes above is the example header of SECS-1 protocol .", "Agileo Automation http : www.agileo-automation.com index.php chlangue EN proposes a SECS GEM and PV2 library that can be implemented either using Microsoft COM DCOM interface or using native .NET API .", "The page about High-Speed SECS Message Services http : en.wikipedia.org wiki HSMS lists an open-source implementation : .. . .. . FREESECS an open-source suite of implementations of semiconductor fab communication standards http : opensecs.sourceforge.net .. . .. . FREESECS components are implemented in C and C++ .", "Integration is rather straightforward and looks like the following to send a Collection Event with a variable : .. . .. . For additional information you can look at Agileo Automation SECS GEM and PV2 library http : www.agileo-automation.com index.php niveau 3 niveau id 5 chlangue EN", "Google didn t give me any usable results so far maybe someone has experience with this protocol already", "I m writing a parser for SML messages .", "Input : a file with many SML messages .", "Ouput : a queue of messages with identified elements .", "This is my code : .. . .. . This is my file Message.sml .. . .. . And the result is : .. . .. . I don t know why my program can t realize TYPE : L", "I tried with TYPE U4 it works .", "There are too many things going wrong to be able to provide an answer to your question .", "Even if your question gets answered it wouldn t be of any help because the grammar contains too many errors .", "I recommend throwing this away and starting over .", "But before starting over read a couple of ANTLR tutorials http : stackoverflow.com questions 278480 antlr-tutorials or get a hold of a copy of The Definitive ANTLR Reference http : pragprog.com book tpantlr the-definitive-antlr-reference .", "Some of the issues : .. . .. . you don t seem to know the difference between parser and lexer rules .", "Some of your parser rules should be lexer rules and some of your lexer rules should really be parser rules .. . you use fragment rules inside parser rules : this will never work since fragment rules will never turn into tokens themselves .", "Fragment rule can only be used in lexer rules or other fragment rules .. . you re setting static lexer-variables from the parser : you cannot do this", "The parser buffers tokens at its own will causing your logic to go horribly wrong .", "There is a strict separation between the lexer and parser : the lexer simply produces tokens without any interference from the parser", "Lexing is a separate process .", "If you do want that choose something other than ANTLR Google for scannerless parsing PEG and or packrat .", "This problem is most probably why L isn t being tokenized as a TYPE in your particular case .. . you re using literal tokens like W w but also a LETTER as a lexer rule .", "However a single w or W will now never be tokenized as a LETTER since .", "Defining literal tokens inside parser rule is more or less the same as doing : .. . .. . W : w W .. . LETTER : a . . z A . . Z this will never match a w or W now .. . .. . This also has to do with the fact that ANTLR s lexer operates independently from the parser .", "Again : you really need to master the basics before continuing IMO .", "Best of luck", "Are there any libraries available that I can use with Delphi", "Currently available are : HSMS SEMI E37.1 and SECSII SEMI E5 .", "Maybe these components can be used with Delphi .", "For interfacing with Delphi using COM interoperability is a requirement .", "A sample application demonstrating the library features in Microsoft Excel using VBA with COM interoperability is available .", "I have this array of bytes that I want to calculate to get a 2 byte checksum .", "The checksum should be byte 0x01 byte 0xf7 but how will be the method in Java to accomplish this", "I use the for-loop to sum all the bytes in integer but I m getting the result-of 0x77 only which is far from 0x01 0xf7 .", "my second solution was .. . .. . but I m getting the value 0xfffffef7 much closer to the value that I expect .", "You want the result to be stored in a single variable or to be stored in a new array", "It s not clear .", "the result should be in a new array .", "Java bytes are signed .", "Just get the unsigned value by using b 0xff and then sum up .", "Then convert sum to byte array like in here Java integer to byte array http : stackoverflow.com questions 2183240 java-integer-to-byte-array", "i think i found a workaround but if you guys think this is not the best solution you are welcome to improved this code ." ] }
{ "confidence": [ 63.504150390625, 54.763572692871094, 34.303627014160156, 34.303627014160156, 13.756978034973145 ], "content": [ "Question : I have to implement a communication between my app and another PC using the industrial standard protocol SECS GEM http : en.wikipedia.org wiki SECS GEM PV2 . Are there any libraries available that I can use with Delphi Google didn t give me any usable results so far maybe someone has experience with this protocol already .. . Answer : The page about High-Speed SECS Message Services http : en.wikipedia.org wiki HSMS lists an open-source implementation : .. . .. . FREESECS an open-source suite of implementations of semiconductor fab communication standards http : opensecs.sourceforge.net .. . .. . FREESECS components are implemented in C and C++ . Currently available are : HSMS SEMI E37.1 and SECSII SEMI E5 . Maybe these components can be used with Delphi .", "Question : I have to implement a communication between my app and another PC using the industrial standard protocol SECS GEM http : en.wikipedia.org wiki SECS GEM PV2 . Are there any libraries available that I can use with Delphi Google didn t give me any usable results so far maybe someone has experience with this protocol already .. . Answer : Agileo Automation http : www.agileo-automation.com index.php chlangue EN proposes a SECS GEM and PV2 library that can be implemented either using Microsoft COM DCOM interface or using native .NET API . For interfacing with Delphi using COM interoperability is a requirement . A sample application demonstrating the library features in Microsoft Excel using VBA with COM interoperability is available . Integration is rather straightforward and looks like the following to send a Collection Event with a variable : .. . .. . For additional information you can look at Agileo Automation SECS GEM and PV2 library http : www.agileo-automation.com index.php niveau 3 niveau id 5 chlangue EN", "Question : I have this array of bytes that I want to calculate to get a 2 byte checksum . The checksum should be byte 0x01 byte 0xf7 but how will be the method in Java to accomplish this This array of bytes above is the example header of SECS-1 protocol . I use the for-loop to sum all the bytes in integer but I m getting the result-of 0x77 only which is far from 0x01 0xf7 . my second solution was .. . .. . but I m getting the value 0xfffffef7 much closer to the value that I expect . Comment : You want the result to be stored in a single variable or to be stored in a new array It s not clear . Comment : the result should be in a new array . .. . Answer : Java bytes are signed . Just get the unsigned value by using b 0xff and then sum up . Then convert sum to byte array like in here Java integer to byte array http : stackoverflow.com questions 2183240 java-integer-to-byte-array", "Question : I have this array of bytes that I want to calculate to get a 2 byte checksum . The checksum should be byte 0x01 byte 0xf7 but how will be the method in Java to accomplish this This array of bytes above is the example header of SECS-1 protocol . I use the for-loop to sum all the bytes in integer but I m getting the result-of 0x77 only which is far from 0x01 0xf7 . my second solution was .. . .. . but I m getting the value 0xfffffef7 much closer to the value that I expect . Comment : You want the result to be stored in a single variable or to be stored in a new array It s not clear . Comment : the result should be in a new array . .. . Answer : i think i found a workaround but if you guys think this is not the best solution you are welcome to improved this code .", "Question : I m writing a parser for SML messages . Input : a file with many SML messages . Ouput : a queue of messages with identified elements . This is my code : .. . .. . This is my file Message.sml .. . .. . And the result is : .. . .. . I don t know why my program can t realize TYPE : L I tried with TYPE U4 it works . .. . Answer : There are too many things going wrong to be able to provide an answer to your question . Even if your question gets answered it wouldn t be of any help because the grammar contains too many errors . I recommend throwing this away and starting over . But before starting over read a couple of ANTLR tutorials http : stackoverflow.com questions 278480 antlr-tutorials or get a hold of a copy of The Definitive ANTLR Reference http : pragprog.com book tpantlr the-definitive-antlr-reference . Some of the issues : .. . .. . you don t seem to know the difference between parser and lexer rules . Some of your parser rules should be lexer rules and some of your lexer rules should really be parser rules .. . you use fragment rules inside parser rules : this will never work since fragment rules will never turn into tokens themselves . Fragment rule can only be used in lexer rules or other fragment rules .. . you re setting static lexer-variables from the parser : you cannot do this The parser buffers tokens at its own will causing your logic to go horribly wrong . There is a strict separation between the lexer and parser : the lexer simply produces tokens without any interference from the parser Lexing is a separate process . If you do want that choose something other than ANTLR Google for scannerless parsing PEG and or packrat . This problem is most probably why L isn t being tokenized as a TYPE in your particular case .. . you re using literal tokens like W w but also a LETTER as a lexer rule . However a single w or W will now never be tokenized as a LETTER since . Defining literal tokens inside parser rule is more or less the same as doing : .. . .. . W : w W .. . LETTER : a . . z A . . Z this will never match a w or W now .. . .. . This also has to do with the fact that ANTLR s lexer operates independently from the parser . Again : you really need to master the basics before continuing IMO . Best of luck" ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
iodbc@open-source@45
iodbc -- iodbc is an lgpl bsd dual-licensed @placeholder project that implements the odbc api on non-windows platforms .
{ "confidence": [ 50.87993240356445, 49.485130310058594, 47.86958312988281, 47.80807113647461, 47.65367126464844, 46.49273681640625, 45.970184326171875, 45.51340103149414, 45.44066619873047, 44.634212493896484, 42.467620849609375, 42.13820266723633, 42.13820266723633, 41.843971252441406, 40.86906433105469, 40.28363800048828, 39.67496871948242, 38.7572135925293, 38.7572135925293, 37.488075256347656, 37.488075256347656, 36.96879577636719, 36.549766540527344, 36.116111755371094, 35.96697235107422, 35.69965362548828, 34.203041076660156, 34.203041076660156, 34.17768859863281, 33.6368293762207, 32.93389892578125, 32.93389892578125, 32.93389892578125, 31.415790557861328, 31.415790557861328, 31.41280174255371, 31.41280174255371, 31.41280174255371, 31.41280174255371, 31.41280174255371, 28.625551223754883, 27.02482795715332, 26.306119918823242, 26.252960205078125, 26.019872665405273, 25.50372886657715, 23.635473251342773, 23.078996658325195, 23.078996658325195, 22.1143741607666, 21.458847045898438, 20.803916931152344, 20.419544219970703, 20.189708709716797, 20.189708709716797, 19.912128448486328, 19.912128448486328, 19.816883087158203, 18.965505599975586, 18.668609619140625, 18.642990112304688, 18.642990112304688, 18.642990112304688, 17.696365356445312, 17.696365356445312, 17.495121002197266, 17.121891021728516, 17.121891021728516, 16.637527465820312, 15.249009132385254, 15.115011215209961, 14.475458145141602, 14.475458145141602, 12.773496627807617, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297, 12.562389373779297 ], "content": [ "iODBC is LGPL BSD .. . .. . In practice there is not a lot of difference but I think you ll find unixODBC is more widely used .", "Best guess is that your configure command left something out I think you need something like --with-pdo-odbc iODBC usr local iODBC where you likely had --with-pdo-odbc iODBC .. .", "iODBC and UnixODBC are built to be API equivalent so you should just need to ensure that your drivers and DSNs are properly configured in the iODBC locations optimally via iODBC Administrator.app Applications iODBC .", "iODBC I believe uses wchar-t this is based on attempting to support iODBC in DBD : : ODBC .. . .. . cursor library .. . .. . unixODBC has one I don t think iODBC has .", "You need to compile php with iodbc support instead of odbc .", "I m not sure about iODBC .", "There are tricks you can bring to bear such as those used by the iODBC Administrator.app on OS X http : www.iodbc.org dataspace iodbc wiki iODBC Downloads Mac OS X .", "iODBC http : iodbc.org and unixOBDC are basically API equivalent both being cross-platform implementations of Microsoft s ODBC standard .", "Is there a known conflict between Xcode version of iODBC and the actual iODBC DM downloaded and installed from the bundle", "OS X comes with iODBC preinstalled .", "You may also find some benefit in the Ruby+ODBC http : www.iodbc.org dataspace iodbc wiki iODBC IODBCRubyHOWTO MacOS X and Ruby-on-Rails http : odbc-rails.rubyforge.org docs we ve published .", "It is iODBC http : www.iodbc.org and unixODBC http : www.unixodbc.org .", "If I use IODBC to connect with iodbc.ini it works", "Noted for future reference : FreeTDS or iODBC", "I never installed iODBC on my Mac .", "Also do I need to install odbc driver unixodbc or iodbc to configure psqlodbc", "You ll be better off updating iODBC with all the latest patches http : www.iodbc.org dataspace iodbc wiki iODBC Downloads Mac OS X Apple tends to be a bit behind on these than shifting to UnixODBC .", "This did not used to be the case with iODBC but that might have changed now .", "You might look into that source code https : github.com openlink iODBC .", "@BCable : Do you have any specific reason for using iODBC", "But it seems the Libre Office tries to connect via iODBC not unixODBC .", "@TallTed your comment is flagrant promotion of iODBC and Openlink Software especially since a it adds nothing to the answer b it links to iODBC and not unixODBC c it links to Openlink Software .", "I would recommend you stick with iODBC the ODBC driver manager Apple has shipped as part of OS X since Jaguar 10.2 .", "I have both and have trouble compiling my program from the Xcode which should use iODBC .", "What did you do to get iODBC to find the driver", "The version Apple bundles into Yosemite 10.10 remains a bit behind at 3.52.6 so I would also recommend you update to 3.52.10 http : www.iodbc.org dataspace iodbc wiki iODBC Downloads Mac OS X .", "Just so you know I use and have contributed to unixODBC and I don t use iODBC .", "For other OSes however several driver mangers are available mainly either iODBC or unixODBC .", "iODBC is bundled into OS X Jaguar through El Capitan 10.2 - 10.11 and may be installed on AIX Solaris HP-UX most any Linux BSD and more .", "But when I want to connect from php with odbc it doesn t I have this in return : .. . .. . SQLSTATE 0 SQLDriverConnect : 0 unixODBC I .. . .. . When I connect to the database from iodbc with this line : .. . .. . It works", "You have conflicting packages installed for the iODBC http : www.iodbc.org and unixODBC http : www.unixodbc.org driver managers .", "PHP doesn t include the iODBC SDK libiodbc-devel.x86 64 which is where the header file iodbcext.h would be found .", "I should note that the current version of iODBC is 3.52.10 somewhat later than the package you ve installed.. .", "OS support .. . .. . iODBC has always been the most used on on Macs since Apple included it although I believe it is removed from Lion .", "iODBC has been thread safe for a very long time and is actively maintained and supported by OpenLink Software http : www.openlinksw.com my employer .", "I m trying to set up unixodbc on OSX 10.7.3 but it looks like iODBC is on the way .", "Driver could not be loaded .. . .. . It seems iODBC is being used to connect to the database when I want to use unixodbc .", "How can I make my rails app use unixodbc instead of iODBC", "I m trying to connect to a Microsoft SQL Server from my Mac development-machine using iODBC .", "I m trying to connect to Microsoft SQL Server from my Mac application using iODBC and FreeTDS .", "iODBC maintained and supported by my employer http : www.openlinksw.com has shipped as part of Mac OS X since Jaguar 10.2.x .", "You may be able to get past the error reported above by editing the second occurrence of -I usr local iODBC include in the make script changing it to -I usr include libiodbc .. . but this is something of a guess .", "My config database.yml : .. . .. . ruby-obdc is installed and in the Gemfile : .. . .. . usr local etc freetds.conf : .. . .. . usr local etc odbc.ini .. . .. . When I run script console and try to access any model : .. . .. . Product ODBC : : Error : IM002 0 iODBC Driver Manager Data source name not found and no default driver specified .", "The ODBC API doesn t support this interrogation until the connection is live .", "Licensing .. . .. . unixODBC is GPL and LGPL .", "I also produced a trace file through iODBC which I have pasted here http : dpaste.org DSbC6 but I couldn t glean any more information from it than from the error message .", "Given that you re using Virtuoso http : virtuoso.openlinksw.com from my employer OpenLink Software http : www.openlinksw.com I d advise that you settle on iODBC also maintained and supported by OpenLink Software http : www.openlinksw.com and generally expected to be found by Virtuoso .", "There are two major Open Source platform independent implementation of the ODBC http : en.wikipedia.org wiki ODBC .", "application support .. . .. . A lot of ODBC applications support unixODBC e.g . OpenOffice and ODBC drivers from Oracle IBM and SAP .", "Consider using unixODBC this answer gives some good reasons why : stackoverflow.com questions 7548825 http : stackoverflow.com questions 7548825 what-are-the-functional-differences-between-iodbc-and-unixodbc TDS Version 8.0 doesn t exist try 7.2 if you re on SQL Server 2008 : freetds.org userguide choosingtdsprotocol.htm http : www.freetds.org userguide choosingtdsprotocol.htm", "So is there a way to get the driver version using ODBC when we are not connected", "And choose ODBC from Connect to an existing database I entered s01 my unixODBC DSN name to Name of the ODBC data source on your system field .", "The drivers on other platforms do not even have this file metadata .", "I m trying to compile MySQL ODBC support into Stata on a Solaris machine .", "That is Stata and ODBC but it isn t related to the error I am getting .", "Considering Unix as ODBC user platform and feature-wise what are the real practical differences between these two implementations", "Unicode support .. . .. . unixODBC follows MS ODBC Driver manager and has SQLWCHARs as 2 bytes UCS2 encoded .", "Solved by compiling ruby-odbc against Homebrew libraries .", "I m using distutils to distribute a python C extension library that requires to link against the ODBC Driver Manager available in the user s system if any .", "Thanks for the tip but unfortunately I don t need to use odbc anymore .", "Here is the configure script I am using for mysql-connector-odbc : .. . .. . Any ideas", "I m on Ubuntu Linux and wondering how to detect what ODBC driver manager the system has if any .", "Running isql iodbctest and pyodbc.connect to determine what ODBC driver manager is available http : i.stack.imgur.com LF5yt.png", "So far I have compiled MySQL as 64-bit libiodbc as 64-bit and mysql-connector-odbc as 64-bit too .", "Ideally : detect the ODBC driver manager so that shell scripts can utilize the appropriate logic for those subtle differences between the two .", "For Windows is OK to assume that the system provided manager is the one to use .", "Needed to use : .. . .. . I didn t notice this earlier but in Pedro s answer he has with-odbc-lib .", "I installed freetds which I understand provides an ODBC driver that can connect to a MS SQL server database .", "The only way to get the driver version in these cases at least on Windows seems to be via the file metadata information of the driver DLL .", "I now understand the task to be pointing the driver manager iODBC to the driver freeTDS so that I can make a connection to the SQL Server database from R s RODBC library .. . .. . The User Guide to freeTDS http : freetds.schemamania.org userguide dsnless.htm hints that the driver that freeTDS provides should be at usr local freetds lib libtdsodbc.so and that something like the following should define this driver to idobc : .. . .. . But I don t have libtdsodbc.so on my system and it appears that the cygwin package freetds does not provide it listing of installed binaries and support files http : cygwin.com cgi-bin2 package-cat.cgi file x86 2Ffreetds 2Ffreetds-0.91-4 grep freetds .. . .. . How can I configure idobc to use the freeTDS driver to connect to MS SQL", "Last it s best to keep all your ODBC configuration in the default file locations for Mac OS X -- .. . .. . You can create symlinks from anywhere else you may want to have these files e.g .", "I can provide more details but for now just want to know if there are any issues that are known .", "Thank you .", "Here s what I m doing : .. . .. . The above connects and works but : .. . .. . Since I m ultimately planning to use it through PyODBC I tried that as well : .. . .. . I ve tried all manner of things suggested in blog posts and SO posts.. . creating DSNs in ODBC Administrator creating a .odbc.ini attempting to use unixODBC which didn t work with PyODBC specifying a connection-string instead of keyword args etc .", "On what platform", "Both can be built from source and most Linux distributions package both although not Novell Suse which only distributes unixODBC .", "thread-safety .. . .. . unixODBC is thread safe and includes flags to protect handles at different levels .", "support .. . .. . Both have support forums unixODBC has 3 although I d say the unixODBC ones are far more active I m on both .", "Excellent braindump .", "I formatted it a bit +1", "@bohica thanks for the details +1 Not marked as answered yet waiting for more possible answers .", "@bohica I ve marked your response as the answer .", "Thanks again", "iODBC s flexible Unicode support includes UCS-2 UTF-8 UCS-4 .", "How does your comment relate to the practical differences since you never mention unixODBC .", "I suppose as Technical Evangelist for openlink this is to be expected i.e . are you here to help someone or promote Openlink .", "My answer from 2011 is admittedly out of date now but I question your motives for commenting .", "Do you know a way to detect which of these is installed in the user OS so that the setup.py script can dynamically choose that one", "It would ideally work for Mac and for mainstream Linux distros .", "Did you find a clean way to do this", "I can think of a couple dirty ways.. .", "We have code to connect to various databases and we get the driver version after connecting using the SQLGetInfo call with the parameter SQL DRIVER VER .", "However we want the driver version in other cases too e.g . before connecting and in case of an error on trying to connect .", "Thanks Ed", "I have a database with HyperFileSQL and I want to access this database via php .", "this is the my code : .. . .. . I don t know why I can t connect.. . Pleaze help", "This code works for me WD 21 .", "HTH", "What do you mean by WD 21 and HTH is it a signature", "WinDev 21 Hope This Helps" ] }
{ "confidence": [ 78.86973571777344, 72.71160888671875, 62.584110260009766, 62.2835693359375, 61.058319091796875, 58.19316101074219, 55.529991149902344, 55.36763000488281, 53.29754638671875, 51.440582275390625, 45.98045349121094, 44.60724639892578, 44.0374755859375, 43.127777099609375, 35.94336700439453, 33.50661849975586, 22.354026794433594 ], "content": [ "Question : There are two major Open Source platform independent implementation of the ODBC http : en.wikipedia.org wiki ODBC . It is iODBC http : www.iodbc.org and unixODBC http : www.unixodbc.org . Considering Unix as ODBC user platform and feature-wise what are the real practical differences between these two implementations Comment : On what platform OS X comes with iODBC preinstalled . .. . Answer : Just so you know I use and have contributed to unixODBC and I don t use iODBC . Unicode support .. . .. . unixODBC follows MS ODBC Driver manager and has SQLWCHARs as 2 bytes UCS2 encoded . iODBC I believe uses wchar-t this is based on attempting to support iODBC in DBD : : ODBC .. . .. . cursor library .. . .. . unixODBC has one I don t think iODBC has . application support .. . .. . A lot of ODBC applications support unixODBC e.g . OpenOffice and ODBC drivers from Oracle IBM and SAP . I m not sure about iODBC . OS support .. . .. . iODBC has always been the most used on on Macs since Apple included it although I believe it is removed from Lion . Both can be built from source and most Linux distributions package both although not Novell Suse which only distributes unixODBC . thread-safety .. . .. . unixODBC is thread safe and includes flags to protect handles at different levels . This did not used to be the case with iODBC but that might have changed now . support .. . .. . Both have support forums unixODBC has 3 although I d say the unixODBC ones are far more active I m on both . Licensing .. . .. . unixODBC is GPL and LGPL . iODBC is LGPL BSD .. . .. . In practice there is not a lot of difference but I think you ll find unixODBC is more widely used . Comment : Excellent braindump . I formatted it a bit +1 Comment : @bohica thanks for the details +1 Not marked as answered yet waiting for more possible answers . Comment : @bohica I ve marked your response as the answer . Thanks again Comment : iODBC http : iodbc.org and unixOBDC are basically API equivalent both being cross-platform implementations of Microsoft s ODBC standard . iODBC s flexible Unicode support includes UCS-2 UTF-8 UCS-4 . iODBC is bundled into OS X Jaguar through El Capitan 10.2 - 10.11 and may be installed on AIX Solaris HP-UX most any Linux BSD and more . iODBC has been thread safe for a very long time and is actively maintained and supported by OpenLink Software http : www.openlinksw.com my employer . Comment : @TallTed your comment is flagrant promotion of iODBC and Openlink Software especially since a it adds nothing to the answer b it links to iODBC and not unixODBC c it links to Openlink Software . How does your comment relate to the practical differences since you never mention unixODBC . I suppose as Technical Evangelist for openlink this is to be expected i.e . are you here to help someone or promote Openlink . My answer from 2011 is admittedly out of date now but I question your motives for commenting .", "Question : We have code to connect to various databases and we get the driver version after connecting using the SQLGetInfo call with the parameter SQL DRIVER VER . However we want the driver version in other cases too e.g . before connecting and in case of an error on trying to connect . The only way to get the driver version in these cases at least on Windows seems to be via the file metadata information of the driver DLL . The drivers on other platforms do not even have this file metadata . So is there a way to get the driver version using ODBC when we are not connected Thanks Ed .. . Answer : The ODBC API doesn t support this interrogation until the connection is live . There are tricks you can bring to bear such as those used by the iODBC Administrator.app on OS X http : www.iodbc.org dataspace iodbc wiki iODBC Downloads Mac OS X . You might look into that source code https : github.com openlink iODBC .", "Question : I am using Libre Office Version : 4.3.4.1 on my Mac OSX 10.10 Yosemite . In Base Database I would like to connect MS-SQL server using unixODBC DSN . But it seems the Libre Office tries to connect via iODBC not unixODBC . I never installed iODBC on my Mac . Here is what I tried . Following instructions http : www.joecjr.com 2014 07 27 install-and-use-freetds-unixodbc-and-rodbc-or-pyodbc I already setup unixODBC FreeTDS using Homebrew and all the tsql isql connection tests were fine . After installing I launched Database Wizard from Base database . And choose ODBC from Connect to an existing database I entered s01 my unixODBC DSN name to Name of the ODBC data source on your system field . When I clicked Browse no registered data source were shown . And I typed my unixODBC username and checked Password required . When I clicked Test Connection button and input the password an error occurred as below . Does anyone have an idea to solve this problem .. . Answer : I would recommend you stick with iODBC the ODBC driver manager Apple has shipped as part of OS X since Jaguar 10.2 . The version Apple bundles into Yosemite 10.10 remains a bit behind at 3.52.6 so I would also recommend you update to 3.52.10 http : www.iodbc.org dataspace iodbc wiki iODBC Downloads Mac OS X . iODBC and UnixODBC are built to be API equivalent so you should just need to ensure that your drivers and DSNs are properly configured in the iODBC locations optimally via iODBC Administrator.app Applications iODBC . System DSNs are recommended for most purposes .", "Question : I have a database with HyperFileSQL and I want to access this database via php . If I use IODBC to connect with iodbc.ini it works But when I want to connect from php with odbc it doesn t I have this in return : .. . .. . SQLSTATE 0 SQLDriverConnect : 0 unixODBC I .. . .. . When I connect to the database from iodbc with this line : .. . .. . It works this is the my code : .. . .. . I don t know why I can t connect.. . Pleaze help .. . Answer : You need to compile php with iodbc support instead of odbc .", "Question : I m trying to set up unixodbc on OSX 10.7.3 but it looks like iODBC is on the way . My config database.yml : .. . .. . ruby-obdc is installed and in the Gemfile : .. . .. . usr local etc freetds.conf : .. . .. . usr local etc odbc.ini .. . .. . When I run script console and try to access any model : .. . .. . Product ODBC : : Error : IM002 0 iODBC Driver Manager Data source name not found and no default driver specified . Driver could not be loaded .. . .. . It seems iODBC is being used to connect to the database when I want to use unixodbc . How can I make my rails app use unixodbc instead of iODBC .. . Answer : iODBC maintained and supported by my employer http : www.openlinksw.com has shipped as part of Mac OS X since Jaguar 10.2.x . You ll be better off updating iODBC with all the latest patches http : www.iodbc.org dataspace iodbc wiki iODBC Downloads Mac OS X Apple tends to be a bit behind on these than shifting to UnixODBC . You may also find some benefit in the Ruby+ODBC http : www.iodbc.org dataspace iodbc wiki iODBC IODBCRubyHOWTO MacOS X and Ruby-on-Rails http : odbc-rails.rubyforge.org docs we ve published . Last it s best to keep all your ODBC configuration in the default file locations for Mac OS X -- .. . .. . You can create symlinks from anywhere else you may want to have these files e.g . -- Comment : Thanks for the tip but unfortunately I don t need to use odbc anymore . Still I hope people having problems with unixodbc can use your post to solve their issues . :", "Question : I m trying to set up unixodbc on OSX 10.7.3 but it looks like iODBC is on the way . My config database.yml : .. . .. . ruby-obdc is installed and in the Gemfile : .. . .. . usr local etc freetds.conf : .. . .. . usr local etc odbc.ini .. . .. . When I run script console and try to access any model : .. . .. . Product ODBC : : Error : IM002 0 iODBC Driver Manager Data source name not found and no default driver specified . Driver could not be loaded .. . .. . It seems iODBC is being used to connect to the database when I want to use unixodbc . How can I make my rails app use unixodbc instead of iODBC .. . Answer : Using Homebrew . Needed to use : .. . .. . I didn t notice this earlier but in Pedro s answer he has with-odbc-lib . not sure if that works for his environment but i needed this to be dir because i kept getting a checking for sql.h.. . no error .", "Question : I m trying to set up unixodbc on OSX 10.7.3 but it looks like iODBC is on the way . My config database.yml : .. . .. . ruby-obdc is installed and in the Gemfile : .. . .. . usr local etc freetds.conf : .. . .. . usr local etc odbc.ini .. . .. . When I run script console and try to access any model : .. . .. . Product ODBC : : Error : IM002 0 iODBC Driver Manager Data source name not found and no default driver specified . Driver could not be loaded .. . .. . It seems iODBC is being used to connect to the database when I want to use unixodbc . How can I make my rails app use unixodbc instead of iODBC .. . Answer : Solved by compiling ruby-odbc against Homebrew libraries . This works if you are on OSX : Comment : can you be more specific i m having this issue and this doesn t exactly give a step by step solution . thanks Comment : What OS are you running I installed unixodbc using Brew and then linked it using this on OSX . Comment : It was my ruby on mac os x i posted a solution to the issue .", "Question : I have a database with HyperFileSQL and I want to access this database via php . If I use IODBC to connect with iodbc.ini it works But when I want to connect from php with odbc it doesn t I have this in return : .. . .. . SQLSTATE 0 SQLDriverConnect : 0 unixODBC I .. . .. . When I connect to the database from iodbc with this line : .. . .. . It works this is the my code : .. . .. . I don t know why I can t connect.. . Pleaze help .. . Answer : This code works for me WD 21 . HTH Comment : What do you mean by WD 21 and HTH is it a signature Comment : WinDev 21 Hope This Helps", "Question : null .. . Answer : Is there a known conflict between Xcode version of iODBC and the actual iODBC DM downloaded and installed from the bundle I have both and have trouble compiling my program from the Xcode which should use iODBC . I can provide more details but for now just want to know if there are any issues that are known . Thank you .", "Question : null .. . Answer : I m using distutils to distribute a python C extension library that requires to link against the ODBC Driver Manager available in the user s system if any . For Windows is OK to assume that the system provided manager is the one to use . For other OSes however several driver mangers are available mainly either iODBC or unixODBC . Do you know a way to detect which of these is installed in the user OS so that the setup.py script can dynamically choose that one It would ideally work for Mac and for mainstream Linux distros . Comment : Did you find a clean way to do this I can think of a couple dirty ways.. .", "Question : I m trying to connect to a Microsoft SQL Server from my Mac development-machine using iODBC . No matter what I do I get the error message Unable to connect to data source from the FreeTDS driver . After consulting various manuals blog posts and StackOverflow questions I m at my wit s end . I m using Mac OS X 10.7.4 with FreeTDS version 0.91 installed through Homebrew . Here s what I m doing : .. . .. . The above connects and works but : .. . .. . Since I m ultimately planning to use it through PyODBC I tried that as well : .. . .. . I ve tried all manner of things suggested in blog posts and SO posts.. . creating DSNs in ODBC Administrator creating a .odbc.ini attempting to use unixODBC which didn t work with PyODBC specifying a connection-string instead of keyword args etc . I also produced a trace file through iODBC which I have pasted here http : dpaste.org DSbC6 but I couldn t glean any more information from it than from the error message . I should mention that I am tunneling the connection to SQL Server over SSH with the line LocalForward localhost : 1433 production.someinstitution.edu : 1433 in my .ssh config since my IT department has limited me to connect only from the production server s IP . It works for a GUI client SQuirreLSQL so I assume the forwarding is correct . Comment : Have you specified port in pyodbc connection-string Comment : I knew it had to be something simple I was missing Thank you so much sunprophit . Noted for future reference : FreeTDS or iODBC doesn t have a concept of default port for a driver . Comment : @sunprophit : Just checked and it s working perfectly now Can you post that as an answer so I can vote up accept it Comment : What did you do to get iODBC to find the driver Is there a config file you need to edit after you install FreeTDS via homebrew .. . Answer : You should use port parameter in connection-string in case of DSN-less connection . Otherwise your port could be specified in your DSN or driver config odbc.ini and freetds.conf respectively Comment : Part of the reason it took so long to find this was that the exact code worked on my server with Ubuntu and unixODBC with FreeTDS . There I could omit the port-number and things would still work . Hopefully if I have enough of the relevant keywords in this question and comments nobody will have to waste time like I did", "Question : null .. . Answer : I m trying to compile MySQL ODBC support into Stata on a Solaris machine . The only relevance that Stata has here is that the Solaris version is compiled as 64-bit binaries so everything that it touches has to be 64-bit as well . So far I have compiled MySQL as 64-bit libiodbc as 64-bit and mysql-connector-odbc as 64-bit too . This should work I would think but there is an error that iodbctest is giving : .. . .. . I ve looked all over for init dynamic string and it appears to be in the my sys.h but every instance I can see of CMake tries to include this library . nm shows it as undefined in the resulting library : .. . .. . So the reference is there but not the destination . I ve tried everything I can think of to get it included but I ve had no luck . Here is the configure script I am using for mysql-connector-odbc : .. . .. . Any ideas Thanks : .. . .. . EDIT : .. . .. . I also should mention that I tried using GCC instead of SunStudio and it resulted in the same error . Comment : I am not certain if I completely understand the problem here but does this help at all : stackoverflow.com q 11636832 1187671 http : stackoverflow.com q 11636832 1187671 Comment : That is Stata and ODBC but it isn t related to the error I am getting . Comment : @BCable : Do you have any specific reason for using iODBC Why not try to use unixODBC I think unixODBC is better .", "Question : null .. . Answer : I am trying to connect Oracle to PostgreSQL . I do not have root privilege or access to yum . I downloaded psqlodbc-09-05.0210 and did following tar -zxvf psqlodbc-xx.xx.xxxx.tar.gz cd psqlodbc-xx.xx.xxxx . configure .. . .. . I am getting configure : error : libpq library version 9.2 is required .. . .. . How can I resolve it Also do I need to install odbc driver unixodbc or iodbc to configure psqlodbc Comment : I tried to install postgres 9.5 client only but getting following error because I do not have root access . Is there any way to get around it by creating directory is other place . bin mkdir -p usr local pgsql bin bin mkdir : cannot create directory usr local pgsql : Permission denied make 1 : installdirs Error 1", "Question : I have a Virtuoso server running on Centos7 and have been trying to be able to execute PHP files from an HTML form even really basic ones just to test and have had no luck . I found out I had to install PHP and have been reading the documentation from the virtuoso GitHub README.php5 https : github.com openlink virtuoso-opensource blob develop 7 README.php5 to setup PHP on the virtuoso server . This is my first time setting up PHP and I have run into an issue when trying to run the make command . I am in directory etc php-5.2.10 and have been able to run the configure command with all the flags . The error from the make command I receive is : .. . .. . I do not know if these packages are related but for extra information I have the following packages installed as well : .. . .. . I have run sudo find -iname iodbcext.h to try and determine where that file may be located and the only result I get back is usr include libiodbc iodbcext.h . However I am not sure if that is what make is looking for or if there is supposed to be another one within the php-5.2.10 directory that is used and if that is the right one what would I do with it Any assistance or advice in getting PHP setup on the Virtuoso server is greatly appreciated . Comment : The version of PHP you re trying to install is ancient it was released in June 2009 . It s not even the most recent release in the 5.2 branch . Why are you trying to install this old of a version Comment : I was just trying to follow the version that was presented Readme.php5 file I linked that s the only reason I was using it as I am not very familiar with Virtuoso as well so I did not want to stray from the instructions . Comment : The PHP features of Virtuoso have been largely untouched since 2011 https : github.com openlink virtuoso-opensource commits develop 7 binsrc hosting php when they added initial support for PHP 5.3 . PHP 5.3 reached end-of-life over a year ago . http : php.net eol.php I don t think the PHP functionality in this software is maintained at all and it may be too bit-rotted to use . Comment : Virtuoso relies on the external PHP libraries which process the script files typically from Virtuoso s DAV repository or from the local filesystem . Any PHP 5.x which is the current production version should work and we do recommend the latest stable version . Guesses on SO as from @duskwuff tend not to be as accurate as anyone might wish . Hence Virtuoso Users mailing list https : lists.sourceforge.net lists listinfo virtuoso-users public Support Forums http : boards.openlinksw.com support confidential Support Case http : support.openlinksw.com support online-support.vsp . Comment : @TallTed Are you implying that the commit adding initial support for PHP 5.3 in 2011 actually added complete support for PHP 5.3 5.4 5.5 and 5.6 the latter three of which didn t even exist in 2011 .. . Answer : You have conflicting packages installed for the iODBC http : www.iodbc.org and unixODBC http : www.unixodbc.org driver managers . It is strongly advised that you choose one or the other . Given that you re using Virtuoso http : virtuoso.openlinksw.com from my employer OpenLink Software http : www.openlinksw.com I d advise that you settle on iODBC also maintained and supported by OpenLink Software http : www.openlinksw.com and generally expected to be found by Virtuoso . PHP doesn t include the iODBC SDK libiodbc-devel.x86 64 which is where the header file iodbcext.h would be found . I should note that the current version of iODBC is 3.52.10 somewhat later than the package you ve installed.. . It s not clear what options you passed to configure to get the make script you re running . You may be able to get past the error reported above by editing the second occurrence of -I usr local iODBC include in the make script changing it to -I usr include libiodbc .. . but this is something of a guess . Comment : Hi @TailTed I just was told about Virtuoso s VSP markup as well . Would this be a better way to look into getting my HTML form-data to my Virtuoso server than dealing with PHP So far I have found 14.3 VSP docs.openlinksw.com virtuoso vsp1.html http : docs.openlinksw.com virtuoso vsp1.html page that goes over some of the basic markup for VSP . Comment : Also I had already changed my configure to include -I usr include libiodbc for the second occurence I believe that s how I got past any errors the first time but then had issues with the make -ing it . I now am trying with php-5.6.15 and have removed the unixODBC package and now am getting configure : error : Cannot find header file s for pdo-odbc again . Comment : Better is always a judgement call . At OpenLink we believe in horses for courses -- use the best tool for the job you re doing . I don t know nearly enough about what you re doing to say whether PHP which you may already know or VSP which it s clear you don t know yet or some other script markup is better . Again I encourage you to raise your questions to a broader audience of Virtuoso-knowledgeable people on the mailing list https : lists.sourceforge.net lists listinfo virtuoso-users or the OpenLink Support forums http : boards.openlinksw.com support . Comment : About Cannot find header file s for pdo-odbc I can only guess because you still provide only partial information . Best guess is that your configure command left something out I think you need something like --with-pdo-odbc iODBC usr local iODBC where you likely had --with-pdo-odbc iODBC .. . But I m still guessing .", "Question : null .. . Answer : I m trying to connect to Microsoft SQL Server from my Mac application using iODBC and FreeTDS . No matter what I do I get the error message Unable to connect to data source from the FreeTDS driver . i have consulted as many possible manuals blog posts and StackOverflow questions . Following is the troubleshooting steps i tried and more details about my code .. . .. . From application logs .. . .. . Few StackOverflow post s suggested this is due to TDS version and changing to 8.0 would help but its already set . When I ping the server - no packets are lost . Connection is established when i telnet the server on 1433 port . Using the below i am able to establish connection too .. . .. . In this particular post http : stackoverflow.com questions 13066716 freetds-not-using-its-config as per the comments by Max Bolingbroke http : stackoverflow.com a 16219721 5307724 if SERVER attribute is used then freetds.config and odbc.ini are ignored . So i guess the config file parameters dont help much . Could anyone please provide me with some pointers or any help so i can proceed further . Comment : A few things . Consider using unixODBC this answer gives some good reasons why : stackoverflow.com questions 7548825 http : stackoverflow.com questions 7548825 what-are-the-functional-differences-between-iodbc-and-unixodbc TDS Version 8.0 doesn t exist try 7.2 if you re on SQL Server 2008 : freetds.org userguide choosingtdsprotocol.htm http : www.freetds.org userguide choosingtdsprotocol.htm Comment : One thing i missed out in my post is that the connection works for most of the environment setups except a few with similar configurations . Is there any way to find why those few are not able to connect @FlipperPA i will try out your suggestion to changing the version to 7.2 but using unixODBC at this point would not be possible as the application is already in production environment .", "Question : I m trying to use RODBC to make a connection to a SQL Server database from R under cygwin . I ve installed libiobbc and libiodbc-devel which I understand provide the driver manager that the RODBC package needs . I installed freetds which I understand provides an ODBC driver that can connect to a MS SQL server database . I used its tsql command-line tool to confirm that I can make a connection to a SQL Server . I now understand the task to be pointing the driver manager iODBC to the driver freeTDS so that I can make a connection to the SQL Server database from R s RODBC library .. . .. . The User Guide to freeTDS http : freetds.schemamania.org userguide dsnless.htm hints that the driver that freeTDS provides should be at usr local freetds lib libtdsodbc.so and that something like the following should define this driver to idobc : .. . .. . But I don t have libtdsodbc.so on my system and it appears that the cygwin package freetds does not provide it listing of installed binaries and support files http : cygwin.com cgi-bin2 package-cat.cgi file x86 2Ffreetds 2Ffreetds-0.91-4 grep freetds .. . .. . How can I configure idobc to use the freeTDS driver to connect to MS SQL EDIT .. . .. . A colleague located lib cygtdsodbc.dll and usr lib cygtdsodbc.dll on my system . Might this be the cygwin equivalent of libtdsodbc.so I created an odbcinst.ini file with the following content to define the driver : .. . .. . and an odbc.ini file defining a data source my db using the driver defined above : .. . .. . running iodbctest to check things out gives Comment : usr lib cygtdsodbc.dll is the equivalent of libtdsodbc.so and usr lib lib on Cygwin . This looks like a configuration issue see chapter 4 of the FreeTDS User Guide http : www.freetds.org userguide prepodbc.htm for tips . .. . Answer : The iodbctest program indicates it can t find my db that s your clue that it s not configured correctly . Have another look at the FreeTDS User Guide specifically at what properties can and can t be in odbc.ini . You need a server or servername property in your odbc.ini depending on whether or not you want to use your freetds.conf file to identify the server .", "Question : null .. . Answer : I m on Ubuntu Linux and wondering how to detect what ODBC driver manager the system has if any . Like Rakib s commentary one very rough way I ve used is to simply try and run isql unixODBC or iodbctest because Ubuntu will report whether their parent package is installed . What s interesting is that on this fresh VM pyodbc tells me that unixODBC was used even though its tools are not installed see screenshot . Running isql iodbctest and pyodbc.connect to determine what ODBC driver manager is available http : i.stack.imgur.com LF5yt.png Comment : dpkg-query -L unixODBC Comment : What exactly do you want to achieve Comment : Ideally : detect the ODBC driver manager so that shell scripts can utilize the appropriate logic for those subtle differences between the two ." ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
sitecore-unicorn@sitecore@86
sitecore-unicorn -- unicorn is a sitecore utility designed to simplify deployment of @placeholder items across environments automatically .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
sitecore
UNK_RELATION
fouc@default@109
fouc -- a flash of unstyled content fouc is an instance where a web page appears briefly with the browser s @placeholder styles prior to loading an external css stylesheet .
{ "confidence": [ 77.8005599975586, 60.165435791015625, 58.84950256347656, 57.858551025390625, 56.65329360961914, 56.338985443115234, 54.15679168701172, 54.15679168701172, 54.15679168701172, 54.01905822753906, 51.40380096435547, 50.9622688293457, 49.48582458496094, 49.21075439453125, 48.334842681884766, 48.028114318847656, 47.90516662597656, 45.547576904296875, 45.547576904296875, 45.547576904296875, 45.20972442626953, 44.67301940917969, 43.89254379272461, 43.12095642089844, 42.661590576171875, 42.17391586303711, 41.855533599853516, 40.95207595825195, 40.48268508911133, 40.03551483154297, 39.972530364990234, 39.85411834716797, 39.77876663208008, 39.65425491333008, 39.65425491333008, 39.312068939208984, 38.59266662597656, 38.556297302246094, 38.556297302246094, 38.538185119628906, 38.0185546875, 38.0185546875, 37.96453094482422, 37.30697250366211, 36.799991607666016, 36.587623596191406, 36.56779861450195, 36.38896942138672, 36.363521575927734, 36.363521575927734, 36.363521575927734, 36.1113166809082, 35.77845764160156, 35.70203399658203, 35.66461944580078, 35.48707580566406, 35.26556396484375, 35.26556396484375, 34.669883728027344, 34.62376403808594, 34.17373275756836, 33.94963073730469, 33.94963073730469, 33.846797943115234, 33.58595657348633, 33.58595657348633, 33.58595657348633, 33.58595657348633, 33.46002197265625, 33.35395050048828, 33.20493698120117, 33.08837890625, 32.226749420166016, 31.930923461914062, 31.930923461914062, 31.930923461914062, 31.438804626464844, 31.438804626464844, 31.438804626464844, 31.435508728027344, 31.37417221069336, 31.159194946289062, 30.832963943481445, 30.832963943481445, 30.832963943481445, 30.832963943481445, 30.832963943481445, 30.832963943481445, 30.731727600097656, 30.635501861572266, 30.04861831665039, 29.517032623291016, 29.517032623291016, 29.517032623291016, 29.062747955322266, 29.024913787841797, 28.93529510498047, 28.716835021972656, 28.582977294921875, 28.400035858154297 ], "content": [ "Flash of Unstyled Content FOUC", "Some people like to call this the FOUC Flash Of Unstyled Content .", "From what I understand this is not a FOUC flash of unstyled content .", "If there is no CSS there are no styles to be rendered thus FOUC .", "This is called a FOUC http : en.wikipedia.org wiki Flash of unstyled content a Flash Of Unstyled Content and is well documented and explained here : http : www.bluerobot.com web css fouc.asp", "Fouc flash of unstyled content is simply a display quirk some kind of page flickering in Win IE and it happens when you import a css style .", "I am familiar with the concept of flash of unstyled content aka FOUC but I m curious as to what this code relates to specifically .", "Right after I started noticing Flash of Unstyled Content FOUC in a project that I was working on .", "I need someone who can provide me with a solution that will stop the flash of unstyled content fouc on my site .", "Sort of like the old flash of unstyled content FOUC problem but with a white screen instead.. . call it a flash of white FOW problem .", "Although the reloaded file would normally be cached it still creates a FOUC flash of unstyled content .", "This is where the FOUC happens .", "The only problem is that when the web site loads there is a short FOUC Flashing of unstyled content .", "FOUC has to do with the order of loading external assets like CSS and JS files .", "The static html pages of my project has javascript dynamically modified content and that causes FOUC Flicker of Unstyled Content .", "I created a Zurb Foundation skin every time the page loads there is a Flash of unstyled content FOUC such as the menu showing all the drop-downs for a few seconds .", "This allows the css to hide the Flash Of Unstyled Content as the page and javascripts load .", "I m trying to fight FOUC .", "This is one of the causes for FOUC .", "I believe it s FOUC", "Is this related to FOUC", "I am using the following JS to avoid a flash of unstyled content in a SEO-friendly way : .. . .. . Which also has the accompanying CSS : style .fouc display : none style .", "What exactly is causing the FOUC", "2 Flash of unstyled content .", "For example Safari has a different FOUC bug http : www.webkit.org blog 66 the-fouc-problem .", "I am getting FOUC when loading css inside of my entry-point when using webpack .", "Large slowly loading CSS files can also cause FOUC maybe not as bad but still visible and there is no easy fix for that except separating the CSS .", "I m using a simple technique to prevent FOUC on my page .", "You can test a fouc here : http : www.bluerobot.com web css fouc.asp .. . .. . You can find more here How to prevent Flash of Unstyled Content on your websites http : www.techrepublic.com blog web-designer how-to-prevent-flash-of-unstyled-content-on-your-websites tag nl.e055 s cid e055 ttag e055 ftag TRE3f6dec5", "Instead of using class you should use ng-class .. . .. . and you can refer to this article http : iarouse.com blog 2013 10 30 angularjs-avoid-flash-of-unstyled-content-fouc for more info .", "An old post from the Safari blog has a little more on how fouc works etc - webkit.org blog 66 the-fouc-problem https : www.webkit.org blog 66 the-fouc-problem", "However when the page loads you get about a second of white FOUC .", "Polymer s FOUC prevention uses the unresolved attribute not a class name : http : www.polymer-project.org docs polymer styling.html fouc-prevention .. . .. . Have you tried this", "The FOUC is particularly bad in IE but also occurs in Firefox .", "That s convenient for you as the developer but does introduce the FOUC .", "Other properties weren t affected by the FOUC only the transition s .", "possible duplicate of Angular how to prevent FOUC http : stackoverflow.com questions 26108625 angular-how-to-prevent-fouc", "I m trying to prevent FOUC in FF IE .", "Heres the solution I use to solve FOUC problems .", "On inital page load I see a FOUC.. . .. . .. . Any ideas", "I believe it is added to define fouc class name for IE .", "We are already using a LINK element in the header which should prevent the FOUC .", "This FOUC apears even upon refreshing the page at which time the browser should not be redownloading the js file", "http : stackoverflow.com questions 12371080 are-link-elements-loaded-synchronously .. . .. . If so FOUC should only be a problem for CSS that is in link tags below some content .", "The best way to avoid a FOUC is to put all of your links to your CSS files in the head element .", "Regardless of how new your OS Browser is a slow PC still often gets a FOUC .", "Problem is the good ol Flash Of Unstyled Content .", "possible duplicate of AngularJS strategy to prevent flash-of-unstyled-content for a class http : stackoverflow.com questions 16074673 angularjs-strategy-to-prevent-flash-of-unstyled-content-for-a-class", "My issue is dynamically javascript added className etc causes the FOUC .", "@ian that sounds like a conceptual problem that will always cause some amount of fouc .", "That second link above is what I am trying to avoid with this FOUC solution", "Note that even though close this is not just another How to avoid FOUC question . .. . .. . EDIT : Adding the external files included in my page and my require.config : .. . .. . In main.js :", "I ve already made it not display the page until the fonts have loaded but in opera I still get a bit of FOUC on each page change .", "I noticed some strange behavior in Firefox as I was getting a FOUC when appending CSS by javascript .", "This could help your FOUC but there are lots of contributing factors such as how many CSS JS and other resources are being loaded by your page .", "Hmm well FOUC is rarely caused by CSS since the page should be always loading that first before showing the page so it is most likely something else such as javascript but.. . .", "I didn t even know what the FOUC was until I started with requirejs .", "You make some nice points about the FOUC patch .", "I am struggling with a flash of unstyled content on my website .", "I have an AngularJS project I want to prevent a FOUC during page load on a classname .", "If there is then your browser is dumping everything and starting fresh which could look almost like a FOUC in some circumstances .", "Does anyone know how to definitely resolve FOUC on jQuery UI tabs", "Problem : I Have a DNN website i want to prevent FOUC on it .", "The content on both of the sites always appears fully styles with all CSS rules .", "The bluerobot article defines FOUC very narrowly it can be caused by a lot of other things than @import ing .", "So they might add that class to possible fouc objects and use that class name to affect only those objects within a solution .", "Its kind of like a client-side CMS .. . .. . But i cant seem to get rid of FOUC", "As the title says how do you guys solve FOUC problem with React components", "If I remove my css from being loaded by webpack and just include it in my html file as a normal link then the problem with FOUC goes away .", "Basically I am trying to prevent the flash of unstyled content .", "What I ve done to avoid FOUC is : .. . .. . Set the body section as : body style visibility : hidden onload js Load .. . .. . Write a js Load javascript function as : document.body.style.visibility visible .. . .. . With this approach the body of my web page keeps hidden until the full page and CSS files are loaded .", "I m not seeing this issue in any other browser that I ve tested - IE Chrome Opera - but whenever I load a page from the server I m seeing a flash of unstyled content before the CSS is applied .", "One case where a FOUC can still occur if the link tags are in the head at least in Firefox is if you load a JS library such as modernizr before the link tags .", "@Pekka but on my local drive static html pages are rendered very fast and FOUC is not obvious .", "This code would need to be placed immediately after the Container element to be effective however it may not completely get rid of the FOUC .", "Or am I going to have to replace the layout or even worse take a JavaScript approach to resolving the FoUC", "Before the carousel code kicks in there s a flash of unstyled content that shows just the images themselves .", "On Safari doesn t seem to happen on Chrome or Firefox i m getting a lovely flash of unstyled content .", "You can then include this file in your HTML which as you said prevents the flash of unstyled content .", "but as the page loads the unformatted content shows for several seconds until the loading is complete .", "A best-practice for front-end performance as well as avoiding FOUC is to have your CSS files referenced in the head of your document and your JavaScript right before the closing body tag .", "When the page is loading and the content appears without any style .", "you get about a second of white FOUC No not from my location using Opera 12 and Chromium 23 .", "deansofer.com posts view 14 http : deansofer.com posts view 14 AngularJs-Tips-and-Tricks-UPDATED fouc .", "Even stripping it down to a bare AddThis call and a .show still gets me an FOUC and a layout shift .", "This won t necessarily eliminate your FOUC as that single JS file still needs to be loaded but it might reduce it .", "As to your comment on FOUC patching seeming counter-productive I am not exactly sure why you find that to be so .", "The UI bells and whistles can then be displayed with your FOUC patch when the scripts have finally become available .", "It also appears to be used in the ajax page loading code to allow content to load hidden and only displayed once all content is load .", "This makes the browser download styles render the page then apply JavaScript .", "is there content that renders that is then later styled by included CSS styles", "Also what is the best way to stop the FOUC thats friendly to people with javascript disabled", "the FOUC seems to be able to be prevented in theory by using visibility : hidden and then on head.ready set the visibility to visible .", "I need the first panel to be visible to the user on load along with the other tabs on the top -- without the darn FOUC .", "FOUC http : en.wikipedia.org wiki Flash of unstyled content is a common user-experience problem for sites with a lot of CSS especially after you start combining your CSS files and the common solution is to separate important layout rules in a small standalone file which is loaded first .", "Reading that article - http : www.learningjquery.com 2008 10 1-way-to-avoid-the-flash-of-unstyled-content helped a lot .", "What I am expecting to happen is that on page load at the very minimum my div Container should at the class .fouc added however this only occurs if I manually add it via the console .", "This causes the scrollbar to load late and thus a jump in the elements as they shift to accommodate scrollbar Flash Of Unstyled Content .. . .. . I can put a min-height in the page which forces a scrollbar on load - but the scrollbar will not go away after the page loads if the page is actually shorter than one screen .", "CSS loading slowly .", "You can t see it in the .gif but there is a flash of unstyled default font text for all text on the page not just within the sortable ." ] }
{ "confidence": [ 82.3587417602539, 82.00607299804688, 79.06363677978516, 78.33061218261719, 78.32659912109375, 77.91333770751953, 74.4339828491211, 73.40418243408203, 73.32564544677734, 71.73171997070312, 71.58983612060547, 71.26060485839844, 71.18418884277344, 70.90447998046875, 68.02757263183594, 66.7540054321289, 66.236328125, 65.98289489746094, 65.19200897216797, 64.86772918701172 ], "content": [ "Question : I ve got a page with some content pulled down from a database in the body up in the head i ve got an external style sheet linked to format that content . On Safari doesn t seem to happen on Chrome or Firefox i m getting a lovely flash of unstyled content . I d rather have a non-javascript fix for this is there any way to position the external css sheet link so it gets applied before the php script runs in the body - I would assume being at the top in head it would do this automatically but apparently not in safari any ideas For a second or so i see this : .. . .. . enter image description here http : i.stack.imgur.com bwaUP.jpg .. . .. . Then afterwards : enter image description here http : i.stack.imgur.com boh5u.jpg Comment : This shouldn t be an issue in any browser the PHP executes on the serverside and unless you re using ajax it s present when the page loads in the browser and the styles should be applied immediately . Comment : @adeneo - en.wikipedia.org wiki Flash of unstyled content http : en.wikipedia.org wiki Flash of unstyled content - It shouldn t be but it is I m definitely seeing the unstyled content on screen b4 the css is applied Comment : I know what fouc is and there s no quick javascript fix to this problem nor has it got anything to do with PHP the problem is usually something as a developer did and Safari is known for having problems when you access certain window properties before the stylesheets have loaded etc so you probably load scripts before styles or did something else that causes the issue and the only way to fix it is to resolve whatever you did wrong not add more code . Comment : An old post from the Safari blog has a little more on how fouc works etc - webkit.org blog 66 the-fouc-problem https : www.webkit.org blog 66 the-fouc-problem Comment : Um do I see this right that you re including at least two html files topborder and navbar before the doctype declaration This looks like really malformed HTML Maybe show us the output of the PHP engine i.e . the response that the browser sees . .. . Answer : .. . php .. . include . . widgets topborder.html .. . include . . widgets navbar.html .. . .. . .. . DOCTYPE html .. . html .. . head .. . .. . .. . .. . Bad boy No wonder Safari is confused when it gets HTML before the doctype declaration . Maybe it even gets a closing html tag before it does see your stylesheet", "Question : I noticed the following near the top of Twitter s source code : .. . .. . A quick Google search turns up a few other websites that use this too but I couldn t find anything that describes what it s for . Making it into the markup of such a popular website several times to boot due to conditional HTML classes http : www.paulirish.com 2008 conditional-stylesheets-vs-css-hacks-answer-neither being utilised must make it useful for something . I am familiar with the concept of flash of unstyled content aka FOUC but I m curious as to what this code relates to specifically . Comment : I noticed it is added only for IE8 in some sites . .. . Answer : I noticed it is added only for IE8 in some sites . I believe it is added to define fouc class name for IE . Fouc flash of unstyled content is simply a display quirk some kind of page flickering in Win IE and it happens when you import a css style . So they might add that class to possible fouc objects and use that class name to affect only those objects within a solution . You can test a fouc here : http : www.bluerobot.com web css fouc.asp .. . .. . You can find more here How to prevent Flash of Unstyled Content on your websites http : www.techrepublic.com blog web-designer how-to-prevent-flash-of-unstyled-content-on-your-websites tag nl.e055 s cid e055 ttag e055 ftag TRE3f6dec5", "Question : I have observed that very infrequently Internet Explorer 7 or 8 it does not matter displays our web pages www.epsitec.ch http : www.epsitec.ch products compta a short time without applying the CSS . The layout appears completely broken with everything displayed sequentially from top to bottom . When the page has finished loading everything finally gets displayed properly . Our web pages do not use any fancy scripting just two javascript inclusions for QuantCast and Google Analytics done at the end of the page . By the way we already had the issue before adding the QuantCast script . The CSS gets linked in the head section : .. . .. . and then follows static HTML up to the final chunk which includes the JavaScript : .. . .. . As this is a very short visual-glitch I have no idea what provokes it . Worse I cannot reproduce it and it appears only on seldom occasions . How can I further investigate the cause of the glitch Are there any best practices I should be aware of .. . Answer : This is called a FOUC http : en.wikipedia.org wiki Flash of unstyled content a Flash Of Unstyled Content and is well documented and explained here : http : www.bluerobot.com web css fouc.asp Comment : Thank you for the reference . We are already using a LINK element in the header which should prevent the FOUC . I ll try adding an empty script-element too . Crossing my fingers -", "Question : I need someone who can provide me with a solution that will stop the flash of unstyled content fouc on my site . It s located here : http : www.cmscritic.com Comment : I believe it s FOUC Comment : Flash of Unstyled Content FOUC Comment : This happens many a times if we have the link tag of style sheets referred at the bottom of the web page . .. . Answer : What I ve done to avoid FOUC is : .. . .. . Set the body section as : body style visibility : hidden onload js Load .. . .. . Write a js Load javascript function as : document.body.style.visibility visible .. . .. . With this approach the body of my web page keeps hidden until the full page and CSS files are loaded . Once everything is loaded the onload event turns the body visible . So the web browser remains empty until a point when everything pops up on the screen . It is a simple solution but so far it is working . Comment : Not good if a viewer does not have javascript enabled because then they won t see a thing . Comment : -1 for suggesting a solution that will show NOTHING for users who don t have javascript enabled or are on a screen reader that doesn t support javascript or who are behind a corporate firewall that blocks javascript . Googling eliminate flash of unwanted content will show numerous approaches that don t have this flaw . For example Stefan s answer a year later is much safer . Comment : You really should add noscript style body visibility : visible style noscript at the end so that the site will work with JS disabled too .", "Question : I have a web page which loads inside of a JQuery UI Dialog . When the page loads in Firefox the plain text appears for a second before all the css and javascript runs . Once everything loads the text appears properly . Is there a way to prevent the text from showing until all the CSS JavaScript runs I have tried turning on and off the visibility but that did not work correctly . This only seems to happen in Firefox and not in other browsers . Comment : Are you using embedded css and js or external links Linking externally will help cache the styling and js on the client browser .. . Answer : Some people like to call this the FOUC Flash Of Unstyled Content . If you are using Google Fonts embedded via javascript resource https : developers.google.com fonts docs webfont-loader then it adds a class to the html tag that allows you to hide content whilst the scripts are loading using normal rules like html.wf-loading content display : none . However in my experience this isn t bombproof though . The only way I ve found to fairly consistently achieve no FUOC during is to convert your fonts to BASE64 and embed that directly in your CSS Font Squirrel provide a great resource for doing this http : www.fontsquirrel.com tools webfont-generator . This way your fonts will wait before the CSS has loaded before revealing themselves .", "Question : I am using the following JS to avoid a flash of unstyled content in a SEO-friendly way : .. . .. . Which also has the accompanying CSS : style .fouc display : none style . What I am expecting to happen is that on page load at the very minimum my div Container should at the class .fouc added however this only occurs if I manually add it via the console . Do I need some additional code etc in order to get this to function as expected FYI I am already calling JQuery prior to when this script is being called . Your help is appreciated Comment : This code would need to be placed immediately after the Container element to be effective however it may not completely get rid of the FOUC . the only ways to 100 get rid of it is to either pre-style the elements add classes directly rather than with js or to hide them with inline css . Comment : What browser do you see this in I thought this was pretty much relegated to ancient versions of IE and that as long as your CSS links are where they should be in the head then this isn t an issue in today s browsers . Actually I d argue it was never an issue...it s just how they worked Comment : Regardless of how new your OS Browser is a slow PC still often gets a FOUC . Comment : @KevinB true though I d then say that s just an argument for not worrying about it . It s just how some browsers work . Comment : That depends on what pre-style you are adding . What exactly is causing the FOUC are you adding classes to the html with javascript are images not loading fast enough .. . Answer : The best way to avoid a FOUC is to put all of your links to your CSS files in the head element . This way the styling rules will load before the content which will then be styled . This is both SEO and user friendly . Comment : One of the issues is that I am using the anythingslider.js https : css-tricks.com examples AnythingSlider demos.html script however it is quite often being rendered like this css-tricks.com examples AnythingSlider demos.html https : css-tricks.com examples AnythingSlider demos.html when nothing is cached . Comment : That second link above is what I am trying to avoid with this FOUC solution Comment : See that s a js issue . I don t see any seo problems with pre-styling that slider by adding appropriate classes to the images which would cause all but the first one to be hidden . Comment : Yea this isn t really an issue of CSS but that you have to wait for the JS to do all the styling . That s convenient for you as the developer but does introduce the FOUC . The prestyling is likely the best option here . Comment : That s a great idea @Kevin B . Will give that a go .", "Question : I need someone who can provide me with a solution that will stop the flash of unstyled content fouc on my site . It s located here : http : www.cmscritic.com Comment : I believe it s FOUC Comment : Flash of Unstyled Content FOUC Comment : This happens many a times if we have the link tag of style sheets referred at the bottom of the web page . .. . Answer : The problem with using a css style to initially hide some page elements and then using javascript to change the style back to visible after page load is that people who don t have javascript enabled will never get to see those elements . So it s a solution which does not degrade gracefully . A better way therefore is to use javascript to both initially hide as well as redisplay those elements after page load . Using jQuery we might be tempted to do something like this : .. . .. . However if your page is very big with a lot of elements then this code won t be applied soon enough the document body won t be ready soon enough and you might still see a FOUC . However there is one element that we CAN hide as soon as script is encountered in the head even before the document is ready : the HTML tag . So we could do something like this : .. . .. . Note that the jQuery addClass method is called outside of the .ready function . Comment : Great post This helped fix a problem I had to solve . Thank you Comment : To me it seems cleaner to replace html .show with html .removeClass hidden . This makes it clearer that the ready function is undoing the addClass . Comment : UPDATE : Just tested this approach . The current version of jQuery REQUIRES this to be done using removeClass as I suggest rather than show as in the original answer -- otherwise the html will NEVER show . I believe jQuery s show now explicitly looks for and restores any display state from css styling to avoid interfering with styling . Therefore it is necessary to actually remove the hidden class . Comment : Works perfectly . Opted for the removeClass option rather than show Comment : By far the best solution I have found . Thank you so much for this .", "Question : I noticed the following near the top of Twitter s source code : .. . .. . A quick Google search turns up a few other websites that use this too but I couldn t find anything that describes what it s for . Making it into the markup of such a popular website several times to boot due to conditional HTML classes http : www.paulirish.com 2008 conditional-stylesheets-vs-css-hacks-answer-neither being utilised must make it useful for something . I am familiar with the concept of flash of unstyled content aka FOUC but I m curious as to what this code relates to specifically . Comment : I noticed it is added only for IE8 in some sites . .. . Answer : If you look at line 38-40 you get .. . .. . Which changes the document element class to include the value set in this attribute . This allows the css to hide the Flash Of Unstyled Content as the page and javascripts load . Later the scripts remove this class to allow the fully loaded page to load . It also appears to be used in the ajax page loading code to allow content to load hidden and only displayed once all content is load . Attributes beginning with the name data- are part of the html 5 specification and represent private data . They are there to allow webpages to store information within a webpage that without breaking validation via the HTML5 Validators", "Question : There are two websites one live one under development . I am porting a site to Zend Framework for maintainability integration purposes . The original live site has seamless page loads - it will load then update the content on the screen while keeping the background-image navigation etc on the page . The ported site development flashes completely white for a brief moment then all of the content appears simultaneously . From what I understand this is not a FOUC flash of unstyled content . The content on both of the sites always appears fully styles with all CSS rules . The two sites look identical when rendered they use the same images css and HTML markup . The only difference is one development is being served by Zend Framework and the other live by procedural PHP . What are the main causes for this and is this a known bug configuration issue with ZF I ve had this problem before without using ZF and did not resolve it . Thanks for your help . .. . Answer : It could be your web server . Try comparing the HTTP headers of your servers with a web sniffer like http : web-sniffer.net and see if there s any difference in caching headers . If there is then your browser is dumping everything and starting fresh which could look almost like a FOUC in some circumstances . Comment : Tried changing all headers to match for example staples.com s configuration . Still having a white flash between pages . Worth mentioning it s valid XHTML with no @imports for CSS", "Question : There are two websites one live one under development . I am porting a site to Zend Framework for maintainability integration purposes . The original live site has seamless page loads - it will load then update the content on the screen while keeping the background-image navigation etc on the page . The ported site development flashes completely white for a brief moment then all of the content appears simultaneously . From what I understand this is not a FOUC flash of unstyled content . The content on both of the sites always appears fully styles with all CSS rules . The two sites look identical when rendered they use the same images css and HTML markup . The only difference is one development is being served by Zend Framework and the other live by procedural PHP . What are the main causes for this and is this a known bug configuration issue with ZF I ve had this problem before without using ZF and did not resolve it . Thanks for your help . .. . Answer : Try putting javascript at the bottom of the page just before the closing body tag . This should speed up page rendering as loading javascript blocks other downloads css images etc . therefore leaving your page blank until all of your scripts have loaded .", "Question : I have observed that very infrequently Internet Explorer 7 or 8 it does not matter displays our web pages www.epsitec.ch http : www.epsitec.ch products compta a short time without applying the CSS . The layout appears completely broken with everything displayed sequentially from top to bottom . When the page has finished loading everything finally gets displayed properly . Our web pages do not use any fancy scripting just two javascript inclusions for QuantCast and Google Analytics done at the end of the page . By the way we already had the issue before adding the QuantCast script . The CSS gets linked in the head section : .. . .. . and then follows static HTML up to the final chunk which includes the JavaScript : .. . .. . As this is a very short visual-glitch I have no idea what provokes it . Worse I cannot reproduce it and it appears only on seldom occasions . How can I further investigate the cause of the glitch Are there any best practices I should be aware of .. . Answer : FOUC has to do with the order of loading external assets like CSS and JS files . Inline script snippets block downloading of subsequent assets until they are interpreted . This is one of the causes for FOUC . A best-practice for front-end performance as well as avoiding FOUC is to have your CSS files referenced in the head of your document and your JavaScript right before the closing body tag . This makes the browser download styles render the page then apply JavaScript .", "Question : I am getting FOUC when loading css inside of my entry-point when using webpack . If I remove my css from being loaded by webpack and just include it in my html file as a normal link then the problem with FOUC goes away . Note : This not just with bootstrap framework I have tested with Foundation and Materialize with the same results .. . .. . The code posted below is just a test example of my problem using Bootstrap . Html code .. . .. . bootstrap.js main entry-point .. . .. . webpack.config.js .. . Answer : ExtractTextWebpackPlugin https : github.com webpack extract-text-webpack-plugin will allow you to output your CSS as a separate file rather than having it embedded in your JS bundle . You can then include this file in your HTML which as you said prevents the flash of unstyled content . I d recommend only using this in production environments as it stops hot-loading from working and makes your compile take longer . I have my webpack.config.js set up to only apply the plugin when process.env.NODE ENV production you still get the FOUC when you re doing a development build running the dev server but I feel like this is a fair trade off . For more information on how to set this up take a look at SurviveJS s guide http : survivejs.com webpack building-with-webpack separating-css .", "Question : I m using Head.js Google Web Fonts and pulling some content from elsewhere on the web placeholder images . What I ve noticed is that on page load I see unstyled content then my heading font loads properly but not at the proper weight and then the proper weight loads . Any idea as to what is causing this odd behaviour with my header text Should it not just go from unstyled to the proper requested font Also what is the best way to stop the FOUC thats friendly to people with javascript disabled Thanks Some more details : .. . .. . I m using Google s provided Javascript method to insert the 3 fonts I use . I can clearly see that it is loading Istok+Web : 700 : lating which means only the 700 weight should be provided . Because of this method I do not use @font-face at all . Simply font-family as-if it were a regular thing . I am using LESS.js though but from the network analyzer it doesn t seem to be causing any major slow down . .. . Answer : This is simply caused by the browser displaying the website already before it downloaded all content . Do you have one @font-face css rule for all font weights or do you have a seperate one for the normal bold font weight Please also note that although it is convenient to load the fonts from the Google CDN it is not the fastest way as a new http connection has to be established . EDIT when you use the quick-use button google does always set different font files for different weights.. . .. . .. . A flash of unstyled content cannot be prevented when using head.js as everything is loaded parallel while the browser tends to show everything it s got asap . Just pray everyone has a fast connection . And why should you mind at all During loading you always see some kind of a half page.. . Comment : the FOUC seems to be able to be prevented in theory by using visibility : hidden and then on head.ready set the visibility to visible . My issue with this solution is A i can t seem to get it working myself and B people with javascript disabled would see nothing . Comment : but people with javascript disabled will not see anything anyhow beacuse you load your assets with javascript.. . So if you want your site to be viewable with styles and javascript effects do not use head.js.. . Comment : they will see unstyled text . Which is fine . But if I were to implement a visibility : hidden they would see no text .", "Question : I need someone who can provide me with a solution that will stop the flash of unstyled content fouc on my site . It s located here : http : www.cmscritic.com Comment : I believe it s FOUC Comment : Flash of Unstyled Content FOUC Comment : This happens many a times if we have the link tag of style sheets referred at the bottom of the web page . .. . Answer : A solution which doesn t depend on jQuery which will work on all current browsers and do nothing on old browsers include the following in your head tag or you could put it at the start of the body : Comment : NOTE : To avoid the flash this should all be inside head tag similar to Stefan s answer . Or at least at the start of the body . I mean if the script is placed at the end of the body it might not run until after the content has already appeared . Comment : @ToolmakerSteve : Thanks I ve added that salient point to my answer . Comment : the mentioned code did not work for me here s my version : try var html document.getElementsByTagName html 0 document.addEventListener DOMContentLoaded function event html.className html.className fouc catch err Comment : @ManfredWuits : Good catch that s actually the same code I have on my web site -- this answer is now corrected . I must have either typo d it here or subsequently found and fixed the mistake . Probably the latter because I would surely have copy pasted .", "Question : The static html pages of my project has javascript dynamically modified content and that causes FOUC Flicker of Unstyled Content . So I made the content invisible by default and toggle display to visible after DOM ready . The static html pages rendered very fast on my local drive so the time gap between invisible and visible states is not obvious . However after the project has been integrated with WordPress and put onto remote-server the page rendering becomes a bit slower so the time gap becomes a bit more obvious . When I click on a hyperlink to request viewing a page I would like WordPress to complete the redering of the page on server-side and then show me the page . Waiting 1 or 2 seconds is okay . Can WP do that Comment : Have you considered using a caching plugin instead That would probably be the better option Comment : @Pekka I m a front-end developer so I actually know very little about WP . Can that plugin do the job Comment : It doesn t do the job you re asking for but it creates static files that will be served very fast Comment : Thanks . I will investigate more of it . Comment : WP super cache is the household name to look at .. . Answer : I would guess that the issue is your CSS not loading instantly over the network so that there s a moment where your HTML is rendered but your CSS hasn t loaded . It could also be dynamic Javascript content -- I can t speak to that without knowing more about your Wordpress installation and configuration .. . .. . Preloading your CSS isn t something Wordpress can do itself although you should notice that after the first page load the browser is caching your CSS and it s quicker . If you re really concerned about it look up some optimization techniques such as using a fast CDN for the static stuff such as your CSS . The Yahoo performance tips http : developer.yahoo.com performance rules.html cdn are pretty good for all website performance questions for instance . Comment : Thanks @necaris . My issue is dynamically javascript added className etc causes the FOUC . That script can be executed only after DOM ready . Comment : @ian that sounds like a conceptual problem that will always cause some amount of fouc . Is there no way for you to hard-code the class Comment : @Pekka but on my local drive static html pages are rendered very fast and FOUC is not obvious . Comment : @ian yeah but that s local.. . On the net you have to anticipate occasional hiccups and latency Comment : @Pekka I just uploaded all static html pages files which haven t been made into WP to the remote-server for testing . And their rendering speeds are as fast as they are in local . So the problem is still within WP .", "Question : This page http : summer-festivals.cloudfoundry.com shows a collection of images in a carousel . The carousel is provided by the jQuery infinite carousel plugin http : www.catchmyfame.com catchmyfame-jquery-plugins jquery-infinite-carousel-plugin . Currently the plugin and my JS code that calls it is loaded in the head . Before the carousel code kicks in there s a flash of unstyled content that shows just the images themselves . Is there something I can do to prevent this e.g . hide the images until the carosel has been initialised The FOUC is particularly bad in IE but also occurs in Firefox . .. . Answer : If you disable javascript on your browser you ll be able to see what the flash looks like . It s a good idea to make sure a page is at least always useable with JS disabled . Adding this css to your carousel will do the trick :", "Question : I have an AngularJS project I want to prevent a FOUC during page load on a classname . I ve read about ng-template but that seems useful only for content within a tag . I would like it to be login on page load . Any strategy for this Or do I just have to fudge it and load it as login and manually use javascript to to tweak the DOM just for this instance . Comment : Have a look at this post using the ng-cloak directive deansofer.com posts view 14 http : deansofer.com posts view 14 AngularJs-Tips-and-Tricks-UPDATED fouc . If you put it on the body it will hide all the page until every tags are parsed . Comment : Please award the answer . .. . Answer : Instead of using class you should use ng-class .. . .. . and you can refer to this article http : iarouse.com blog 2013 10 30 angularjs-avoid-flash-of-unstyled-content-fouc for more info . Comment : Still seems to need ng-cloak along with that", "Question : null .. . Answer : FOUC http : en.wikipedia.org wiki Flash of unstyled content is a common user-experience problem for sites with a lot of CSS especially after you start combining your CSS files and the common solution is to separate important layout rules in a small standalone file which is loaded first . That leads to code which is hard to read and maintain because related rules are at very distant places . I am wondering if there is any CSS preprocessor which supports separating code into different files That is you would write something like .. . .. . and .main-content and .main-content h1 end up in different files . Or maybe the same on a per-rule level . Comment : The article seems to be somewhat incorrect . Please read bluerobot.com web css fouc.asp http : www.bluerobot.com web css fouc.asp for some very easy fixes . Comment : The bluerobot article defines FOUC very narrowly it can be caused by a lot of other things than @import ing . For example Safari has a different FOUC bug http : www.webkit.org blog 66 the-fouc-problem . Large slowly loading CSS files can also cause FOUC maybe not as bad but still visible and there is no easy fix for that except separating the CSS .", "Question : I m working on a site https : www.bassnationaudio.com store that has a lot of Javascript and jQuery--as far as I can tell most of it is triggered to load after the document is ready . However when the page loads you get about a second of white FOUC . But if you disable Javascript completely there is no white flash at all . How can I make sure that the Javascript doesn t begin loading until after the page loads It is already liberally using .. . .. . .. . so Javascript shouldn t fire until the page is done loading and is rendered.. . right But somehow the page waits for the script to finish before rendering--even though it doesn t need to since the page still looks mostly fine with Javascript totally disabled . Comment : window .load function put script tags at bottom of page they are in header Comment : you get about a second of white FOUC No not from my location using Opera 12 and Chromium 23 . Comment : @feeela That s weird . I m using Chrome 24 but I wouldn t think that s the issue . What OS are you using Comment : @feeela - agreed about the worst I get is a delay of the font loading in FF 19.0 on Mac OSX . Comment : script tags do stop the processing of the page until they are done loading and executing . To reduce the impact of that simply move them to before the closing body tag . .. . Answer : The first thing I would try is reordering your script and style tags so that all external css files are included prior to any javascript files . I ran an audit using Chrome s developer tools and found 13 stylesheets that are included below a javascript file . Since browsers generally only allow 2 concurrent connections you could see this flash if the html gets loaded but a stylesheet download is getting queued behind some other resource . This would also explain why in the comments so many other people are having a difficult time reproducing what you re seeing -- they have different connection speeds and such .", "Question : I dynamically create multiple tabs using jQUery UI tabs -- the tabs are created using a foreach on a view page as follows some codeigniter markup : .. . .. . As above the tabs are formed fine . Problem is the good ol Flash Of Unstyled Content . It happens on IE Chrome FF . I ve tried the CSS option on the jQuery documentation didn t work . There s a simple JS that inserts a CSS style on head and then applies a display : none on a specific id -- but that makes my panels disappear waiting for user interaction . I need the first panel to be visible to the user on load along with the other tabs on the top -- without the darn FOUC . Does anyone know how to definitely resolve FOUC on jQuery UI tabs It s really not looking good and I may have to abandon tabs altogether if I can t resolve this . Any pointers roadmaps are much appreciated Comment : Do you have an online demo to show us Comment : See my answer for a great way to do this . .. . Answer : JQuery UI docs http : jqueryui.com demos tabs ...prevent a FOUC .28Flash of Unstyled Content.29 before tabs are initialized suggest : .. . .. . Not sure if you have tried this or if it is indeed relevant . Comment : thanks but i tried it and it made no difference -- i wonder if there s a way of loading the other tabs on demand via ajax - any idea" ] }
[ "yes-answer-long", "yes-answer-short" ]
default
UNK_RELATION
vba7@macros@111
vba7 -- visual basic for applications vba is an event-driven object-oriented programming language for writing @placeholder used for the entire office suite as well as other applications .
{ "confidence": [ 27.686614990234375, 24.227603912353516, 23.57018280029297, 21.21872901916504, 21.21872901916504, 21.21872901916504, 21.21872901916504, 20.55137062072754, 15.3765287399292, 15.3765287399292, 15.3765287399292, 15.3765287399292, 15.3765287399292, 15.3765287399292, 15.3765287399292 ], "content": [ "pic http : i.stack.imgur.com 3nsSj.png .. . .. . What is the function of in VBA7 as opposed to underscore to show space which denotes exponentiation", "I have 64-bit Office 2013", "VBA Editor should add the extra spaces between r 2 for you .", "In Excel Office2016 I want to add a Winsock Control on my Userform .", "But in VBA7.1 under Tools References there s nothing to be found that gets close to MS Winsock and the additional controls.. . is greyed out .", "Anybody with an idea", "Thanks Martin", "Well I was expecting for the editor to add the spaces but it doesn t .", "If I type for example Sqr a 2 + b 2 there is no error .", "But when I type Sqr a 2 + b 2 it produces a compile error which I do not understand : .. . .. .", "If it s not doing that there is something wrong it but what s actually wrong I don t know : O", "No repro in Excel 2010 so this must be an Excel 2013 issue .", "@Jean-Fran oisCorbett no repro in 2013 neither", "It produces the compile error .", "The error comes when I type r 2 also ." ] }
{ "confidence": [ 43.53110122680664, 20.27898597717285 ], "content": [ "Question : null .. . Answer : If I type for example Sqr a 2 + b 2 there is no error . But when I type Sqr a 2 + b 2 it produces a compile error which I do not understand : .. . .. . pic http : i.stack.imgur.com 3nsSj.png .. . .. . What is the function of in VBA7 as opposed to underscore to show space which denotes exponentiation Comment : VBA Editor should add the extra spaces between r 2 for you . If it s not doing that there is something wrong it but what s actually wrong I don t know : O Comment : No repro in Excel 2010 so this must be an Excel 2013 issue . Comment : @Jean-Fran oisCorbett no repro in 2013 neither Comment : Well I was expecting for the editor to add the spaces but it doesn t . It produces the compile error . The error comes when I type r 2 also . I have 64-bit Office 2013", "Question : null .. . Answer : In Excel Office2016 I want to add a Winsock Control on my Userform . But in VBA7.1 under Tools References there s nothing to be found that gets close to MS Winsock and the additional controls.. . is greyed out . Anybody with an idea Thanks Martin" ] }
[ "yes-answer-long", "yes-answer-short" ]
macros
UNK_RELATION
ideamart@smss@134
ideamart -- the idea apis provided by ideamart make it easy for an application to access dialog axiata network services like sending @placeholder invoking a ussd menu or making an in-app purchase through carrier billing .
{ "confidence": [], "content": [] }
{ "confidence": [], "content": [] }
[ "yes-answer-long", "yes-answer-short" ]
smss
UNK_RELATION
mockwebserver@https@49
mockwebserver -- a library for testing http and @placeholder clients .
{ "confidence": [ 32.625282287597656, 32.30501174926758, 31.798337936401367, 30.4153995513916, 30.111448287963867, 29.407773971557617, 29.407773971557617, 27.55167007446289, 26.56985855102539, 26.221027374267578, 26.221027374267578, 26.221027374267578, 25.0515079498291, 25.0515079498291, 23.720863342285156, 23.706039428710938, 23.52135467529297, 22.190711975097656, 22.146888732910156, 22.126052856445312, 21.80752944946289, 21.80752944946289, 21.80752944946289, 20.670087814331055, 20.595901489257812, 19.94683265686035, 18.8820743560791, 18.755836486816406, 17.753185272216797, 17.642789840698242, 16.556415557861328, 16.404521942138672, 15.537015914916992, 15.537015914916992, 15.232301712036133, 14.891010284423828, 14.891010284423828, 14.520471572875977, 14.520471572875977, 14.514898300170898, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 13.171167373657227, 11.965555191040039, 11.840523719787598 ], "content": [ "I m using MockWebServer https : code.google.com p mockwebserver library in my Android JUnit tests .", "I want to use MockWebServer https : github.com square okhttp tree master mockwebserver for testing .", "MockWebServer doesn t stop this .", "How can I delay a Square MockWebServer HTTP response", "Im currently testing using Espresso and supplying the MockWebServer s url to the RestAdapter before I start my tests .", "I would like to simulate network communication by MockWebServer .", "ConnectException - mockwebserver can throw a timeout exception .", "I want to simulate the no network case-when using RetroFit and MockWebServer .", "then you can compare the response to server.enqueue new MockResponse .setBody it s all cool .. . .. . MockWebServer is a part of okhttp https : github.com square okhttp tree master mockwebserver .", "Am I doing something wrong or is this some type of bug with MockWebServer", "Added mockwebserver tag maybe this will bring the attention of square guys.. .", "I have solved this by providing a custom dispatcher : .. . .. . Tested with MockWebServer 2.0.0", "You pointed me in the right direction regarding the use of MockWebServer which I was using wrong .", "You can try this ref : https : github.com square okhttp tree master mockwebserver .", "So I m using MockWebServer to override these server URLs and capture what the SDK is sending to make assertions on it .", "Simly run . gradlew check https : github.com Maragues RobolectricDummyProject git-clone https : github.com Maragues RobolectricDummyProject.git .. . .. . I ve tried .. . .. . Robolectric.setDefaultHttpResponse 200 my mocked word .. . .. . MockWebServer https : code.google.com p mockwebserver .. . .. . But the tests fail because they query the real URL .. . .. . The code executing the request .. . .. . Possibly related questions .. . .. . Can t capture HTTP request with robolectric http : stackoverflow.com questions 20708844 cant-capture-http-request-with-robolectric I ve tried that without success .", "I don t know if it s useful but you can simulate a timeout with MockWebServer : .. . .. . Note : Please set HttpClient of your code e.g .", "Does anyone have a full and recent tutorial or project on recording server responspes- get and post and headers as needed AND Playing them back with wiremock and or mockwebserver", "Here s an example of a correct use codrspace.com bsphere unit-testing-android-http-connections http : codrspace.com bsphere unit-testing-android-http-connections Robolectric s issue is of a different nature tho .", "I now want to unit test that method but I m having a hard time getting MockWebServer to deliver the image in the first place .", "I know I could go the root of mocking the actual web-api interface used by retrofit but I would like to use the same approach as my other tests if possible by using MockWebServer .", "Sir i try to override the baseurl of retrofit to the one from mockwebserver but then i still end up making a webservice call when performing the test is there a way to stop that", "You can see how to do it here : .. . .. . https : github.com square okhttp tree master mockwebserver .. . .. . Really I don t know how your code is but I hope this is useful", "AsyncHttpClient with that number port for testing purpose .", "However I cannot find out how I can pass in the URL of the MockWebServer while at the same time supporting multiple backends :", "I built my Retrofit instance like this : .. . .. . Then I am calling my MockWebServer instance like this : .. . .. . Where jsonStr is built like this : .. . .. . However the code crashes at this point : .. . .. . The exception is : .. . .. . com.squareup.moshi.JsonDataException : Expected a string but was BEGIN OBJECT at path .. . .. . What did I do wrong", "Taken from here : https : gist.github.com swankjesse 8571a8207a5815cca1fb .. . .. . You can use this interceptor to feed MockWebServer url or even switch between staging endpoints for debug builds .", "I m testing an SDK that makes calls to a server .", "Got it working with vers 1.6.0 and corresponding okhttp not okhttp-protocols library .", "I d try to use Android s implementation of HttpClient where possible since Robolectric intercepts all calls to that library and lets you set up canned responses to your HTTP calls .", "You re disabling Roboelectric s HTTP layer so you re using the real HTTP layer .", "There is a response.setBodyDelayTimeMs .. . method but this is only used in SpdySocketHandler and not for HTTP requests .", "http : stackoverflow.com questions 4998176 anyone-had-success-mocking-httprequests-with-robolectric I m not using eclipse", "Because your answer is the only one that does actually help to mock http requests i ll award the bounty to you .", "We re looking at doing the same for HttpUrlConnection though it s not clear when that ll happen . .. . .. . Apart from that a unit test should not need to mock the HTTP layer .", "This means that there s no clever magic happening under the hood of your test : when you send an HTTP request it s really going out onto the internet as you are seeing .", "Why should a Unit Test not mock the http layer it is a external dependency which might introduce some unknown and flickery results how would you else secure specific results", "It turns out that Robolectric s FakeHttpLayer https : github.com robolectric robolectric blob master src main java org robolectric tester org apache http FakeHttpLayer.java only works with Apache s HttpClient which is highly discouraged on versions greater than Froyo .", "to be clear with whe types of exceptions here you can see the differences : .. . .. . Internet Connection Error http : stackoverflow.com questions 8573176 internet-connection-error .. . .. . So you can get two types : .. . .. . UnknownHostException - When you don t have internet or unknown host.. . to simulate this set to the adapter an incorrect end point .", "I m working on an android-library project where I need to download an PNG image from a REST service transform it into a Bitmap and return it to the app s using this library .", "I found the solution : My api interface needed to have .. . .. . @GET Call JsonObject getString .. . .. . NOT .. . .. . @GET Call String getString .. . .. . The reason is that I am mocking a JSON response not a plain String .", "Using Robolectric 2.3-SNAPSHOT I want to test an object that ll execute a request in the background .", "In order to isolate it I m trying to mock the HttpResponse returned without success after some hours invested .", "I ve created a project that anyone can clone .", "Perhaps I m missing something .. . Anyone had success mocking HttpRequests with Robolectric", "It just sets up a web server locally that your test can connect to .", "So to resolve this problem you need to stop attempting to connect to a real server and instead connect to the mock server .", "To do this yo need to inject set the URL in the request .", "Thanks", "Just did so .", "Thanks for your interest .", "I hope that you don t mind my edit but your instructions wheren t right .", "Absolutely the point is to make the answers useful for future readers .", "Thanks for updating it .", "the URLConnectionImpl in android 4.4 have been changed from defaultHttpClient to Okhttp https : android-review.googlesource.com c 54970 2 luni src main java java net URL.java .", "What do I have to add as a dependency in gradle in order to use MockResponse", "Extracted from Robolectric s Google Group https : groups.google.com d msg robolectric 0wZxGivxsuE ZVpvuPZdUeoJ .. . .. . That being said the usage of HttpUrlConnection will cause you trouble .", "My approach was wrong from the beginning .", "Unfortulatelly retrofit callbacks are never invoking .", "My code : .. . .. . When i use retrofit without callbacks it works .", "Do you need to attach your callback BEFORE you do server.play", "When I change order this throws exception java.lang.IllegalStateException : Cannot retrieve port before calling play", "By having a Callback you are telling Retrofit to invoke the request and call the callback asynchronously .", "This means that your test is exiting before anything happens .", "There are two ways to get this to work : .. . .. . Use a lock at the end of the test and wait until one of the callback methods are invoked .", "Pass an instance of a synchronous Executor one that just calls .run immediately to setExecutors on the RestAdapter.Builder so that the background invocations and callback invocations happen synchronously .", "+1 thanks supplying the synchronous executors works great .", "Wouldnt a lock block the main thread and therefore not allow the callbacks to be executed on the main thread and therefore the lock never released", "By lock im thinking of something like a CountDownLatch", "This works great for mocking server responses and so on but I cant see a simple way to script the java.net.ConnectException exception thrown when a device has no network .", "I can see the MockResponse allows throttling simulation and so on but not a custom exception .", "I imagine I ve just missed something simple : .. . .. . Thanks", "Retrofit has a retrofit-mock module which offers a MockRestAdapter class whose purpose is to simulate network delay and errors .", "This is a used in conjunction with the normal RestAdapter to create an instance of your service .", "You can see a full example in the samples mock-github-client folder of the repo : https : github.com square retrofit tree parent-1.9.0 retrofit-samples mock-github-client .. . .. . MockRestAdapter offers these APIs : .. . .. . setDelay - Set the network round trip delay in milliseconds .", "setVariancePercentage - Set the plus-or-minus variance percentage of the network round trip delay .", "setErrorPercentage - Set the percentage of calls to calculateIsFailure that return true .", "In your test you can call setErrorPercentage 100 to guarantee that a network error will occur .", "By default the amount of time for the error to be thrown is anywhere from 0 to 3x the delay .", "Set the delay to 0 for instant results .", "The link is broken :", "Updated link : github.com square retrofit blob master retrofit-mock src test https : github.com square retrofit blob master retrofit-mock src test java retrofit2 mock MockRetrofitTest.java", "Please assist .", "@tony19 Jake Wharton", "+1 thanks for answering but it does not really answer the question as I want to simulate no network as opposed to a timeout .", "Dispatchers interesting though .", "I wonder if i can throw the above exceptions though that.. .", "seems I cant as the network exceptions are checked and the dispatcher only throws Inturrupted as per its interface", "I have this test class.. . .. . .. . ...and the following exception stack shows up in the consoles of both Eclipse and Android Studio.. . .. . .. . ...otherwise the test passes .", "Also running the test from the command-line with Gradle just gives a Success message .", "If I comment out the server.shutdown everything seems OK .", "Surely this can t be good though", "This seems to be the following issue that was fixed in 1.2.2 https : github.com square okhttp issues 357 .. . .. . If you re using an earlier version update to latest and see if it still happens .", "Yes indeed .", "That s a bug that we OkHttp maintainers need to fix .", "If you report it on our issue tracker we ll tale care of it .", "Or better yet send us a pull request", "here is the pull request : - github.com square okhttp pull 1140 https : github.com square okhttp pull 1140", "See http : g.co androidstudio not-mocked for details . .. . .. . This is what I have so far : .. . .. . Retrofit interface : .. . .. . getImage Method : .. . .. . My test method : .. . .. . I m pretty sure that I don t setup the bufferedSource correctly .", "I ve looked at many out there already" ] }
{ "confidence": [ 39.1484260559082, 38.92037582397461, 36.112674713134766, 35.818016052246094, 34.959449768066406, 34.18891906738281, 33.4011116027832, 30.150585174560547, 29.763212203979492, 29.39452362060547, 28.744897842407227, 25.71270751953125, 24.99471664428711, 15.411751747131348 ], "content": [ "Question : I want to simulate the no network case-when using RetroFit and MockWebServer . Im currently testing using Espresso and supplying the MockWebServer s url to the RestAdapter before I start my tests . This works great for mocking server responses and so on but I cant see a simple way to script the java.net.ConnectException exception thrown when a device has no network . I can see the MockResponse allows throttling simulation and so on but not a custom exception . I know I could go the root of mocking the actual web-api interface used by retrofit but I would like to use the same approach as my other tests if possible by using MockWebServer . I imagine I ve just missed something simple : .. . .. . Thanks .. . Answer : I don t know if it s useful but you can simulate a timeout with MockWebServer : .. . .. . Note : Please set HttpClient of your code e.g . AsyncHttpClient with that number port for testing purpose .", "Question : I m using MockWebServer https : code.google.com p mockwebserver library in my Android JUnit tests . I m testing an SDK that makes calls to a server . So I m using MockWebServer to override these server URLs and capture what the SDK is sending to make assertions on it . The problem that I m running into is that if I try to do server.takeRequest and assign it to a new RecordedRequest variable the test hangs up on the second server.takeRequest and sometimes even on the first one -- if I run it on an emulator it hangs on the first server.takeRequest method but if I run it on my physical Android device it freezes on the second server.takeRequest method . Am I doing something wrong or is this some type of bug with MockWebServer Comment : +1 I noticed this today - shame no answer I was just using the examples with MWS 2.0.0.. . Comment : I can notice this too with MWS2 . BTW looks like it is working if you set one header in the response . Comment : Seeing this too with any response codes other than 200 or 302 . Added mockwebserver tag maybe this will bring the attention of square guys.. . .. . Answer : There seems to be a problem with MockWebServer s dispatch queue which freezes for some reason when serving responses which are not 200 or 302 . I have solved this by providing a custom dispatcher : .. . .. . Tested with MockWebServer 2.0.0", "Question : For an Android project I configured Retrofit 2.1.0 and OkHttp 3.4.1 with Dagger 2.6 as shown in the following Dagger module . I am aiming to support multiple backends using @Named qualifiers . I want to use MockWebServer https : github.com square okhttp tree master mockwebserver for testing . However I cannot find out how I can pass in the URL of the MockWebServer while at the same time supporting multiple backends : .. . Answer : It is possible to override base url with okhttp interceptor . Taken from here : https : gist.github.com swankjesse 8571a8207a5815cca1fb .. . .. . You can use this interceptor to feed MockWebServer url or even switch between staging endpoints for debug builds .", "Question : I want to simulate the no network case-when using RetroFit and MockWebServer . Im currently testing using Espresso and supplying the MockWebServer s url to the RestAdapter before I start my tests . This works great for mocking server responses and so on but I cant see a simple way to script the java.net.ConnectException exception thrown when a device has no network . I can see the MockResponse allows throttling simulation and so on but not a custom exception . I know I could go the root of mocking the actual web-api interface used by retrofit but I would like to use the same approach as my other tests if possible by using MockWebServer . I imagine I ve just missed something simple : .. . .. . Thanks .. . Answer : to be clear with whe types of exceptions here you can see the differences : .. . .. . Internet Connection Error http : stackoverflow.com questions 8573176 internet-connection-error .. . .. . So you can get two types : .. . .. . UnknownHostException - When you don t have internet or unknown host.. . to simulate this set to the adapter an incorrect end point . ConnectException - mockwebserver can throw a timeout exception . You can see how to do it here : .. . .. . https : github.com square okhttp tree master mockwebserver .. . .. . Really I don t know how your code is but I hope this is useful Comment : +1 thanks for answering but it does not really answer the question as I want to simulate no network as opposed to a timeout . Dispatchers interesting though . I wonder if i can throw the above exceptions though that.. . Comment : seems I cant as the network exceptions are checked and the dispatcher only throws Inturrupted as per its interface", "Question : Using Robolectric 2.3-SNAPSHOT I want to test an object that ll execute a request in the background . In order to isolate it I m trying to mock the HttpResponse returned without success after some hours invested . I ve created a project that anyone can clone . Simly run . gradlew check https : github.com Maragues RobolectricDummyProject git-clone https : github.com Maragues RobolectricDummyProject.git .. . .. . I ve tried .. . .. . Robolectric.setDefaultHttpResponse 200 my mocked word .. . .. . MockWebServer https : code.google.com p mockwebserver .. . .. . But the tests fail because they query the real URL .. . .. . The code executing the request .. . .. . Possibly related questions .. . .. . Can t capture HTTP request with robolectric http : stackoverflow.com questions 20708844 cant-capture-http-request-with-robolectric I ve tried that without success . Perhaps I m missing something .. . Anyone had success mocking HttpRequests with Robolectric http : stackoverflow.com questions 4998176 anyone-had-success-mocking-httprequests-with-robolectric I m not using eclipse .. . Answer : You re disabling Roboelectric s HTTP layer so you re using the real HTTP layer . This means that there s no clever magic happening under the hood of your test : when you send an HTTP request it s really going out onto the internet as you are seeing . MockWebServer doesn t stop this . It just sets up a web server locally that your test can connect to . So to resolve this problem you need to stop attempting to connect to a real server and instead connect to the mock server . To do this yo need to inject set the URL in the request . Comment : You pointed me in the right direction regarding the use of MockWebServer which I was using wrong . Here s an example of a correct use codrspace.com bsphere unit-testing-android-http-connections http : codrspace.com bsphere unit-testing-android-http-connections Robolectric s issue is of a different nature tho . Thanks Comment : Just did so . Thanks for your interest . Because your answer is the only one that does actually help to mock http requests i ll award the bounty to you . I hope that you don t mind my edit but your instructions wheren t right . Comment : Absolutely the point is to make the answers useful for future readers . Thanks for updating it .", "Question : I want to simulate the no network case-when using RetroFit and MockWebServer . Im currently testing using Espresso and supplying the MockWebServer s url to the RestAdapter before I start my tests . This works great for mocking server responses and so on but I cant see a simple way to script the java.net.ConnectException exception thrown when a device has no network . I can see the MockResponse allows throttling simulation and so on but not a custom exception . I know I could go the root of mocking the actual web-api interface used by retrofit but I would like to use the same approach as my other tests if possible by using MockWebServer . I imagine I ve just missed something simple : .. . .. . Thanks .. . Answer : Retrofit has a retrofit-mock module which offers a MockRestAdapter class whose purpose is to simulate network delay and errors . This is a used in conjunction with the normal RestAdapter to create an instance of your service . You can see a full example in the samples mock-github-client folder of the repo : https : github.com square retrofit tree parent-1.9.0 retrofit-samples mock-github-client .. . .. . MockRestAdapter offers these APIs : .. . .. . setDelay - Set the network round trip delay in milliseconds . setVariancePercentage - Set the plus-or-minus variance percentage of the network round trip delay . setErrorPercentage - Set the percentage of calls to calculateIsFailure that return true . In your test you can call setErrorPercentage 100 to guarantee that a network error will occur . By default the amount of time for the error to be thrown is anywhere from 0 to 3x the delay . Set the delay to 0 for instant results . Comment : The link is broken : Comment : Updated link : github.com square retrofit blob master retrofit-mock src test https : github.com square retrofit blob master retrofit-mock src test java retrofit2 mock MockRetrofitTest.java Comment : Sir i try to override the baseurl of retrofit to the one from mockwebserver but then i still end up making a webservice call when performing the test is there a way to stop that Please assist . @tony19 Jake Wharton", "Question : Using Robolectric 2.3-SNAPSHOT I want to test an object that ll execute a request in the background . In order to isolate it I m trying to mock the HttpResponse returned without success after some hours invested . I ve created a project that anyone can clone . Simly run . gradlew check https : github.com Maragues RobolectricDummyProject git-clone https : github.com Maragues RobolectricDummyProject.git .. . .. . I ve tried .. . .. . Robolectric.setDefaultHttpResponse 200 my mocked word .. . .. . MockWebServer https : code.google.com p mockwebserver .. . .. . But the tests fail because they query the real URL .. . .. . The code executing the request .. . .. . Possibly related questions .. . .. . Can t capture HTTP request with robolectric http : stackoverflow.com questions 20708844 cant-capture-http-request-with-robolectric I ve tried that without success . Perhaps I m missing something .. . Anyone had success mocking HttpRequests with Robolectric http : stackoverflow.com questions 4998176 anyone-had-success-mocking-httprequests-with-robolectric I m not using eclipse .. . Answer : You can try this ref : https : github.com square okhttp tree master mockwebserver . then you can compare the response to server.enqueue new MockResponse .setBody it s all cool .. . .. . MockWebServer is a part of okhttp https : github.com square okhttp tree master mockwebserver . the URLConnectionImpl in android 4.4 have been changed from defaultHttpClient to Okhttp https : android-review.googlesource.com c 54970 2 luni src main java java net URL.java . Comment : What do I have to add as a dependency in gradle in order to use MockResponse", "Question : Using Robolectric 2.3-SNAPSHOT I want to test an object that ll execute a request in the background . In order to isolate it I m trying to mock the HttpResponse returned without success after some hours invested . I ve created a project that anyone can clone . Simly run . gradlew check https : github.com Maragues RobolectricDummyProject git-clone https : github.com Maragues RobolectricDummyProject.git .. . .. . I ve tried .. . .. . Robolectric.setDefaultHttpResponse 200 my mocked word .. . .. . MockWebServer https : code.google.com p mockwebserver .. . .. . But the tests fail because they query the real URL .. . .. . The code executing the request .. . .. . Possibly related questions .. . .. . Can t capture HTTP request with robolectric http : stackoverflow.com questions 20708844 cant-capture-http-request-with-robolectric I ve tried that without success . Perhaps I m missing something .. . Anyone had success mocking HttpRequests with Robolectric http : stackoverflow.com questions 4998176 anyone-had-success-mocking-httprequests-with-robolectric I m not using eclipse .. . Answer : It turns out that Robolectric s FakeHttpLayer https : github.com robolectric robolectric blob master src main java org robolectric tester org apache http FakeHttpLayer.java only works with Apache s HttpClient which is highly discouraged on versions greater than Froyo . Extracted from Robolectric s Google Group https : groups.google.com d msg robolectric 0wZxGivxsuE ZVpvuPZdUeoJ .. . .. . That being said the usage of HttpUrlConnection will cause you trouble . I d try to use Android s implementation of HttpClient where possible since Robolectric intercepts all calls to that library and lets you set up canned responses to your HTTP calls . We re looking at doing the same for HttpUrlConnection though it s not clear when that ll happen . .. . .. . Apart from that a unit test should not need to mock the HTTP layer . My approach was wrong from the beginning . Comment : Why should a Unit Test not mock the http layer it is a external dependency which might introduce some unknown and flickery results how would you else secure specific results", "Question : How can I delay a Square MockWebServer HTTP response There is a response.setBodyDelayTimeMs .. . method but this is only used in SpdySocketHandler and not for HTTP requests . .. . Answer : That s a bug that we OkHttp maintainers need to fix . If you report it on our issue tracker we ll tale care of it . Or better yet send us a pull request Comment : here is the pull request : - github.com square okhttp pull 1140 https : github.com square okhttp pull 1140", "Question : null .. . Answer : Does anyone have a full and recent tutorial or project on recording server responspes- get and post and headers as needed AND Playing them back with wiremock and or mockwebserver I ve looked at many out there already", "Question : I built my Retrofit instance like this : .. . .. . Then I am calling my MockWebServer instance like this : .. . .. . Where jsonStr is built like this : .. . .. . However the code crashes at this point : .. . .. . The exception is : .. . .. . com.squareup.moshi.JsonDataException : Expected a string but was BEGIN OBJECT at path .. . .. . What did I do wrong .. . Answer : I found the solution : My api interface needed to have .. . .. . @GET Call JsonObject getString .. . .. . NOT .. . .. . @GET Call String getString .. . .. . The reason is that I am mocking a JSON response not a plain String .", "Question : null .. . Answer : I m working on an android-library project where I need to download an PNG image from a REST service transform it into a Bitmap and return it to the app s using this library . So we have a REST webservice that returns the bytes of a png image . We re calling this service using Retrofit with rxJava . In my code below accessRemoteComm.getImage does the loading and transformation from ResponseBody to Bitmap inside a .map on the Observable . The image loads fine in the application . I now want to unit test that method but I m having a hard time getting MockWebServer to deliver the image in the first place . The OnError is called constantly with : .. . .. . java.lang.RuntimeException : Method decodeStream in android.graphics.BitmapFactory not mocked . See http : g.co androidstudio not-mocked for details . .. . .. . This is what I have so far : .. . .. . Retrofit interface : .. . .. . getImage Method : .. . .. . My test method : .. . .. . I m pretty sure that I don t setup the bufferedSource correctly . But I cannot find any resources on SO or the web that shows the usage of the MockResponse with a Buffer as body . And this is the part where any help is appreciated . How do I set this up correctly Btw . If you have any other suggestion on how to test this please let me know Thank you", "Question : I would like to simulate network communication by MockWebServer . Unfortulatelly retrofit callbacks are never invoking . My code : .. . .. . When i use retrofit without callbacks it works . Comment : Do you need to attach your callback BEFORE you do server.play Comment : When I change order this throws exception java.lang.IllegalStateException : Cannot retrieve port before calling play .. . Answer : By having a Callback you are telling Retrofit to invoke the request and call the callback asynchronously . This means that your test is exiting before anything happens . There are two ways to get this to work : .. . .. . Use a lock at the end of the test and wait until one of the callback methods are invoked . Pass an instance of a synchronous Executor one that just calls .run immediately to setExecutors on the RestAdapter.Builder so that the background invocations and callback invocations happen synchronously . Comment : +1 thanks supplying the synchronous executors works great . Wouldnt a lock block the main thread and therefore not allow the callbacks to be executed on the main thread and therefore the lock never released By lock im thinking of something like a CountDownLatch", "Question : I have this test class.. . .. . .. . ...and the following exception stack shows up in the consoles of both Eclipse and Android Studio.. . .. . .. . ...otherwise the test passes . Also running the test from the command-line with Gradle just gives a Success message . If I comment out the server.shutdown everything seems OK . Surely this can t be good though .. . Answer : This seems to be the following issue that was fixed in 1.2.2 https : github.com square okhttp issues 357 .. . .. . If you re using an earlier version update to latest and see if it still happens . Comment : Yes indeed . Got it working with vers 1.6.0 and corresponding okhttp not okhttp-protocols library ." ] }
[ "yes-answer-long", "yes-answer-short" ]
https
UNK_RELATION
forwarding@firewall@216
forwarding -- port forwarding or port mapping is a name given to the combined technique of translating the address or port-number of a packet to a new destination possibly accepting such packet s in a packet filter @placeholder forwarding the packet according to the routing table .
{ "confidence": [ 61.93964385986328, 61.190372467041016, 61.190372467041016, 60.31538391113281, 58.10588836669922, 57.55230712890625, 56.15675354003906, 55.18541717529297, 54.310428619384766, 53.09050750732422, 52.03156280517578, 52.03156280517578, 52.03156280517578, 50.20536422729492, 47.21998596191406, 47.09677505493164, 47.09677505493164, 47.09677505493164, 47.04062271118164, 46.570682525634766, 46.22178649902344, 45.56267166137695, 45.501869201660156, 45.173091888427734, 44.60934066772461, 44.586055755615234, 44.545616149902344, 43.971797943115234, 43.930423736572266, 43.717803955078125, 43.49692153930664, 43.11090087890625, 43.05543518066406, 42.14635467529297, 42.14635467529297, 42.00674057006836, 42.00674057006836, 42.00674057006836, 41.9985466003418, 41.9985466003418, 41.960609436035156, 41.29035949707031, 41.271366119384766, 41.271366119384766, 41.123558044433594, 40.41537094116211, 40.07486343383789, 40.07486343383789, 40.07486343383789, 40.00633239746094, 39.9732666015625, 39.9732666015625, 39.9732666015625, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.404022216796875, 39.239723205566406, 39.131343841552734, 38.9245719909668, 38.9245719909668, 38.9245719909668, 38.891231536865234, 38.84469223022461, 38.84469223022461, 38.84469223022461, 38.84469223022461, 38.84469223022461, 38.84469223022461, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 38.52903747558594, 37.82025146484375, 37.694400787353516, 37.621620178222656, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.48033905029297, 37.001953125 ], "content": [ "192.168.172.34 : 14016 is the IP and port of the intermediate server which does the port forwarding .", "I am using a code for forwarding a port .", "I want use port forwarding on windows .", "You re forwarding the port and that s all on the router s side .", "2 in the parent process listen to wlan1 and if source ip destination port-number exist in router.txt source port 80 then modify packet - a change destination ip source and destination mac addr checksum .", "The computer from outside needs to send a packet to a specific port the computer on the inside answers to another specific port depending on the sender .", "Steps that I implemented are : .. . .. . 1 in the child-process listen at eth1 and if destination port 80 then modify packet - a write destination ip and source port in router.txt b change source IP source and destination mac addr checksum c inject the modified packet in wlan1 interface using pcap inject .", "I d like to setup port forwarding to specific URL with subpage in Ubuntu .", "Please see the VirtualBox documentation for port forwarding and other network configuration .", "I set up port forwarding on my router and unblocked the port on my local computers firewall .", "I have EC2 instance that has port forwarding enabled for EMR cluster .", "I did some research and found that I need X11 port forwarding .", "So now I also have X11 port forwarding enabled .", "The positioning system is hard coded to send to port 8787 and the database is Oracle and only takes in data from port 8011 hence the need for the forwarding of the data .", ".. . .. . I am using this app for port forwarding https : github.com ManolescuSebastian Port Forward Android .. . .. . It is working well and mapping port on home router as you can see in below screenshot : .. . .. .", "I have been trying to get X11 port forwarding to work from my laptop .", "Also the X11 port forwarding works from a Windows machine using Xming and Putty to the same server .", "If you have any troubles with port forwarding you can use DMZ function http : scr.hu 165 l26k8", "Have tried both without any messing on VirtualBox and also with manually adding a port forwarding rule host IP 127.0.0.1 host port 2222 guest port 22 .", "The forwarding stuff is used for uhm forwarding messages .", "But if the device network is through a mobile connection 3G it connects to the remote-server but it seems that the port forwarding is not achieved .", "Combined with variadic-templates this enables perfect-forwarding .", "Here s the wireshark dump of one such packet sent .", "I was able to get this working by forwarding the Selenium port from my localhost to my Vagrant environment .", "Maybe I should frame the question like how to create and send a network packet using pcap and forwarding the reply to the client....something like what a router does .", "It is not a forwarding-reference .", "Does class message forwarding work differently to instance message forwarding", "A bonus technique not covered here is forwarding to specific pages at the destination host for example http : redirect-destination.com console special-page.html .", "Normal forwarding works .", "Did you try adding 192.168.1.1 : 1234 page.html as a forwarding destination in godaddy", "the 3rd argument is an rvalue tuple not a tuple of forwarding references or a forwarding-reference to a tuple .", "They re called forwarding references these days .", "The message forwarding mechanism is the same .", "I can use socat for the port forwarding like this : .. . .. . In this case it works perfectly : all http -requests to localhost : 8080 will be redirected to 123.456.789.12 : 80 .", "To make the forwarding work without this warning you need to put the forwarder on the same TCP port and override DNS resolution for the effected domain i.e .", "It is common problem of the perfect-forwarding .", "It could be called awful forwarding .", "1 Forwarding with masking .", "You need MEM to ALU forwarding", "Click Manage under Forwarding .. . 3 .", "Can anyone elaborate on whether email forwarding is doomed as DMARC takes hold or are MailGun just not forwarding properly", "b inject the modified packet in eth0 interface using pcap inject .", "I m trying to encrypt my web-traffic using SSH dynamic port forwarding in case I happen to be in multiple places such as internet cafes hotels and so on .", "Ok moved it here : link unix.stackexchange.com questions 290267 https : unix.stackexchange.com questions 290267 ssh-dynamic-port-forwarding-and-tcpdump-shows-cleartext", "Here is the function : .. . .. . It appears not to be forwarding arguments .", "Are you able to connect out to the internet and receive packet data back", "I enabled X11 Forwarding in the sshd config .", "I switched back to forwarding now .", "2 Forwarding + .htaccess file for the masking .", "Can we fix it by adding inputs to the new forwarding unit", "I am trying to configure Forwarding and Transfers for Global forwarding and zone transfer options via Webmin .", "Forwarding and templates are meant to be used for forwarding you shouldn t really need to know the types .", "It also means that the forwarding instance needs to have a reference to the object to which it is forwarding this requires careful design .", "I m trying to setup forwarding in Amazon Route53 .", "But how can I use such forwarding for https -requests", "Anyone to help me to get X11 forwarding working", "Is X11 forwarding supported at all by Qt Creator", "I m just studying the message-forwarding of Objective-C .", "I was really after the Type part of the Type Forwarding .", "Isn t there a simple forwarding server for .NET somewhere", "Is there a way to get the forwarding message before actually sending it", "I used the forwarding option available on the website .", "Note that users will see the address you re forwarding to in their address-bar rather than the address they entered .", "Create a Rule that does forwarding on a new message leave it disabled .", "The whole trick behind perfect-forwarding is the template argument deduction part which together with reference collapsing is what perfect-forwarding is .", ".. . .. . Brief background to perfect-forwarding .. . .. . Perfect forwarding may be unfamiliar to some so what is perfect-forwarding", "If you use forwarding to set up a surrogate object or to extend the capabilities of a class the forwarding mechanism should probably be as transparent as inheritance .", "Then there is a second table that has the information that I am most interested in forwarding .", "You have to understand the forwarding problem .", "rhs there is an rvalue-reference not a forwarding-reference .", "search for perfect-forwarding C++11", "Only T serves as a forwarding-reference .", "This is an extended case of perfect-forwarding if you will .", "auto creates a forwarding-reference i.e .", "Also perfect-forwarding shouldn t work with temporaries too", "there is any way to forwarding using MX recoder in DNS .", "I used XMing kept X11 Forwarding enabled.. .", "The parameter to the metafunction is unrelated to the type of the expression I m forwarding .", "if they are can I always use this macro for perfect-forwarding", "Can I always use this macro for perfect-forwarding", "Vector Size TypeT is an rvalue-reference not a forwarding-reference .", "Can anyone explain the ObjC message forwarding chain", "Can anyone explain the ObjC message forwarding chain", "You might be confusing message forwarding and the responder chain .", "if anyone has an example for forwarding with attachments PLEASE provide it", "I have shown one problem with that perfect-forwarding approach here : Forwarding all constructors in C++0x http : stackoverflow.com questions 3119929 forwarding-all-constructors-in-c0x 3120537 3120537 .", "It s a form of forwarding a modified form of perfect-forwarding since it moves instead of just keeping things as rvalue refs .", "The line number 130 in main.cc refers to the perfect-forwarding constructor in TestBase .", "forwarding works for other non-vagrant machines .", "That of course doesn t go well with perfect-forwarding .", "Is there a way make it work for perfect-forwarding and make it scalable", "Is the best general practice to use perfect-forwarding", "Are you sure you need message forwarding here", "You re basically asking what is perfect-forwarding used for", "Also you don t seem to understand perfect-forwarding .", "A Forwarding and Masking dialog box should come up .", "The forwarding kicked in for me within maybe half an hour .", "this is easier done with a mail forwarding service maybe .", "I think the problem you are coming accross is not the forwarding but the DKIM alignment ." ] }
{ "confidence": [ 100.53495788574219, 64.74971771240234, 64.28358459472656, 64.07672882080078, 61.46827697753906, 60.80068588256836, 57.961944580078125, 57.669620513916016, 57.493896484375, 57.348297119140625, 56.41960144042969, 56.41960144042969, 56.33212661743164, 56.19611740112305, 54.8182258605957, 54.505409240722656, 54.44987487792969, 54.44987487792969, 54.015193939208984, 52.74971008300781 ], "content": [ "Question : I want to make a C program in which one laptop say server is acting as a HTTP forwarder it has access to the internet by WLAN for another laptop say client and both laptops are connected to each other by LAN . Steps that I implemented are : .. . .. . 1 in the child-process listen at eth1 and if destination port 80 then modify packet - a write destination ip and source port in router.txt b change source IP source and destination mac addr checksum c inject the modified packet in wlan1 interface using pcap inject . 2 in the parent process listen to wlan1 and if source ip destination port-number exist in router.txt source port 80 then modify packet - a change destination ip source and destination mac addr checksum . b inject the modified packet in eth0 interface using pcap inject . Problem when analysing traffic - Packets are sent successfully by the wlan1 interface but I dont get any response from the destination IP say 74.125.236.52 google.com .. . .. . Main reason could be that I have not constructed the packet properly but I have thoroughly checked every detail especially checksum or maybe there are some more details in the headers that I need to change . I have no idea why I am not getting the response back from the server . PS - 1 Please tell me if I am doing some very basic mistake like my approach is wrong or this method can never work for forwarding packets . 2 I can always get the internet-connection for the client laptop . The whole purpose for making this program is to learn how forwarding works . .. . .. . seems like I am getting the reply back from the server now wireshark shows that but the page still does not load.. . The error is sometimes : The connection to 74.125.236.52 was interrupted or sometimes .....72.218.3.115 took too long to respond. . .. . .. . The response from the server includes tcp handshake packets syn syn-ack ack and one http-get request . Here s the wireshark dump of one such packet sent . 162.254.3.1 is the IP address of the client laptop and 125.252.226.160 some random site .. . .. . 3 0.000370 162.254.3.1 125.252.226.160 TCP 51442 http SYN Seq 0 Win 5840 Len 0 MSS 1460 .. . .. . 5 0.063316 125.252.226.160 162.254.3.1 TCP http 51442 SYN ACK Seq 0 Ack 1 Win 5840 Len 0 MSS 1460 .. . .. . 6 0.063568 162.254.3.1 125.252.226.160 TCP 51442 http ACK Seq 1 Ack 1 Win 5840 Len 0 .. . .. . 7 0.063996 162.254.3.1 125.252.226.160 HTTP GET HTTP 1.1 .. . .. . 8 0.064114 125.252.226.160 162.254.3.1 TCP http 51443 SYN ACK Seq 0 Ack 1 Win 5840 Len 0 MSS 1460 .. . .. . 9 0.064381 162.254.3.1 125.252.226.160 TCP 51443 http ACK Seq 1 Ack 1 Win 5840 Len 0 .. . .. . Could anyone suggest on how should I proceed to avoid these errors connection timed out and see the page getting loaded .. . Answer : If you don t want to make some c networking practices : Why don t you use ebtables which is very similar to iptables but on layer 2 Whats the purpose of that software Comment : The purpose of this project is to learn how forwarding works involves changing of IP addresses and calculating checksum etc . I dont know why you told me to refer to ebtables because the problem lies in the fact that I am not able to make a complete packet as I dont get the reply back from the server say google so I am assuming that this is the problem . Maybe I should frame the question like how to create and send a network packet using pcap and forwarding the reply to the client....something like what a router does . Comment : So i m misunderstand . Sorry for the noise .", "Question : null .. . Answer : I m developing a little Android app which is doing ssh forwarding using JSCH . The app is working fine when the device is within a WiFi network but if the device is using mobile data 3G the ssh connection seems to be done but the port forwarding is not working .. . .. . A resume of the code is : .. . .. . Being : .. . .. . params 0 the server where I m doing the ssh connection .. . .. . params 1 the username .. . .. . params 2 the pasword .. . .. . params 3 the remote computer where the web service at port 8080 is located .. . .. . With the above and if the device has WiFi I open a browser and with : .. . .. . I can access the website . But if the device network is through a mobile connection 3G it connects to the remote-server but it seems that the port forwarding is not achieved . If I open the browser and enter the same address as above all what I get is an empty page . Any clue Thanks in advance", "Question : I can use socat for the port forwarding like this : .. . .. . In this case it works perfectly : all http -requests to localhost : 8080 will be redirected to 123.456.789.12 : 80 . But how can I use such forwarding for https -requests UPDATE : I need a single socat process between Firefox and remote-server . socat is just a forwarder proxy redirector nothing more . Something like this : Comment : Did you try this recipe http : www.dest-unreach.org socat doc socat-openssltunnel.html Comment : Thanks Thor I ll try it . Comment : I have no two socat but one socat and Firefox . So I don t understand that recipe.. . Comment : I just have to redirect https -requests from Firefox via socat to remote-server . ssl connection should be between Firefox and server socat is just a redirector nothing more . When I try this command socat TCP-LISTEN : 8081 fork reuseaddr OPENSSL : 123.456.789.123 : 80 verify 0 I got an error error : 140770FC : SSL routines : SSL23 GET SERVER HELLO : unknown protocol . Comment : I misread your question the first time . Does my answer solve your issue .. . Answer : The browser security warning you are getting is because of the host name mismatch in the url and in the server certificate e.g . localhost vs . example.com . To make the forwarding work without this warning you need to put the forwarder on the same TCP port and override DNS resolution for the effected domain i.e . make example.com resolve to 127.0.0.1 . The simplest approach is as follows : .. . .. . 1 . edit your hosts-file https : en.wikipedia.org wiki Hosts file and add example.com domain to the localhost line sort of howto is here http : www.howtogeek.com howto 27350 beginner-geek-how-to-edit-your-hosts-file .. . .. . 2 . start your forwarding beware that you need to use server IP address and not domain-name as the domain-name is already redirected to localhost .. . .. . socat TCP-LISTEN : 443 fork reuseaddr TCP : 123.456.789.12 : 443 .. . .. . 3 . check it is working in the browser via https : example.com .. . .. . Do not forget to remove the domain entry from the hosts-file when done experimenting . .. . .. . If you can t ensure the same TCP port-number this approach might work as well -- but only under some conditions : .. . .. . the site is using relative paths in links as an absolute path would use original thus different port-number .. . .. . there is no port-number written in the server certificate which is usually not the case .. . .. . .. . .. . Note : It is possible to setup a MITM socat proxy but this would require adding an artificial trusted CA . Good luck", "Question : I was looking for an answer on my question on google and also here but a didn t find a proper answer . So here is the context : I have a software running on some server without firewall in one subnet . There is another software running on some PC in a different subnet . Both subnets are connected to a gateway server . All computers are running CentOS or RHEL . On the gateway server there is a firewall preventing multicast traffic from leaving the one subnet and allow clients from outside to connect to computers inside this subnet . Therefore xinetd is used . The computer from outside needs to send a packet to a specific port the computer on the inside answers to another specific port depending on the sender . So there is no need for the gateway to keep track of sender-receiver relations . It just needs to forward UDP on specific ports to specific computers from one subnet to another . So I added one service in etc services for one direction : .. . .. . And created the according configuration file in etc xinetd.d gateway like : .. . .. . Now the problem is that the server doesn t open an UDP-port to listen on netstat -nulp says . When I change the protocol to TCP and the socket type to stream it works . But I need this for UDP . Is it possible that this is not possible for UDP Or is netstat just not showing the ports Or is my xinetd-configuration missing something Thanks in advance every hint is appreciated . Benny .. . Answer : .. . redirect 192.168.1.1 6000 Server inside the 192.168.1.0 subnet .. . .. . .. . from the man page of xinetd http : linux.die.net man 5 xinetd.conf : .. . .. . redirect .. . .. . Allows a tcp service to be redirected to another host . This means usage of redirect for udp is not possible . And I don t see any other way to do this with xinetd . Comment : Well thank you I guess I should have taken a look at the manpage then.. . But is it possible to achieve the desired effect by using iptables or is it necessary to use a more NAT-like software for forwarding", "Question : I have been trying to get X11 port forwarding to work from my laptop . I can t figure out why it won t work . I get this message when I try to run xterm : .. . .. . I don t know if this is related or not but when I login I get this message : .. . .. . I have wondered if the problem is that my local user on my laptop is skp and the username on this server is sphillips . I have been able to get X11 forwarding to work with my other computers that use the same skp login . Also the X11 port forwarding works from a Windows machine using Xming and Putty to the same server . I have to manually configure the DISPLAY variable to the IP address and display 0.0 but it works . I have run an xhost + on my machine with the attempt to try to bypass any security issues . That still didn t work . On the server I check the configuration : .. . .. . And on my machine as well : .. . .. . My server is RedHat Enterprise Linux 6 and my laptop is Fedora 15 . Can anyone give me any thoughts on things to try to get SSH X11 forwarding to work from my laptop Comment : I got the tumbleweed badge for this Is that a bad thing or a good thing I just wish someone had some thoughts on what else I could try . .. . Answer : Apart from @Chl s answer above I also had a corrupt .Xauthority file . For some reason it was owned by root even under my home-directory . So I had to sudo -s and then deleted it . Then recreated it with touch .Xauthority .. . .. . After that X forwarding worked for me under Ubuntu 14.04 .", "Question : Getting the following log dump when typing in vagrant up . Have tried both without any messing on VirtualBox and also with manually adding a port forwarding rule host IP 127.0.0.1 host port 2222 guest port 22 . Can anyone explain please what on earth I have to do to solve this Googling sadly hasn t proved useful and the other users on my project seem to have just had this work automatically Thanks for any help .. . Answer : Hmm so what you re trying to do is forwarding port s if you want to do it automaticly you will have to turn on the NAT service to let other software forward ports but to do that you need to get root and ssh access to you r bt hh2 you can do it by using this website PsiDOC.com . But if you don t want to do all this stuff you can just port forward on your router and user bridge adapter on your VirtualBox but remember that HH2 always creats seperate ips even for virtual machines . If you have any troubles with port forwarding you can use DMZ function http : scr.hu 165 l26k8", "Question : null .. . Answer : Note : please pay attention to Interfaces screenshot 0.1 interface has ip but 1.1 interface is connecting that is noticeable when I forward port Manually after loging into router over interface 0.1 then connection works . But as you see Torrent is using 1.1 interface for port mapping then my port mapping over interface 1.1 should also work . .. . .. . I am using this app for port forwarding https : github.com ManolescuSebastian Port Forward Android .. . .. . It is working well and mapping port on home router as you can see in below screenshot : .. . .. . enter image description here http : i.stack.imgur.com qlGmx.png .. . .. . enter image description here http : i.stack.imgur.com G0luS.png That is my server code which is write in service which is running quite well and i can see in logcat message server is listening . That is my client code which is sending request to my external ip and port .. . .. . Check error which I am facing while client program executes . enter image description here http : i.stack.imgur.com tzsjw.jpg Comment : @Manolescu Sebastian", "Question : null .. . Answer : I m trying to open a ServerSocket from behind a router . Forwarded the port correctly . It worked perfectly before but now the port isn t opening canyouseeme . I checked the firewall and nothing is blocking the port . Tried on both Linux and Windows . I assume there is something to do with the ISP . What could be the issue The code Comment : Does it work on the local host Does it work on the local network Have you restarted the router Have you restarted the gateway device if applicable Are you able to connect out to the internet and receive packet data back Does a different port work Comment : Yes it works on local network . Yeah tried restarting and resetting the router and modem but not helping . Yep the internet is working fine . No port is working . Comment : Then it sounds like your ISP . Comment : So what can I do to get around it Comment : Try a VPN or a different ISP .", "Question : I have been trying to get X11 port forwarding to work from my laptop . I can t figure out why it won t work . I get this message when I try to run xterm : .. . .. . I don t know if this is related or not but when I login I get this message : .. . .. . I have wondered if the problem is that my local user on my laptop is skp and the username on this server is sphillips . I have been able to get X11 forwarding to work with my other computers that use the same skp login . Also the X11 port forwarding works from a Windows machine using Xming and Putty to the same server . I have to manually configure the DISPLAY variable to the IP address and display 0.0 but it works . I have run an xhost + on my machine with the attempt to try to bypass any security issues . That still didn t work . On the server I check the configuration : .. . .. . And on my machine as well : .. . .. . My server is RedHat Enterprise Linux 6 and my laptop is Fedora 15 . Can anyone give me any thoughts on things to try to get SSH X11 forwarding to work from my laptop Comment : I got the tumbleweed badge for this Is that a bad thing or a good thing I just wish someone had some thoughts on what else I could try . .. . Answer : I finally found the answer at least for my situation The problem was SELinux . I turned off SELinux and it worked with no problem . If you interested in all of the gory details you can read about it on my blog http : linuxsagas.digitaleagle.net 2012 03 23 troubleshooting-ssh-connections-and-using-syslog but let me detail the pertinent facts here.. . .. . .. . On the remote machine I used dmesg to view the logging messages : .. . .. . I found a number of messages like this : .. . .. . You can check the status of SELinux with this command : .. . .. . You can turn it to permissive mode with this command : .. . .. . For more information on SELinux I found Red Hat s guide helpful http : docs.redhat.com docs en-US Red Hat Enterprise Linux 6 html-single Security-Enhanced Linux index.html . Also for other SSH issues I found David s blog http : dissectionbydavid.wordpress.com 2010 06 24 ssh-log-file-making-one-new-location helpful for getting logging to help . For me after that my X11 forwarding started working with no problem . SELinux was preventing several other different things . It could not create the necessary files to make key authentication work . I also found it blocking ssh-keygen from creating keys in the home-directory .", "Question : null .. . Answer : I am creating a web server that sends json strings . I have the server running on java . When I use localhost and the port-number localhost : 31415 blahblahblah I can connect just fine . My router says that my public ip-address is xx.1.83.2 . my actual ip-address as provided by google is different xxx.70.171.162 . I can connect to the server with the ip from my router and port-number xxx.1.83.2 : 31415 blahblahblah . If I try to connect from a device that is not connected to my router it can t connect . I have checked various sites that check if ports are open and my ports aren t open . I set up port forwarding on my router and unblocked the port on my local computers firewall . Nothing unblocks my port . I even tried disabling my router firewall protection and I disabled all filtering from the router . I have a Linksys E1200 . Firmware 2.0.07 . I have looked and looked for what to do for a few days now but still nothing . Anybody have any suggestions", "Question : I have been trying to get X11 port forwarding to work from my laptop . I can t figure out why it won t work . I get this message when I try to run xterm : .. . .. . I don t know if this is related or not but when I login I get this message : .. . .. . I have wondered if the problem is that my local user on my laptop is skp and the username on this server is sphillips . I have been able to get X11 forwarding to work with my other computers that use the same skp login . Also the X11 port forwarding works from a Windows machine using Xming and Putty to the same server . I have to manually configure the DISPLAY variable to the IP address and display 0.0 but it works . I have run an xhost + on my machine with the attempt to try to bypass any security issues . That still didn t work . On the server I check the configuration : .. . .. . And on my machine as well : .. . .. . My server is RedHat Enterprise Linux 6 and my laptop is Fedora 15 . Can anyone give me any thoughts on things to try to get SSH X11 forwarding to work from my laptop Comment : I got the tumbleweed badge for this Is that a bad thing or a good thing I just wish someone had some thoughts on what else I could try . .. . Answer : I got the same issue on a Debian OpenVZ container and the problem seemed to come from my etc hosts-file where localhost was affected to the LAN IP not 127.0.0.1 . Before : .. . .. . After : .. . .. . After that both ssh -X and ssh -Y worked like a charm without even restarting sshd . Comment : Thanks Chi -- that is a good tip . I do have that problem . My etc hosts on my laptop points the host to 127.0.0.1 . But I changed it and it still didn t make a different . I actually tried all 3 IP addresses . I tried the hard wired IP the wireless IP and the VPN tun0-00 . I still get the same results . Comment : Thnks Chi -- this just saved me alot of time .", "Question : I have been trying to get X11 port forwarding to work from my laptop . I can t figure out why it won t work . I get this message when I try to run xterm : .. . .. . I don t know if this is related or not but when I login I get this message : .. . .. . I have wondered if the problem is that my local user on my laptop is skp and the username on this server is sphillips . I have been able to get X11 forwarding to work with my other computers that use the same skp login . Also the X11 port forwarding works from a Windows machine using Xming and Putty to the same server . I have to manually configure the DISPLAY variable to the IP address and display 0.0 but it works . I have run an xhost + on my machine with the attempt to try to bypass any security issues . That still didn t work . On the server I check the configuration : .. . .. . And on my machine as well : .. . .. . My server is RedHat Enterprise Linux 6 and my laptop is Fedora 15 . Can anyone give me any thoughts on things to try to get SSH X11 forwarding to work from my laptop Comment : I got the tumbleweed badge for this Is that a bad thing or a good thing I just wish someone had some thoughts on what else I could try . .. . Answer : I bumped into this too . But in my case it was because I removed IPv6 support some days ago . I then bumped into this thread http : forums.fedoraforum.org showthread.php t 270333 explaining how to make sure sshd uses IPv4 only . This is how I did it add this : .. . .. . to your ssh config-file on Ubuntu etc ssh sshd config and make sshd reload its configuration kill -SIGHUP pid-of-sshd . Comment : Also the Google Compute Engine s latest Ubuntu boot disk image needs this line when trying to ssh with Putty I spent one workingday figuring this out . straightrunning.com XmingNotes trouble.php http : www.straightrunning.com XmingNotes trouble.php", "Question : I am using a code for forwarding a port . this code works fine on My Windows 7 but I can t use It on Windows XP . Update 1 For Problem 2012-10-17 07 : 32 : 00Z .. . .. . This is my source code : .. . .. . AV Error Message : Comment : What error message are you getting when you omit the exception-handling Comment : @TLama AV Access Violation Error comes up . Comment : What is your question Comment : @SertacAkyuz It s Clear . I want use port forwarding on windows . In other hand I want to use this code for doing It . Comment : @Shuhin - Looking at RRUZ s answer it is clear that your question is not clear at all . Considering it is not asked that is not surprising. . .. . Answer : Test your showmessage with this code .. . .. . Showmessage VarToStrDef Ports.Count nothing Comment : the code doesn t work because when the compiler accesses to ports.count the access violations occurs .", "Question : I have a subdomain in Amazon Route53 . Let s say secure.example.com .. . .. . If requests come like https : secure.example.com it is ok but I would like to force http requests to come through https . When user types http : secure.example.com it needs to be forwarded to https : secure.example.com . Is there a domain level redirecting forwarding requests coming through http to https in Amazon Route53 .. . Answer : No there is no way to do this -- because it s not a DNS function to force any particular protocol or to push values from one protocol to another . You can do this easily enough at the web server level either in Apache or IIS or NGINX . In any of those cases the A or CNAME value pointing a specific record to a specific address whether an IP or another host name is the same it s just going to connect via port 80 or port 443 . In Apache you can simply use a rewrite enable mod-rewrite first :", "Question : I am using a code for forwarding a port . this code works fine on My Windows 7 but I can t use It on Windows XP . Update 1 For Problem 2012-10-17 07 : 32 : 00Z .. . .. . This is my source code : .. . .. . AV Error Message : Comment : What error message are you getting when you omit the exception-handling Comment : @TLama AV Access Violation Error comes up . Comment : What is your question Comment : @SertacAkyuz It s Clear . I want use port forwarding on windows . In other hand I want to use this code for doing It . Comment : @Shuhin - Looking at RRUZ s answer it is clear that your question is not clear at all . Considering it is not asked that is not surprising. . .. . Answer : For any who sees this UPnP functionality is different for XP here is what I use : .. . .. . One can skip the initialization of windows name and put their own check algorithm instead . Comment : @JOSeongGng The above solution is dependent on WinAPI version best to check for any changes to its architecture in Windows 10 . The above solution was tested for Windows up to 8.1 .", "Question : I m developing a little cross-platform 3d game-engine in C++ and I ve recently discovered Cloud9 that let me code anywhere not need to be at home The last thing I need to have all the environment ready is to run the game that uses X11 to create the main window . It would be nice if I could connect to my Cloud9 workspace from outside using X11 Forwarding and Xming but 22 port is closed and the only open port by default is 8080 with an HTTP proxy so I can t open another ssh server in that port to be accessible from outside : .. . .. . Here https : c9.io site blog 2013 05 can-i-use-cloud9-to-do-x is where I ve found all the info about ports and services accessible from outside . Does anyone know if there is any way to do X11 Forwarding accessible from outside Thanks Comment : Even if you get X11 forwarding to work the performance will not be very good . Either your game is blitting whole framebuffer in which case you re sending uncompressed images over the internet at video rates or you re getting an indirect OpenGL context which limits you to OpenGL-2.1 and before textures are again transmitted uncompressed and geometry either must be uploaded to the server by Display Lists or by using the Vertex Buffer Object extension which became core functionality only in OpenGL-3.0 and unless you do that every triangle you draw goes over the net . Comment : Don t get me wrong : OpenGL over IP could be done quite efficiently Vertex Buffer Objects and transparent texture data compression are the keys here but so far no implementation actually supports this Buffer Objects over IP or lossless image data compression for transmission . Comment : I don t need speed only see if it s working properly . I didn t know that indirect OpenGL contexts was limited to profile 2.1 and lower I ll try x11-forwarding in my local machine before going further with Cloud9 . Anyway thank you for the info Comment : Just for the sake of completenes : The indirect GLX limitation to OpenGL-2.1 and lower is not due to technical reasons but because nobody bothered to update the GLX specifications . A GLX3 really should be specified IMHO . .. . Answer : No I m afraid this is not possible . Currently only the 8080 http-proxy port is exposed to the outside world . However you can use Cloud9 with another remote machine e.g . one from digitalocean.com . See also https : docs.c9.io run your own workspace.html .", "Question : Getting the following log dump when typing in vagrant up . Have tried both without any messing on VirtualBox and also with manually adding a port forwarding rule host IP 127.0.0.1 host port 2222 guest port 22 . Can anyone explain please what on earth I have to do to solve this Googling sadly hasn t proved useful and the other users on my project seem to have just had this work automatically Thanks for any help .. . Answer : I had the same problem with VirtualBox 4.2.0 . After researching for a while I upgraded VirtualBox to version 4.2.10 . That solved it for me .", "Question : Getting the following log dump when typing in vagrant up . Have tried both without any messing on VirtualBox and also with manually adding a port forwarding rule host IP 127.0.0.1 host port 2222 guest port 22 . Can anyone explain please what on earth I have to do to solve this Googling sadly hasn t proved useful and the other users on my project seem to have just had this work automatically Thanks for any help .. . Answer : I had the same problem and it worked after upgrading Vbox", "Question : null .. . Answer : I d like to setup port forwarding to specific URL with subpage in Ubuntu . In DNS I already assigned IP : 1.1.1.1 to a.b.com .. . .. . My service runs under 1.1.1.1 : 1234 test .. . .. . In final I d like to forward address a.b.com to 1.1.1.1 : 1234 test so if user open address a.b.com then he will be forwarded to 1.1.1.1 : 1234 test .. . .. . Is this possible I tried already socat TCP-LISTEN : 80 fork TCP : 1.1.1.1 : 1234 test but this is not working . Comment : which service is responding to test request and the root path request", "Question : I m developing a little cross-platform 3d game-engine in C++ and I ve recently discovered Cloud9 that let me code anywhere not need to be at home The last thing I need to have all the environment ready is to run the game that uses X11 to create the main window . It would be nice if I could connect to my Cloud9 workspace from outside using X11 Forwarding and Xming but 22 port is closed and the only open port by default is 8080 with an HTTP proxy so I can t open another ssh server in that port to be accessible from outside : .. . .. . Here https : c9.io site blog 2013 05 can-i-use-cloud9-to-do-x is where I ve found all the info about ports and services accessible from outside . Does anyone know if there is any way to do X11 Forwarding accessible from outside Thanks Comment : Even if you get X11 forwarding to work the performance will not be very good . Either your game is blitting whole framebuffer in which case you re sending uncompressed images over the internet at video rates or you re getting an indirect OpenGL context which limits you to OpenGL-2.1 and before textures are again transmitted uncompressed and geometry either must be uploaded to the server by Display Lists or by using the Vertex Buffer Object extension which became core functionality only in OpenGL-3.0 and unless you do that every triangle you draw goes over the net . Comment : Don t get me wrong : OpenGL over IP could be done quite efficiently Vertex Buffer Objects and transparent texture data compression are the keys here but so far no implementation actually supports this Buffer Objects over IP or lossless image data compression for transmission . Comment : I don t need speed only see if it s working properly . I didn t know that indirect OpenGL contexts was limited to profile 2.1 and lower I ll try x11-forwarding in my local machine before going further with Cloud9 . Anyway thank you for the info Comment : Just for the sake of completenes : The indirect GLX limitation to OpenGL-2.1 and lower is not due to technical reasons but because nobody bothered to update the GLX specifications . A GLX3 really should be specified IMHO . .. . Answer : You can get X11 working on Cloud9 using Cloud9 VNC https : github.com fjakobs cloud9-vnc ." ] }
[ "yes-answer-long", "yes-answer-short" ]
firewall
UNK_RELATION
qualtrics@metrics@140
qualtrics -- qualtrics is an enterprise-level commercial web-services provider specialising in online marketing online surveys and related @placeholder .
{ "confidence": [ 55.81462478637695, 50.6812858581543, 50.095115661621094, 45.79579162597656, 44.015541076660156, 43.975929260253906, 42.31452178955078, 42.31452178955078, 41.531837463378906, 41.531837463378906, 41.531837463378906, 41.23092269897461, 40.70488357543945, 39.88010787963867, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.87042999267578, 39.44324493408203, 38.2211799621582, 38.2211799621582, 38.2211799621582, 38.2211799621582, 38.2211799621582, 38.2211799621582, 38.2211799621582, 37.512359619140625, 37.133033752441406, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 36.55976867675781, 35.84449768066406, 35.457584381103516, 34.80855178833008, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.76173782348633, 33.706363677978516, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 32.1003303527832, 31.032466888427734, 31.032466888427734, 31.032466888427734, 31.032466888427734, 31.032466888427734, 30.99814224243164, 30.459285736083984, 30.459285736083984, 29.371057510375977, 29.371057510375977, 29.371057510375977 ], "content": [ "I am using Qualtrics for my online survey .", "I m trying to implement an autocomplete feature to Qualtrics online survey management software .", "Share the love on Facebook and Twitter @qualtrics .. . .. . -Qualtrics Team", "That won t work in Qualtrics .", "SurveyID is a unique identifier Qualtrics assigns to a survey .", "I am using QRTEngine in qualtrics .", "I am new to Qualtrics and to JavaScript .", "Somehow Qualtrics does not record the keystroke .", "In Qualtrics is it possible to randomize the pages within a block", "I was only curious why it didn t work with Qualtrics .", "I wonder why there isn t a Qualtrics tag on stackoverflow .", "Have you seen this : pvlv.org 2014 10 22 mturk-and-qualtrics http : www.pvlv.org 2014 10 22 mturk-and-qualtrics", "would you perchance know how I can do this in qualtrics", "You would think this can t be done but I ve also learned that you can run javascript in the description field by looking at : .. . .. . https : sites.google.com a cognitivescience.co research-using-qualtrics home functions-capacities-in-qualtrics using-qualtrics-as-a-personalized-web-service-with-the-authenticator .. . .. . However all that does is change the label for the field and doesn t actually authenticate .", "I am setting up a survey on Qualtrics .", "But it seems Qualtrics has some conflicts with jQuery .", "Is there a way to do this via the JavaScript editor in Qualtrics", "Since Qualtrics uses prototypejs the code below uses it .", "However Qualtrics does not display any content .", "I ve decided against adding my script to Qualtrics .", "tags refers to an id that doesn t exist in Qualtrics .", "Now it works fine thanks to the help of Qualtrics support .", "Qualtrics has 2 different limitations to my knowledge .", "Qualtrics used to have a section of their website called Coder s Corner that had snippets of code that could be used to advance the functionality of the surveys but they did away with that section .", "The answers given don t specifically apply to a Qualtrics constant sum question .", "I ve made a number of Qualtrics javascripts publicly available at https : gist.github.com marketinview", "I am aware of the workaround. . Was wondering if there are available options in qualtrics to resolve this .", "I am currently working on a relatively complex survey in Qualtrics .", "You are close there are problems with adding click event s to the Qualtrics next button .", "I would like to change the text in the Request response prompt in Qualtrics .", "I want to display two images on Qualtrics but after a 5 second delay .", "So img src https : yourorghere.qualtrics.com CP.. . would be replaced by whatever your organizations url at Qualtrics is .. . .. . This is the CSS : .. . .. . Image 1 : .. . .. . This is the html : .. . .. . Add this javascript replacing the default Qualtrics JavaScript : .. . .. . Image 2 : .. . .. . This is the html : .. . .. . The JavaScript that replaces the default Qualtrics JavaScript :", "You could also pass it to web service that uses the Qualtrics REST API to return information about the survey such as survey name etc .", "I use Jscript to enable Keystrokes in Qualtrics to answer a question .", "I use the below Qualtrics source code to autoplay the mp3 files in the survey .", "Currently I m using Qualtrics survey to do an auditory experiment .", "This functionality is built-in to Qualtrics so you don t need JavaScript .", "Does anyone have experience with adding a jsPsych script to Qualtrics", "The video stimuli I use take very long to upload in Qualtrics .", "Does anyone know how to record multiple button responses in Qualtrics", "I need to get the value of a slider in Qualtrics to display a transformation of it to the user .", "No need to replace this.questionId or call prototypejs Qualtrics already uses prototypejs .", "I m planning to run my thesis experiment on Qualtrics MTurk .", "The face images are located in the qualtrics graphic library and are loaded via loop merge .", "This will let you track those who clicked the link in a Qualtrics variable .", "In my Qualtrics survey I have a free-response textbox question .", "I m not very familiar with all the features of the Qualtrics randomizer and if there is a way to avoid this problem .", "I am finalizing the coding of a survey on Qualtrics which uses a lot of JavaScript .", "I m making a survey on Qualtrics and would like to distribute it via facebook .", "I am looking for a solution using javascript to record whether a user clicked on a link in qualtrics .. . .. . I have followed these instructions - Javascript code to record click on link-to PDF - Qualtrics http : stackoverflow.com questions 31013065 javascript-code-to-record-click-on-link-to-pdf-qualtrics but they no longer work .. . .. . Another person had asked the same question but then went to adopt a different method Tracking when an external link is clicked in Qualtrics", "Qualtrics shortens the question stem if it is longer than 100 characters .", "I ve never used Qualtrics myself and do not need to but my company receives Qualtrics-generated CSV data from another company and we have to advise them about the names to use for fields variables such as mobilephone .", "I m hoping to set up a survey in Qualtrics which will be fixed to last 30 minutes for every participant .", "I don t believe the specific code above was ever included on the Qualtrics javascript page .", "This is the starting code in Qualtrics where you insert code : .. . .. . I have gotten this far but am no where near : .. . .. . This is the prompt : .. .", "The Qualtrics this.clickNextButton function executes NextButton .click so they do the exact same thing except NextButton .click is more direct .", "I ve been trying to customize the survey that is received from Qualtrics so that I may display it the way I want .", "On second read it appears you are embedding this survey in another webpage and want to be able to modify that page based on qualtrics information is that correct", "http : stackoverflow.com questions 36379227 tracking-when-an-external-link-is-clicked-in-qualtrics .. . .. . Any thoughts on how to get it working", "Does anyone know how to format Qualtrics text entry box such that it displays a dollar-sign commas cents automatically .", "I m guessing Qualtrics is doing some kind of pre-processing on .. . in which case you can t dynamically build strings that way .", "You re building a string in JavaScript which presumably only runs after whatever preprocessing step Qualtrics performs .", "Caveat Emptor : all this javascript hacking is not explicitly supported by Qualtrics so the code here may stop working eventually .", "This is a modification of the timer on the Qualtrics site : .. . .. . http : www.qualtrics.com university researchsuite coders-corner html-and-css displaytimer .. . .. . A few notes : .. . .. . 1 .", "The code for the images I used would have to be replaced by the links you get from your own Qualtrics image library .", "In Qualtrics you can add a Timing question to auto-advance the participant after 5 seconds .", "If you have any more questions just ask us at support@qualtrics.com .. . .. . Thanks for using Qualtrics .", "However the question text doesn t always match exactly because Qualtrics removes any HTML styling in the Question text in the response data but not in the Qualtrics survey file that I am getting the question text from .", "The Qualtrics clickNextButton function has one line which matches the answer I gave .", "Do you know whether Qualtrics runs JavaScript in questions that aren t displayed to subjects", "Can anyone help me out with a Javascript code for a word counter that is usable in Qualtrics", "However Qualtrics wouldn t let you save that so I m thinking it is just a typo in your post above .", "I have created table with multiple input cells on one screen in a Qualtrics survey .", "qualtrics.com university researchsuite developer-tools https : www.qualtrics.com university researchsuite developer-tools custom-programming javascript-in-qualtrics", "Try this : .. . .. . In survey flow : .. . .. . Question html : .. . .. . JavaScript : .. . .. . Note : In Qualtrics refers to prototypejs not jquery .", "I have a Qualtrics survey block that contains a series of five questions within a larger survey .", "Seems likely that it is an IE8 issue I ll follow up shortly if I can find a decent way of handling this in Qualtrics .", "I want to change the value of the question lable in qualtrics from the default to something else .", "I am creating a pilot survey in Qualtrics to make sure all my questions are clear and easy to understand .", "So I think I need some Java script lines to execute the Qualtrics source line like below .", "I am aware that we can use Qualtrics Piped Text function to dynamically change the numbers in the Source code .", "Please see screenshot below : .. . .. . Could you please simple code how it works in Qualtrics using its javascript API", "In my qualtrics survey I have a horizontal slider that I want to put a label to the right of the actual slider .", "Put this in the Qualtrics header as Anthony recommended : .. . .. . And this in your question with NO Qualtrics.SurveyEngine.addOnload so it only applies to the page with your question on it :", "A Qualtrics slider question isn t really a good match for what you are trying to do .", "A lab member of mine has noticed that when a survey is closed and then reopened in Qualtrics it will re-randomize the condition that the participant was originally given .", "I am using Qualtrics to make a survey and I am in need of multiple texts that fade in and out in the same space .", "Wow I went to the not working survey in Qualtrics to copy-paste you the code it was there I retried.. . and it worked fine .", "Is there a way to add open graph tags meta-tags to my qualtrics survey so the shared post includes a image", "If Qualtrics does not support such a GET request which service perhaps SurveyMonkey or its ilk best facilitates what I m trying to build", "I am trying to write javascript for an event-listener that will record whether Qualtrics survey participants hit play on the mp3 embedded in a question .", "In Qualtrics does someone know how to insert a pop-up bubble onto a page so that respondents can swipe over the bubble and see additional information", "I am working on a survey in qualtrics and need to be able to set many embedded data fields with different values depending on a random selection of the experimental condition .", "I am trying to use Qualtrics if anyone is familiar with the program for a survey and I am embedding JavaScript in order to score some of the questions in a specific manner .", "Anyway this will greatly facilitate my workflow when I import messy csv files from Qualtrics .", "When you receive a survey from Qualtrics via site intercept is there a way to find out via searching on the HTML on it or on the message event which survey you are receiving", "If piping into a JavaScript you have to put it in quotes because the pipe e : Field SurveyID gets replaced with a string value SV xxxxxxxxxx by the Qualtrics server when it sends the page to the browser .", "I would like to auto-advance my participants in a Qualtrics survey to the next question on the next page after they have been inactive for 10 seconds .", "I couldn t find great documentation on how Qualtrics stores and uses the hotspot variables so I couldn t figure out good if statements etc .", "The input cells were manually created using html not standard input boxes used by Qualtrics due to the need for how the input boxes appeared ." ] }
{ "confidence": [ 60.05531311035156, 55.006649017333984, 52.642608642578125, 51.98728561401367, 50.65046691894531, 50.36735153198242, 50.104270935058594, 49.55381774902344, 49.0854377746582, 48.62989807128906, 47.45386505126953, 47.15953063964844, 47.02549743652344, 47.02549743652344, 46.77671813964844, 46.310813903808594, 46.310813903808594, 46.310813903808594, 46.03575134277344, 45.923004150390625 ], "content": [ "Question : Qualtrics used to have a section of their website called Coder s Corner that had snippets of code that could be used to advance the functionality of the surveys but they did away with that section . I am looking for the Javascript code that controls the size of a question text box specifically a constant sum text box . I would greatly appreciate any help I can get . Thanks .. . Answer : The answers given don t specifically apply to a Qualtrics constant sum question . I think the code below is what you are looking for . Change 75px to the desired width . I don t believe the specific code above was ever included on the Qualtrics javascript page . I ve made a number of Qualtrics javascripts publicly available at https : gist.github.com marketinview", "Question : I am using Qualtrics for my online survey . I have a problem with the length of text boxes . There are plenty of long items within my surveys but the boxes do not have enough spaces . Thus it makes the length of survey very long . Please see attached the snapshot . I need to decrease the space between scale poles and also increase the length of item boxes . enter image description here http : i.stack.imgur.com j86Yt.jpg Comment : What have you tried The general idea of this site is for programmers to help each other . It isn t a free programming service . .. . Answer : just edit the width of our element in your CSS stylesheet and the margin padding left-right of your checkboxes.. . good luck", "Question : null .. . Answer : I am trying to use Qualtrics if anyone is familiar with the program for a survey and I am embedding JavaScript in order to score some of the questions in a specific manner . The problem I have is that I am trying to connect a string with operators but it fails to do so but when I try it in a different editor the string operators work fine . Code : .. . .. . which alerts the value .. . .. . this alerts an empty text box . Note : alert Hello + World works fine when I use this .. . .. . So if there is anyone who knows Qualtrics and knows why it does this or any other methods this would be a help . Comment : What you re describing isn t really related to JavaScript . q : QID70 SelectedAnswerRecode + 1 + and q : QID70 SelectedAnswerRecode 1 are identical JavaScript cannot tell them apart . I m guessing Qualtrics is doing some kind of pre-processing on .. . in which case you can t dynamically build strings that way . You re building a string in JavaScript which presumably only runs after whatever preprocessing step Qualtrics performs . Comment : Ok thanks that would make sense then . I was only curious why it didn t work with Qualtrics . I appreciate the insight", "Question : Due to some features that I wish were available in Qualtrics v3 see previous post http : stackoverflow.com questions 37336311 limitations-of-qualtrics-api 37336392 37336392 I checked out their most recent previous version v2.5 https : survey.qualtrics.com WRAPI ControlPanel docs.php to try to find a GET request which closely approximates the data from individual surveys that I m trying to obtain on each request . However when I do their built-in API test on my own credentials : .. . .. . enter image description here http : i.stack.imgur.com p8CA6.jpg .. . .. . I get the following error : .. . .. . I ve double-checked to ensure that I m entering the proper credentials well-defined survey ID and API token but am not sure why I am getting this error . As an aside if there is another survey platform such as SurveyMonkey which has an API which allows me to extract information from individual surveyIDs without having to export everything manually first I would greatly appreciate any knowledge of such services . .. . Answer : You should not set JSONPCallback to false . Set it to true and to setup your Ajax call properly refer to JQuery JSONP documentation https : learn.jquery.com ajax working-with-jsonp", "Question : When you receive a survey from Qualtrics via site intercept is there a way to find out via searching on the HTML on it or on the message event which survey you are receiving If that is not the case is there a way to modify a question s JS to send this information Thank you .. . Answer : A couple of things you could do : .. . .. . 1 Add the embedded data field SurveyID at the top of your survey flow and don t assign a value to it . SurveyID is a unique identifier Qualtrics assigns to a survey . You can then pipe it into a question or JavaScript as e : Field SurveyID . You could also pass it to web service that uses the Qualtrics REST API to return information about the survey such as survey name etc . 2 Under Survey Options you can change the Meta Description to be the survey name . Then if you look at the source html there will be a tag like : Comment : I tried the first option and it worked Exactly what I needed to get the Survey ID from the receiving end . I d just want to add one point to the people seeing this later on : to get the value of the embedded data field you have to access it like this e : Field SurveyID with the quotation marks . Comment : If piping into a JavaScript you have to put it in quotes because the pipe e : Field SurveyID gets replaced with a string value SV xxxxxxxxxx by the Qualtrics server when it sends the page to the browser . If you were piping into a question or using it as a web service parameter you wouldn t use quotes .", "Question : I m trying to implement an autocomplete feature to Qualtrics online survey management software . As directed in this feature on the Qualtrics http : www.qualtrics.com university researchsuite advanced-building question-options-advanced add-javascript website I ve added the main features of the code to the header of it s Look and Feel section . Also I ve added this to the specific question block I want the autocomplete feature to be applied to . I receive no error messages the text input field just does not call up the tags . PS : Two stackoverflow users have asked the same question one had fixed the issue but gave no explanation for exactly what had worked and the second received no response from the community . PS.2 : If possible please include an adapted code for use so that I can implement it easily I have a very cursory knowledge of code : . Comment : You re loading jQuery UI before you re loading jQuery .. . Answer : Try changing tags to .InputText . tags refers to an id that doesn t exist in Qualtrics . .InputText is a class used on text input fields . Put this in the Qualtrics header as Anthony recommended : .. . .. . And this in your question with NO Qualtrics.SurveyEngine.addOnload so it only applies to the page with your question on it : Comment : Just a quick note . First of all this answer is correct I just tested it . Second you will likely want to add some styling to the submenu to make it look a bit better . Such as : .ui-menu-item background-color : white font-size : 1.5em width : 150px .ui-menu-item : hover background-color : grey font-size : 1.5em width : 150px", "Question : Qualtrics used to have a section of their website called Coder s Corner that had snippets of code that could be used to advance the functionality of the surveys but they did away with that section . I am looking for the Javascript code that controls the size of a question text box specifically a constant sum text box . I would greatly appreciate any help I can get . Thanks .. . Answer : This code should do what you are looking to do : .. . .. . Click here http : forums.asp.net t 1334379.aspx How 20to 20change 20the 20width 20of 20a 20Textbox 20using 20javascript 20 for more info", "Question : I need help with a little Javascript . I want to display two images on Qualtrics but after a 5 second delay . To be more clear Image2 should display after 5 seconds of Image1 being displayed . Comment : did you do your homework Comment : I have no idea about Java . I need it so as to get my research through . Comment : Great btw java javascript at all Comment : Oh I am sorry . You see this is how dumb I am when it comes to these things . That s why I asked for help here . .. . Answer : I wonder why there isn t a Qualtrics tag on stackoverflow . I would add one if I had the reputation . Anyway hopefully this will still be useful to you . This is a modification of the timer on the Qualtrics site : .. . .. . http : www.qualtrics.com university researchsuite coders-corner html-and-css displaytimer .. . .. . A few notes : .. . .. . 1 . I wasn t sure if you wanted to have the first image disappear as the second one appears but that s the behavior that you ll get with this JavaScript . 2 . I left the countdown just to illustrate relationship between the timing and the images appearing and disappearing . 3 . Just in case it s not entirely clear . The code for the images I used would have to be replaced by the links you get from your own Qualtrics image library . So img src https : yourorghere.qualtrics.com CP.. . would be replaced by whatever your organizations url at Qualtrics is .. . .. . This is the CSS : .. . .. . Image 1 : .. . .. . This is the html : .. . .. . Add this javascript replacing the default Qualtrics JavaScript : .. . .. . Image 2 : .. . .. . This is the html : .. . .. . The JavaScript that replaces the default Qualtrics JavaScript :", "Question : null .. . Answer : Does anyone have experience with adding a jsPsych script to Qualtrics I ve added my script uploaded all jsPsych files to the library and added custom CSS . However Qualtrics does not display any content . All help would be much appreciated This is what I added to CSS : .. . .. . This is my code : Comment : script tags should be added to the header source not the custom css Comment : Hi Anthony I ve added the script tags to the header source as you suggested . But still no content is displayed . Do you have any more suggestions on how to fix the problem Thanks Comment : I am not very familiar with this library I would need to see an example to even begin to debug . Comment : Have you seen this : pvlv.org 2014 10 22 mturk-and-qualtrics http : www.pvlv.org 2014 10 22 mturk-and-qualtrics Comment : Thanks for the suggestions . I ve decided against adding my script to Qualtrics . The video stimuli I use take very long to upload in Qualtrics .", "Question : With respect to the Qualtrics API v3 documentation https : api.qualtrics.com docs overview there does not appear to be any means to send a GET request through a REST client to get the individual survey responses for a specific survey I suppose that the developers figured that no would be interested in decoupling the survey results from the admin panel . The reason why I would like to be able to submit a GET request to get survey results is for real-time data-visualization purposes that do not depend on me exporting the data every so often to re-update the visualization . If Qualtrics does not support such a GET request which service perhaps SurveyMonkey or its ilk best facilitates what I m trying to build Or do I have to build an entire survey module from scratch shudders .. . Answer : SurveyMonkey has a REST API that allows you to fetch all your responses . You can fetch all your responses https : developer.surveymonkey.com api v3 survey-responses by doing : .. . .. . Which will give you a skinny payload usually IDs only and maybe a name or title but not in this case . You can then get a specific response https : developer.surveymonkey.com api v3 responses-id by doing : .. . .. . You can also fetch all responses as fatter payloads https : developer.surveymonkey.com api v3 surveys-id-responses-bulk by doing : .. . .. . Or depending on your use-case for example if you have some visualization that you want to update in real-time without polling for responses you can set up a webhook https : developer.surveymonkey.com api v3 webhooks . Where subscription url is your callback url and then whenever any new responses for the defined surveys come in you ll be notified to the subscription url provided and you can then know to refresh your charts .", "Question : null .. . Answer : I m working on a Qualtrics pick group rank question type and rather than showing multiple-columns of items want to show multiple-columns of Groups the columns feature only allows for two . I tried using the answer from a previous thread Qualtrics javascript : Display items in pick group rank questiontype in columns http : stackoverflow.com questions 36586703 qualtrics-javascript-display-items-in-pick-group-rank-questiontype-in-columns changing items to groups and the number of columns from 2 to 3 but did not get the result I was hoping for .", "Question : Does anyone know how to format Qualtrics text entry box such that it displays a dollar-sign commas cents automatically . In other words I want to structure the text entry box so that when a respondent types 100 it becomes 100.00 . Any help would be appreciated Thanks1 Comment : What have you tried The general idea of this site is for programmers to help each other . It isn t a free programming service . .. . Answer : Textbox displays a dollar-sign commas cents automatically . Comment : That won t work in Qualtrics .", "Question : I am looking for a solution using javascript to record whether a user clicked on a link in qualtrics .. . .. . I have followed these instructions - Javascript code to record click on link-to PDF - Qualtrics http : stackoverflow.com questions 31013065 javascript-code-to-record-click-on-link-to-pdf-qualtrics but they no longer work .. . .. . Another person had asked the same question but then went to adopt a different method Tracking when an external link is clicked in Qualtrics http : stackoverflow.com questions 36379227 tracking-when-an-external-link-is-clicked-in-qualtrics .. . .. . Any thoughts on how to get it working .. . Answer : Excuse my bluntness but the problem with the previous questions on this subject were the OPs inability to follow directions rather than the answers given . Here it is one more time : .. . .. . 1 Add the embedded variable to your survey flow before the question block : .. . .. . 2 Add the link-to your question text in HTML mode : .. . .. . 3 Add the following JavaScript to your question where extLink matches the id of your link in 2 and clicked matches the embedded variable in 1 . If it doesn t work you are doing something wrong . Here is a survey that shows it works : https : marketinview.qualtrics.com jfe5 preview SV 02JbXhz8qyHgv2d .. . .. . Click on the next button on the first page to see the value of clicked on the next page . Comment : Thanks for the quick response . Apologies I have never used javascript before . Users are sent to one of four blocks but this one link appears in every block - will each block need a unique embedded variable Comment : No but each question that includes the link will need to include the code provided and in addition the embedded data needs to exist before the blocks in question in survey flow . Comment : Anthony is correct", "Question : I need help with a little Javascript . I want to display two images on Qualtrics but after a 5 second delay . To be more clear Image2 should display after 5 seconds of Image1 being displayed . Comment : did you do your homework Comment : I have no idea about Java . I need it so as to get my research through . Comment : Great btw java javascript at all Comment : Oh I am sorry . You see this is how dumb I am when it comes to these things . That s why I asked for help here . .. . Answer : You actually don t need Javascript to do this . In Qualtrics you can add a Timing question to auto-advance the participant after 5 seconds . Here s how : .. . .. . 1 . Insert the 1st image you want to display .. . 2 . Add a Timing question set the auto-advance option on the right to 5 for 5 seconds .. . 3 . Insert a Page Break after the Timing question .. . 4 . Insert the 2nd image you want to display after the Page Break .. . .. . That should do it . If you have any more questions just ask us at support@qualtrics.com .. . .. . Thanks for using Qualtrics . Share the love on Facebook and Twitter @qualtrics .. . .. . -Qualtrics Team Comment : Thanks a lot but I need the two questions to be displayed on the same page not two separate pages . Therefore a timing question won t do the trick . Javascript is required so as to time the two images to load at two different times . Comment : Qualtrics.SurveyEngine.addOnload function Place Your Javascript Below This Line this.hideimage this.showimage.delay 5 This doesn t seem to work", "Question : I am very new to writing javascript . Currently I m using Qualtrics survey to do an auditory experiment . The auditory stimuli are uploaded to the website and I use Qualtrics Source function to write a small code like below to play the auditory stimuli . Caveat : the www.auditorystimuli.com is a dummy address .. . .. . The entire experiment is comprised of 120 trials so rather than building the question 120 times I am trying to use Qualtrics Loop function to loop the questions . The problem I am currently facing is that in the above lines the part where it says L0 high 1 right before the .mp3 extension needs to change every time the loop advances e.g . L0 high 1 for the first question and then L9 low 2 for the second question and so on . I am aware that we can use Qualtrics Piped Text function to dynamically change the numbers in the Source code . I ve used below code and was successful in playing L0 high 1 for the first loop L0 high 2 for the second loop and so on . However as stated above I also have to change the letters right in front of the lm : CurrentLoopNumber part . I am thinking of writing below Qualtrics Source code so that the javascript can play the specified sound depending on the number of the current loop . I now know how to write javascript lines which recognizes the keypress like below . Using above line I am successful in playing the sound which has the id 1 . My questions is that how can I code javascript lines that recognizes the number of the current loop lm : CurrentLoopNumber part of the Qualtrics Source code line My rough image of the javascript is something like below . What will be appropriate codes that should replace the e.LOOP LOOP1 or LOOP2 parts Thank you so much for your time reading the long question and I would really appreciate your help : .. . Answer : You can do it with one line of code : Comment : This is truly amazing Thank you so much for saving me again", "Question : I am very new to coding a Java script and am trying to embed script lines that enable Qualtrics to play two types i.e . High http : www.chrisasplund.com AAB-SiD High.mp3 or Low http : www.chrisasplund.com AAB-SiD Low.mp3 of sounds mp3 files uploaded on the website depending on the response of a participant . Below Java script embedded in Qualtrics survey enables me to detect the keyboard press for the answer instead of mouse click i.e . clicking a bubble among multiple-choice radio-button which can be quite time consuming . I would very much appreciate it if someone could teach me possible lines that could be inserted below the clines of choiceID 1 or choiceID 2 to play the selected mp3 files i.e . if choiceID 1 then play High.mp3 if choiceID 2 then play Low.mp3 . I use the below Qualtrics source code to autoplay the mp3 files in the survey . So I think I need some Java script lines to execute the Qualtrics source line like below . Thank you so much for your time and kindness .. . Answer : Add an id to your audio tags like : .. . .. . Then to play it : Comment : Thank you so much for such a concise and amazingly helpful answer This works perfectly : Comment : You re welcome Please accept the answer .", "Question : null .. . Answer : In my Qualtrics survey I have a free-response textbox question . I d like to get the response to this question into javascript so I can do some complicated text-processing and post the result to an external page . It looks like the official Qualtrics way to do that is to use the piped text code : .. . .. . But this generates javascript code with the literal response inserted into the code . If a survey-taker puts a quote mark in their response it will break the code . I ve also verified that it can be used to inject arbitrary javascript Is there any way to assign a user-generated value to a variable safely What I ve tried : .. . .. . It would be nice if there were an API call that put the response directly into a javascript variable without having to use piped text . I ve examined their API documentation https : ut1.qualtrics.com WRAPI QuestionAPI classes Qualtrics 20JavaScript 20Question 20API.html and talked to tech support and it doesn t look like such a function exists . It would also be helpful if Qualtrics had a built-in feature for character substitution that I could use to strip quotes but I don t think it does . I could use response validation to prevent respondents from submitting a response that has quote marks in it . This is the only workable solution I ve come up with but it would be annoying for users .", "Question : I m making a survey on Qualtrics and would like to distribute it via facebook . Is there a way to add open graph tags meta-tags to my qualtrics survey so the shared post includes a image I see that qualtrics automatically saves the survey title and description as meta-tags but I do not know how to either a remove the blank image preview that is automatically generated when sharing the link or b add a meta tag to display an image . Thanks for any advice .. . Answer : I don t know if it will work but you could try putting the meta-tags in the survey header under Look Feel Advanced . Comment : Thanks -- I have tried that and it does not seem to work . I spoke with someone at Qualtrics yesterday who said it might be possible to use javascript to inject the tags into the head but I don t know enough javascript to be able to figure that out . Comment : Yes I was afraid not having them in the html-head would keep it from working . I don t think using JavaScript is going to work because it depends on a client browser to run . I m pretty sure Facebook is using a server instead of a browser to grab the meta-tags . While the JS is easy enough it would be a waste of time .", "Question : I ve never used Qualtrics myself and do not need to but my company receives Qualtrics-generated CSV data from another company and we have to advise them about the names to use for fields variables such as mobilephone . The main thing I need to know is the maximum number of characters but other limits such as special-characters to avoid would be helpful . For example would profile field twenty6chars be good The data is going into Moodle which uses profile field . .. . Answer : Qualtrics has 2 different limitations to my knowledge . 1 . Question names are limited to 10 characters absurd in my opinion .. . 2 . Question Export tags this defaults to the question text and is shown on the second row for csv datasets has a limit of 200 characters .", "Question : Due to some features that I wish were available in Qualtrics v3 see previous post http : stackoverflow.com questions 37336311 limitations-of-qualtrics-api 37336392 37336392 I checked out their most recent previous version v2.5 https : survey.qualtrics.com WRAPI ControlPanel docs.php to try to find a GET request which closely approximates the data from individual surveys that I m trying to obtain on each request . However when I do their built-in API test on my own credentials : .. . .. . enter image description here http : i.stack.imgur.com p8CA6.jpg .. . .. . I get the following error : .. . .. . I ve double-checked to ensure that I m entering the proper credentials well-defined survey ID and API token but am not sure why I am getting this error . As an aside if there is another survey platform such as SurveyMonkey which has an API which allows me to extract information from individual surveyIDs without having to export everything manually first I would greatly appreciate any knowledge of such services . .. . Answer : Based on the image above you are missing the URL field which should be api.php . Also I think you want response data so the request would be getLegacyResponseData . At a minimum the actual generated url should be something like this : .. . .. . https : survey.qualtrics.com WRAPI ControlPanel api.php API SELECT ControlPanel Version 2.5 Request getLegacyResponseData User user name here Token token here Format JSON SurveyID survey id here https : survey.qualtrics.com WRAPI ControlPanel api.php API SELECT ControlPanel Version 2.5 Request getLegacyResponseData User 5Buser name here 5D Token 5Btoken here 5D Format JSON SurveyID 5Bsurvey id here 5D" ] }
[ "yes-answer-long", "yes-answer-short" ]
metrics
UNK_RELATION
nszombies@osx@48
nszombies -- nszombies is an apple os-specific @placeholder and ios reference to the zombie-process .
{ "confidence": [ 44.84149932861328, 41.639896392822266, 35.73594665527344, 35.60334777832031, 35.60334777832031, 35.60334777832031, 31.014890670776367, 31.014890670776367, 31.014890670776367, 31.014890670776367, 28.251434326171875, 25.06133270263672, 23.652820587158203, 22.761741638183594, 22.019521713256836, 21.57758331298828, 21.57758331298828, 20.745155334472656, 20.483837127685547, 19.6724853515625, 19.6724853515625, 19.6724853515625, 19.6724853515625, 19.547012329101562, 18.123991012573242, 17.853729248046875, 17.79027557373047, 17.24657440185547, 16.756023406982422, 16.74061393737793, 16.74061393737793, 16.74061393737793, 16.604930877685547, 16.410757064819336, 16.33751678466797, 16.00655746459961, 16.00655746459961, 15.92799186706543, 15.493885040283203, 15.470102310180664, 15.160168647766113, 14.93691635131836, 14.81025505065918, 14.754018783569336, 14.644350051879883, 14.252982139587402, 14.252982139587402, 14.140312194824219, 14.12591552734375, 13.579324722290039, 13.020606994628906, 13.016738891601562, 12.839995384216309, 12.239145278930664, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816, 11.841431617736816 ], "content": [ "By NSZombies do you mean setting the NSZombies flag to true in your project", "I set NSZombies on but got nothing that was meaningful in Instruments .", "I think I have NSZombies working but xcode isn t giving me an alert about a zombie being messaged when my app crashes .", "But the root cause of the crash wouldn t be because NSZombies were enabled right", "Meaning turning off NSZombies would not have prevented the crash .", "Almost everybody recommends starting to solve the problem using NSZombies .", "I have enabled NSZombies hoping to see where-in my code am I accessing an object I shouldn t be accessing .", "I ve read on here that NSZombies with ARC enabled can actually cause a crash and I ve also read it can t be the cause of a crash .", "What is a simple code snippet where a message is sent to a deallocated object causing a scenario where NSZombies should alert me", "But if you just want to make sure that you ve got NSZombies turned on properly this should be a reasonable test case .", "When I try to run zombie with an ios 8.3 simulator it works .", "I receive the following error while my UITableView is loading : .. . .. . I ve used NSZombies to track down the error to the line : .. . .. . Where CellIdentifier has previously been declared : .. . .. . I ve included an image from instruments .", "I m working with xcode 6.3.1 and zombie is enabled in Scheme .", "A zombie is a pointer to a deallocated object .", "The checkbox says Enable Zombie Objects .", "OK I give to the common wisdom that a zombie can not exist without enabling zombie objects .", "This is rather counter to the concept of a zombie task which nomenclature I believe predates zombie objects .", "The problem appeared when I added threads for printing on the labels the biometric data on real-time while the signature is being drawn randomly it crashes I mean sometimes it draws the signature complete sometimes just 3 4 of the signature or not even a half of it... . .. . .. . Used a tool called Instruments trying to detect the NSZombies and this is what I got.. .", "In other words if you were to uncomment the commented lines then run Zombies the zombie logging mechanism would trigger .", "Xcode 4.1 has a checkbox in the scheme editor to enable zombie objects .", "Simply zombie exception should be risen before dealloc was called not after .", "The problem occurs in CCMenu.m here : .. . .. . I can observe that selectedItem is a zombie .", "Enabling zombie detection does not prevent dealloc from being called .", "I m developing an app in iOS .. . .. .", "enter image description here http : i.stack.imgur.com pURES.png .. . .. . this is the piece of code where it crashes : .. . .. . it says that - NSConcreteMutableAtributedString lenght is the responsible of the Zombie .. . .. . this is my code : .. . .. . and the code called by the thread : .. . .. . thanks in advance for your support", "@zaph If you have zombies enabled a zombie is what s left behind when you deallocate an object .", "Is there something Notification-related that is internal to iOS that is somehow trying to message my UITextField", "This gave me the following error : .. . .. . An Objective-C message was sent to a deallocated CFString immutable object zombie at address : blah blah .. . .. . When I then look at the allocation summary within Instruments and work backwards from the zombie detection the first time my code is listed is in the deallocation of the helper class instance .", "I m trying to run zombies instrument with an ios 7.1 simulator but I receive the error Allocation tracking library was not loaded in time .", "Before I move on with my debugging I d like to run some code that should for sure result in a message being sent to a zombie de-allocated object .", "Instead of freeing up that memory a zombie holds that memory and can alert you when a message is sent to it -what should be a deallocated object .", "@zaph The whole point of a zombie as a debugging tool is to find cases where you have a pointer still around to an object that was deallocated and you then attempt to access the object .", "By making the array store a reference to K PreviewImage instead of iImage the compiler now retains a reference to the K Preview Image", "I simply bind a couple of my ViewController methods to the UITextField s Editing Did Begin and Editing Did End events in the storyboard in order to present and dismiss the ABPeoplePicker : .. . .. . Upon selecting a contact the following happens ABPeoplePickerNavigationControllerDelegate : .. . .. . and finally : .. . .. . Interestingly the crash only happens in iOS 6 . iOS 5 works just fine .", "Secondly you re not keeping your reference to your K PreviewImage .", "It s because you do not own the objects you try to release you don t hold a reference to them .", "Note that I am using ARC and the UITextField is declared as a weak reference in my ViewController .", "I have some crushes in iOS application .", "Zombie trace http : i.stack.imgur.com g6OUq.png The code for updating the sprites and also delete them is located in update : .. . .. . The remove method in GameSprite.m : .. . .. . The first block updates the sprites in the SpriteBatchNode textureAtlas .", "As a quick reference usually you aren t the owner if you didn t call the alloc method yourself to create the object or if you didn t retain it .", "Have been working on a Tower Defense game for iOS for some time now .", "If your project needs to support OS X versions before 10.7 or iOS versions earlier than 5.0 then you can t use weak pointers so in that sort of project you d expect to find unsafe unretained used more often .", "I was storing the iImage class in the array reference but that apparently does NOT retain the object that is a part of i.e .", "Look here : UIStringDrawing methods don t seem to be thread safe in iOS 6 http : stackoverflow.com questions 12744558 uistringdrawing-methods-dont-seem-to-be-thread-safe-in-ios-6 .. . .. . Try drawing your text in CATextLayer instead", "In my iPad app iOS 6.0 XCode 4.5 I am getting the following message when I run : .. . .. . Terminating app due to uncaught exception NSInvalidArgumentException reason : - NSArrayM insertObject : atIndex : : object cannot be nil .. . .. . I have looked and looked but I don t see where it s happening .", "The creeps reference count gets down to 0 but seems to still be in the childs array .", "Also make sure that nothing obtains the reference via the property getter and then releases it .", "Here is table form profiler with data for released zombie object I removed uninteresting columns like : Category - always equal CALayer timestamp : .. . .. . Now this table doesn t point anywhere to my code all entries are related to system libraries : UIKit or QuartzCore .", "To find where where it came from I ve started profiling code on simulator iOS 6.1 using Zombies trace template .", "That may or may not be contributing to your issue but a wiser approach is to keep an assign iVar CCArray for children of a specific class .", "UPDATE .. . .. . Here is the full code block involving how my K PreviewImage was being added with a touch-event .. . .. . Solved : .. . .. . Because I was not storing a reference to the K PreviewImage k even though the subview was added even though it belongs-to k k was not being retained .", "And the 1st row of both components in typePicker is always None to allow users not to select a specific type which is why there is many +1 in the code .", "The reason I have three blocks of different types is due to the fact that projectiles have weak reference to creep they are shooting at and needs to be deleted before the creep .", "@MarkBessey Thanks this is what I m looking for the only problem is that I have automatic reference counting enabled and I get the error : ARC forbids explicit message send of release", "this program crashes if i uncomment the release statements .", "i get that i am overreleasing and realized that quickly .", "but just to test zombies i turned them on NSZombiesEnabled YES and CFZombieLevel 16 and the program runs fine and throws no exceptions .", "what gives", "i thought turning on zombies would have just told me what a doofus i am...not fix it .", "Why don t you change id sender to NSButton sender in - IBAction countCharacters :", "That way you won t have to check .", "Unless this is not only called through the GUI .", "@zneak that doesn t make sense .", "An action method is always - IBAction selector : id sender .", "And whether or not you check is entirely orthogonal to how target action works .", "@bbum It does make sense .", "Explicitly telling what kind of object you expect to send the action makes it impossible in Interface Builder to assign the action to any other type of object .", "Which is obviously what he wants .", "I just double-checked in case I did say something utterly stupid and it behaves exactly the way I describe it .", "Yup .", "You are correct .", "My mistake .", "Their ownership is given to the nearest NSAutoreleasePool .", "You can read about object ownership here http : developer.apple.com mac library documentation Cocoa Conceptual MemoryMgmt Articles mmObjectOwnership.html .", "Retain ing an object makes you an owner calling release means you give up ownership and will deallocate the object if it has no more owners .", "You must not release objects for which you don t have ownership .", "Your current code without release is exactly what you need .", "Exactly correct .", "thank you that makes sense .", "i knew i shouldn t release them but it didn t click as to why not .", "@bbum but they didn t...that was the point of the question", "If it isn t triggering and you know the autorelease poole is being drained please file a bug .", "Well zombies will tell you when a free d object receives a release correct", "So if your not sending the release you commented it out you won t see the zombies complaining", "Your NSString NSNumber methods are all convenience-methods and you don t have to release them .", "So -yeah You solved the problem yourself .", "Is there a tool or setting or something that will at least tell me where this is happening", "If you set a breakpoint on Objective-C exceptions using the Breakpoint Navigator it should stop and show you a stack-trace when it hits the bad line .", "Sorry for the delay.. . this is the stack trace.. . totally unmeaningful.. . First throw call stack : 0x1b87012 0x1894e7e 0x1b3ab6a 0x1b3aa20 0x565f58 0x175fe 0x17514 0x1a0ea 0x1a21a 0x1bd06 0x23b3 0x7d97b7 0x7d9da7 0x7dafab 0x7ec315 0x7ed24b 0x7decf8 0x2b2bdf9 0x2b2bad0 0x1afcbf5 0x1afc962 0x1b2dbb6 0x1b2cf44 0x1b2ce1b 0x7da7da 0x7dc65c 0x22cd 0x21f5 libc++abi.dylib : terminate called throwing an exception", "I removed all the code pertaining to Magical Record downloaded the latest version and re-installed it. . that cured the problem", "Thanks for the suggestion tho .", "I have a UITextField that I am presenting inside a modal-dialog .", "Upon touching the UITextField the ABPeoplePicker contact selector is presented also modally .", "If I then dismiss the ABPeoplePicker AND the originally presented modal-dialog THEN put the app in the background I get an EXC BAD ACCESS crash upon application resume .", "Using zombies : .. . .. . I am not doing anything too fancy here .", "Some potential clean-up task I am missing", "I am using the same technique elsewhere without issue and it is really confusing me .", "I even tried moving the original text field to a push style presentation instead of modal to rule out any issues due to nested modally presented dialogs .", "Any insights are much appreciated", "Thanks" ] }
{ "confidence": [ 55.62837219238281, 52.97405242919922, 41.064697265625, 38.909950256347656, 36.66812515258789, 33.165306091308594, 33.047523498535156, 31.007450103759766, 30.049224853515625, 22.356243133544922, 20.647968292236328, 20.317201614379883, 20.254629135131836, 19.350751876831055, 19.05791473388672, 18.39671516418457, 14.09999942779541, 13.328542709350586, 12.174057960510254, 12.174057960510254 ], "content": [ "Question : I m new to objective-c and xcode and an app I m currently writing is receiving the infamous EXC BAD ACCESS error . Almost everybody recommends starting to solve the problem using NSZombies . I think I have NSZombies working but xcode isn t giving me an alert about a zombie being messaged when my app crashes . Before I move on with my debugging I d like to run some code that should for sure result in a message being sent to a zombie de-allocated object . What is a simple code snippet where a message is sent to a deallocated object causing a scenario where NSZombies should alert me Comment : @zaph No that s a memory leak . A zombie is a pointer to a deallocated object . Comment : @zaph If you have zombies enabled a zombie is what s left behind when you deallocate an object . Instead of freeing up that memory a zombie holds that memory and can alert you when a message is sent to it -what should be a deallocated object . Comment : @zaph The whole point of a zombie as a debugging tool is to find cases where you have a pointer still around to an object that was deallocated and you then attempt to access the object . Comment : @zaph this question is specifically asking about NSZombie what are you talking about Comment : OK I give to the common wisdom that a zombie can not exist without enabling zombie objects . This is rather counter to the concept of a zombie task which nomenclature I believe predates zombie objects . .. . Answer : For non-ARC code : .. . .. . This will give you EXC BAD ACCESS with Zombies off and a message sent to deallocated instance message with Zombies enabled . If your project is using ARC then it s a bit harder to reliably-cause messages to de-allocated objects that is the point of ARC after all . This works : .. . .. . It s probably not very similar to what your actual code is doing because who the heck uses unsafe unretained anyway But if you just want to make sure that you ve got NSZombies turned on properly this should be a reasonable test case . If you re looking for suspicious places in your code then for sure look for unsafe unretained pointers though you won t find any and double-check that the right casts are used for CoreFoundation objects that are casted to Cocoa objects . If your project needs to support OS X versions before 10.7 or iOS versions earlier than 5.0 then you can t use weak pointers so in that sort of project you d expect to find unsafe unretained used more often . Comment : Of course this is non-ARC code . Comment : @MarkBessey Thanks this is what I m looking for the only problem is that I have automatic reference counting enabled and I get the error : ARC forbids explicit message send of release Comment : This may not actually crash even with zombies off . Comment : Well if you have ARC enabled you shouldn t have any zombies unless you re mis-using weak pointers . Fair enough - I ll make another example for ARC code . Comment : @MarkBessey Weak pointer mis-use is possible I m coming into a project that had the problem before I started . I appreciate the help .", "Question : I m new to objective-c and xcode and an app I m currently writing is receiving the infamous EXC BAD ACCESS error . Almost everybody recommends starting to solve the problem using NSZombies . I think I have NSZombies working but xcode isn t giving me an alert about a zombie being messaged when my app crashes . Before I move on with my debugging I d like to run some code that should for sure result in a message being sent to a zombie de-allocated object . What is a simple code snippet where a message is sent to a deallocated object causing a scenario where NSZombies should alert me Comment : @zaph No that s a memory leak . A zombie is a pointer to a deallocated object . Comment : @zaph If you have zombies enabled a zombie is what s left behind when you deallocate an object . Instead of freeing up that memory a zombie holds that memory and can alert you when a message is sent to it -what should be a deallocated object . Comment : @zaph The whole point of a zombie as a debugging tool is to find cases where you have a pointer still around to an object that was deallocated and you then attempt to access the object . Comment : @zaph this question is specifically asking about NSZombie what are you talking about Comment : OK I give to the common wisdom that a zombie can not exist without enabling zombie objects . This is rather counter to the concept of a zombie task which nomenclature I believe predates zombie objects . .. . Answer : You could create a CF object bridge it to an Objective-C object then release it and try to use the bridged object . I think you have to use bridge to get this to behave the way you want .", "Question : I ve read on here that NSZombies with ARC enabled can actually cause a crash and I ve also read it can t be the cause of a crash . People have said it can cause a crash by a bug where dealloc is not called on the object . Is that true and is that still the case I realize it could crash by running out-of-memory but is that the only time a crash could result from zombies being enabled The post I m looking at is : NSZombie crashing app when enabled on the iPhone http : stackoverflow.com questions 1126443 nszombie-crashing-app-when-enabled-on-the-iphone Comment : See also stackoverflow.com questions 4168327 what-is-nszombie http : stackoverflow.com questions 4168327 what-is-nszombie Comment : What do you want to know that the other question doesn t already tell you Comment : well you generally only have zombies on when you are looking for the cause of a crash already.. . so do you think zombies is causing a crash before the crash you are looking for it is probably just catching one that could be a crash before hand.. . like a pointer that gets assigned to another object that happens to respond to the selector you are sending it.. . like -description -length -intValue something common probably .. . Answer : It is not clear what you are asking . By NSZombies do you mean setting the NSZombies flag to true in your project Yes that will cause your program s memory to grow forever and you will eventually run out-of-memory and crash . When zombies are enabled instead of releasing objects on dealloc the runtime marks them as zombies and leaves their memory in use . If you mean can having zombies in your program objects that get deallocated but your code tries to send messages to them then yes that can and often does cause crashes . Zombies are less common under ARC but still possible . Comment : Yes I mean t If you mean can having zombies in your program objects that get deallocated but your code tries to send messages to them . But the root cause of the crash wouldn t be because NSZombies were enabled right Meaning turning off NSZombies would not have prevented the crash . Comment : @SukyaMaki You are confusing zombies and the NSZombieEnabled debugging mechanism . Zombies are just plain objects that are messaged after deallocation . You can t turn them off .", "Question : I m developing an app in iOS .. . .. . enter image description here http : i.stack.imgur.com S29lV.png .. . .. . this application captures signatures and also redraws them back from a database.. . The problem appeared when I added threads for printing on the labels the biometric data on real-time while the signature is being drawn randomly it crashes I mean sometimes it draws the signature complete sometimes just 3 4 of the signature or not even a half of it... . .. . .. . Used a tool called Instruments trying to detect the NSZombies and this is what I got.. . enter image description here http : i.stack.imgur.com nFyUB.png .. . .. . enter image description here http : i.stack.imgur.com zZQdw.png .. . .. . and looking in the code this is the portion of code I found.. . enter image description here http : i.stack.imgur.com pURES.png .. . .. . this is the piece of code where it crashes : .. . .. . it says that - NSConcreteMutableAtributedString lenght is the responsible of the Zombie .. . .. . this is my code : .. . .. . and the code called by the thread : .. . .. . thanks in advance for your support Comment : the string in your valores array is already released . probably by another thread . Comment : how to stop the threads from releasing my valores array because I m using them from some other new thread .. . Answer : Don t do threading like that it s too easy to shoot yourself in the foot . Create an NSOperation subclass to do the drawing . Make a custom initializer that takes an array . Store the array with the operation object so you know it won t be released on you . It s a few extra lines-of-code compared to detachNewThreadSelector but it s much safer . Plus you can cancel the operation if the user navigates away from the view that you re showing . Read up on operations and operation queues here : http : developer.apple.com library mac documentation General Conceptual ConcurrencyProgrammingGuide Introduction Introduction.html apple ref doc uid TP40008091", "Question : In my iPad app iOS 6.0 XCode 4.5 I am getting the following message when I run : .. . .. . Terminating app due to uncaught exception NSInvalidArgumentException reason : - NSArrayM insertObject : atIndex : : object cannot be nil .. . .. . I have looked and looked but I don t see where it s happening . I set NSZombies on but got nothing that was meaningful in Instruments . Is there a tool or setting or something that will at least tell me where this is happening Comment : If you set a breakpoint on Objective-C exceptions using the Breakpoint Navigator it should stop and show you a stack-trace when it hits the bad line . Comment : Sorry for the delay.. . this is the stack trace.. . totally unmeaningful.. . First throw call stack : 0x1b87012 0x1894e7e 0x1b3ab6a 0x1b3aa20 0x565f58 0x175fe 0x17514 0x1a0ea 0x1a21a 0x1bd06 0x23b3 0x7d97b7 0x7d9da7 0x7dafab 0x7ec315 0x7ed24b 0x7decf8 0x2b2bdf9 0x2b2bad0 0x1afcbf5 0x1afc962 0x1b2dbb6 0x1b2cf44 0x1b2ce1b 0x7da7da 0x7dc65c 0x22cd 0x21f5 libc++abi.dylib : terminate called throwing an exception .. . Answer : I removed all the code pertaining to Magical Record downloaded the latest version and re-installed it. . that cured the problem Thanks for the suggestion tho .", "Question : I ve read on here that NSZombies with ARC enabled can actually cause a crash and I ve also read it can t be the cause of a crash . People have said it can cause a crash by a bug where dealloc is not called on the object . Is that true and is that still the case I realize it could crash by running out-of-memory but is that the only time a crash could result from zombies being enabled The post I m looking at is : NSZombie crashing app when enabled on the iPhone http : stackoverflow.com questions 1126443 nszombie-crashing-app-when-enabled-on-the-iphone Comment : See also stackoverflow.com questions 4168327 what-is-nszombie http : stackoverflow.com questions 4168327 what-is-nszombie Comment : What do you want to know that the other question doesn t already tell you Comment : well you generally only have zombies on when you are looking for the cause of a crash already.. . so do you think zombies is causing a crash before the crash you are looking for it is probably just catching one that could be a crash before hand.. . like a pointer that gets assigned to another object that happens to respond to the selector you are sending it.. . like -description -length -intValue something common probably .. . Answer : Setting NSZombieEnabled does not cause a crash by itself . Of course some otherwise hidden error in your app can show up as a side effect of the changes in memory usage . People have said it can cause a crash by a bug where dealloc is not called on the object . That is not the case . Enabling zombie detection does not prevent dealloc from being called .", "Question : null .. . Answer : I receive the following error while my UITableView is loading : .. . .. . I ve used NSZombies to track down the error to the line : .. . .. . Where CellIdentifier has previously been declared : .. . .. . I ve included an image from instruments . Any help is greatly appreciated enter image description here http : i.stack.imgur.com nCJCW.png .. . .. . Log output : Comment : static NSString CellIdentifier retrieve CellIdentifier dynamically That is not code so what the heck is it Comment : And what on earth is the purpose of the image from Instruments No one cares how much time this takes you need to be tracking down retains releases . Comment : Added more useful image and code Comment : Prove please that the code CellIdentifier SHFeedCell getCellIdentifierForPost : currentPost has actually run and provided a non-nil result before the dequeueReusableCellWithIdentifier call . Comment : Added log output showing that both cell identifier and cell are not nil", "Question : null .. . Answer : I m trying to run zombies instrument with an ios 7.1 simulator but I receive the error Allocation tracking library was not loaded in time . When I try to run zombie with an ios 8.3 simulator it works . I m working with xcode 6.3.1 and zombie is enabled in Scheme . Doe s anyone know what can be the problem Comment : See also : stackoverflow.com questions 19625082 http : stackoverflow.com questions 19625082 xcode-instruments-error-allocations-tracking-library-was-not-loaded-in-time", "Question : I m having EXC BAD ACCESS problems with cocos2d-iphone 1.0.1 . I have enabled NSZombies hoping to see where-in my code am I accessing an object I shouldn t be accessing . The problem occurs in CCMenu.m here : .. . .. . I can observe that selectedItem is a zombie . This is CCMenu code not mine - I should be looking at my own code . So I take a look at the backtrace : .. . .. . enter image description here http : i.stack.imgur.com 0OyRq.png .. . .. . This doesn t really help me : The backtrace does not reach my own code . That s cocos2d-iphone code . What should I do to address this error then Comment : For the curious I found the problem http : stackoverflow.com q 19533400 555690 - but I m still interested in knowing how to address this kind of problem because this time I was just lucky . .. . Answer : Omega you should be careful with ownership : .. . .. . You should synthesize retained setter for selectedItem .. . .. . .. . .. . .. . Then using setter assignement . Not plain pointer assignment . Comment : your answer is incorrect . both selectedItem and currentItem are retained in an array when that routine executes . The only reason i can see for this is that @Omega removed the selectedItem as child of the CCMenu somehow without overriding the removeChild methods of CCMenu in order to set the assigned iVars to nil after removal from the array . Comment : Yves my solution is incorrect i didn t see it was inside CCmenu . But the design of CCMenu still relies on ownership GUI . Yes this is not what make the app actually crashing but the consequence of client implementation . By the way you should admit that the usage of selectedItem relies on lot of GUI logic stuff . You said it selectedItem as been popped of the child hierarchy and that s what make selectedItem dangling . The fact is SelectedItem should not be dangling that should never happen . Even if the client of that code is not doing what is expected that should not crash this way Comment : By the way great game this Max Power Adventures . I m a big fan Comment : New one in the works .. . old style funny and will have a PVP capability . Regarding selectedItem i agree with your diagnostic . This is why i would subclass CCMenu to implement a menu that accepts vanishing items : encapsulate the proper handling of such details and protect the UI api client .", "Question : Have been working on a Tower Defense game for iOS for some time now . I am using Cocos2d v0.99.5 not to sure . Recently started to get into some problems when I started remove sprites . Have profiles using instruments and Zombies and here s what I get : .. . .. . Zombie trace http : i.stack.imgur.com g6OUq.png The code for updating the sprites and also delete them is located in update : .. . .. . The remove method in GameSprite.m : .. . .. . The first block updates the sprites in the SpriteBatchNode textureAtlas . The three remaining blocks checks the different objects if the should be deleted . their alive-variable set to NO . The reason I have three blocks of different types is due to the fact that projectiles have weak reference to creep they are shooting at and needs to be deleted before the creep . So my problem is that it randomly crashes when a projectile hits a creep and the projetile and all other projectiles shooting at that creep are to be removed . The creeps reference count gets down to 0 but seems to still be in the childs array . Cause the error I get is : .. . .. . on the row I marked with .. . .. . Either the problem is with me understanding Cocos2d s removeFromParentAndCleanUP : or that my solution for handling the projectile-creep-relationship is bad from a memory point of view . Any ideas on how to solve this or debug it further .. . Answer : Your fast-enumeration techniques for going through the array are casting all your sprites in that array as a custom subclass of CCSprite then checking to see if they are instead a different custom subclass like Tower etc . I don t see this as healthy programming practice since methods in one class may not be in the other yet you are casting them nonetheless . That may or may not be contributing to your issue but a wiser approach is to keep an assign iVar CCArray for children of a specific class . i.e . put all your projectiles into one array at the time they are created and added to the batch node then you can iterate through all projectiles towers etc by going through those individual arrays where you know what kind of class they already are . Then remove them from the array as well as from the parent when necessary . I would think this is quite a bit safer than going through all the game s sprites in their entirety that are in your batchnode which may include spites not being used perhaps and casting them and testing them as different classes . Comment : Thanks . Solved it by creating three new arrays and enumerating through them instead . Was hoping to skip this but it seems that iterating through the children of textureAtlas is not a safe way to do it . Comment : That s great to hear it worked out using the safer techniques . It really is the right approach .", "Question : this program crashes if i uncomment the release statements . i get that i am overreleasing and realized that quickly . but just to test zombies i turned them on NSZombiesEnabled YES and CFZombieLevel 16 and the program runs fine and throws no exceptions . what gives i thought turning on zombies would have just told me what a doofus i am...not fix it . Comment : Why don t you change id sender to NSButton sender in - IBAction countCharacters : That way you won t have to check . Unless this is not only called through the GUI . Comment : @zneak that doesn t make sense . An action method is always - IBAction selector : id sender . And whether or not you check is entirely orthogonal to how target action works . Comment : @bbum It does make sense . Explicitly telling what kind of object you expect to send the action makes it impossible in Interface Builder to assign the action to any other type of object . Which is obviously what he wants . I just double-checked in case I did say something utterly stupid and it behaves exactly the way I describe it . Comment : Yup . You are correct . My mistake . .. . Answer : It s because you do not own the objects you try to release you don t hold a reference to them . Their ownership is given to the nearest NSAutoreleasePool . You can read about object ownership here http : developer.apple.com mac library documentation Cocoa Conceptual MemoryMgmt Articles mmObjectOwnership.html . As a quick reference usually you aren t the owner if you didn t call the alloc method yourself to create the object or if you didn t retain it . Retain ing an object makes you an owner calling release means you give up ownership and will deallocate the object if it has no more owners . You must not release objects for which you don t have ownership . Your current code without release is exactly what you need . Comment : Exactly correct . In other words if you were to uncomment the commented lines then run Zombies the zombie logging mechanism would trigger . Comment : thank you that makes sense . i knew i shouldn t release them but it didn t click as to why not . Comment : @bbum but they didn t...that was the point of the question Comment : If it isn t triggering and you know the autorelease poole is being drained please file a bug .", "Question : How can I enable NSZombiesEnabled in XCode4 I used to use this argument to debug EXC BAD ACCESS in XCode3 . Not sure where to do it in XCode4 . .. . Answer : 1 . Go to Executables of your application Shown left side of your window .. . 2 . Expand it and double click on your application . 3 . Select Argument tab and insert NSZombiesEnabled and set its value to TRUE . In second section .. . .. . Here is the example too.. . Set NSZombiesEnabled http : 42games.net quick-note-on-setting-nszombieenabled-environment-variable-in-xcode-4 Comment : Xcode 4.1 has a checkbox in the scheme editor to enable zombie objects . Select the Run step in the scheme editor and click the Diagnostics button at the top of the editor . Comment : Which one is zombies I see Scribble Guard Edges Guard Malloc etc . Comment : The checkbox says Enable Zombie Objects . This checkbox was added in Xcode 4.1 . If you re using Xcode 4.0 you must manually set the environment variable as iApple explained .", "Question : I have some crushes in iOS application . After investigation I found that problem is some dangling-pointer . To find where where it came from I ve started profiling code on simulator iOS 6.1 using Zombies trace template . Test scenario is quite simple : select some item on table then move to next controller by invoking proper sway by its name then press back button . Crush appears when back animation is finished . Here is table form profiler with data for released zombie object I removed uninteresting columns like : Category - always equal CALayer timestamp : .. . .. . Now this table doesn t point anywhere to my code all entries are related to system libraries : UIKit or QuartzCore . So I can t show my code since I have no idea which part is wrong and there is a lot of it . When I ve try review change history the only significant changes in first commit with this problem are those made in storyboard . This is strange since changes in storyboard should not have such problems . I can t say what exactly was changed storyboard XML is very hard to read . Any proposal how can I locate fix this issue Or maybe someone had similar problem Comment : Have you some code in your viewDidAppear method Comment : viewDidAppear in table controller contains only logs nothing else except for super viewDidAppear : animated of course . Comment : in the other controller I don t have viewDidAppear or viewDidDisappear Comment : Sometimes if you have used copy and paste within a storyboard an IBOutlet might still be connected to the wrong controller . Comment : I did use copy-paste so I reviewed all connections in both controllers and everything looks fine . Maybe I will create this views from the beginning . .. . Answer : Finally I have found the problem . Problem was caused by incorrect merge and for some IBOutlet property release method was called twice on controllers deallocation . Those calls were separated by other release calls for other properties so it was easy to miss . Problem is in production code but didn t appeared earlier since it was in root view controller so it lived as long as application . I ve inherited such wonderful code .. . .. . Now I have new UI spec and change order of controllers and problematic controller is no longer first in the view controllers stack so it is getting deallocated and bug started to manifest it self . I ve wasted two work days to find this : . Thanks you to : Jeffery Thomas and Bernd Rabe your feed back let me find the problem . Funny that XCode tool : Product Analyze didn t detect this . Definitely it should . Also Profiler when tracking zombies should complain about object which is root of problem now it complains about child of problematic object . Simply zombie exception should be risen before dealloc was called not after .", "Question : null .. . Answer : I have a UITextField that I am presenting inside a modal-dialog . Upon touching the UITextField the ABPeoplePicker contact selector is presented also modally . If I then dismiss the ABPeoplePicker AND the originally presented modal-dialog THEN put the app in the background I get an EXC BAD ACCESS crash upon application resume . Using zombies : .. . .. . I am not doing anything too fancy here . I simply bind a couple of my ViewController methods to the UITextField s Editing Did Begin and Editing Did End events in the storyboard in order to present and dismiss the ABPeoplePicker : .. . .. . Upon selecting a contact the following happens ABPeoplePickerNavigationControllerDelegate : .. . .. . and finally : .. . .. . Interestingly the crash only happens in iOS 6 . iOS 5 works just fine . Is there something Notification-related that is internal to iOS that is somehow trying to message my UITextField Some potential clean-up task I am missing I am using the same technique elsewhere without issue and it is really confusing me . I even tried moving the original text field to a push style presentation instead of modal to rule out any issues due to nested modally presented dialogs . Note that I am using ARC and the UITextField is declared as a weak reference in my ViewController . Any insights are much appreciated Thanks update .. . .. . Ok I found the problem but I don t understand why it is happening . I ve boiled the issue down to the call to sender resignFirstResponder in customerBeginEditing . For some reason this call is causing a call to NSNotificationCenter addObserver : selector : name : object : on app resume but only if the page with the UITextField is no longer being presented . I am able to fix my problem by reworking my code so as not have to call resignFirstResponder at all but I still don t understand what changed between iOS5 and iOS6 to cause this issue . Anyone have any ideas", "Question : I have some crushes in iOS application . After investigation I found that problem is some dangling-pointer . To find where where it came from I ve started profiling code on simulator iOS 6.1 using Zombies trace template . Test scenario is quite simple : select some item on table then move to next controller by invoking proper sway by its name then press back button . Crush appears when back animation is finished . Here is table form profiler with data for released zombie object I removed uninteresting columns like : Category - always equal CALayer timestamp : .. . .. . Now this table doesn t point anywhere to my code all entries are related to system libraries : UIKit or QuartzCore . So I can t show my code since I have no idea which part is wrong and there is a lot of it . When I ve try review change history the only significant changes in first commit with this problem are those made in storyboard . This is strange since changes in storyboard should not have such problems . I can t say what exactly was changed storyboard XML is very hard to read . Any proposal how can I locate fix this issue Or maybe someone had similar problem Comment : Have you some code in your viewDidAppear method Comment : viewDidAppear in table controller contains only logs nothing else except for super viewDidAppear : animated of course . Comment : in the other controller I don t have viewDidAppear or viewDidDisappear Comment : Sometimes if you have used copy and paste within a storyboard an IBOutlet might still be connected to the wrong controller . Comment : I did use copy-paste so I reviewed all connections in both controllers and everything looks fine . Maybe I will create this views from the beginning . .. . Answer : I am very suspicious of : .. . .. . What are the call stacks for these calls In the past I ve had issues caused by improperly releasing properties in -dealloc . Just to be sure I seal pointers after releasing them in -dealloc . Comment : it is hard to tell what is the call stack for those entries . I did find any option in profiler to get this information . Comment : @MarekR When you have the row highlighted you can show the Extended Detail view which is the right-most side of the view segmented control . The Extended Detail has the call stack . Comment : thanks I m still getting familiar with XCode tools . Surprise is that when I review call stack for all entries it doesn t allow to locate source of problem .", "Question : null .. . Answer : I have a situation where I have copied a string in an instance of a helper class retained it and later released it during the dealloc of the view controller instance that alloc d the helper class . This results in the dreaded EXC BAD ACCESS . I then went to Instruments to debug zombies . This gave me the following error : .. . .. . An Objective-C message was sent to a deallocated CFString immutable object zombie at address : blah blah .. . .. . When I then look at the allocation summary within Instruments and work backwards from the zombie detection the first time my code is listed is in the deallocation of the helper class instance . Here is what the helper class looks like . First the .h file : .. . .. . Then the .m file : .. . .. . Now relevant code from the view controller that uses the helper class looks like the following . In the .h file I have an array that will hold multiple objects of the helper class as follows : .. . .. . Then in the .m code I synthesize channelTitles . I also have a dealloc method as follows : .. . .. . Finally I alloc object instances of the helper class and store them in channelTitles with strings stored in the channelTitle elements of channelButtonTitles as follows : .. . .. . So this is a technique I have used many times before but seems to not be happy now . When the view controller is popped and I return to the root view controller the dealloc method in my view controller is called . That releases channelTitles which results in calling dealloc on the channelButtonTitles helper class objects that are stored in channelTitles . Since I have used copy in the property of my helper class I assume I own this string . Hence I am releasing it . If I comment out the channelTitle release line from my dealloc the EXC BAD ACCESS goes away but I suspect I have a memory leak now . Please help me see what I am doing wrong . Comment : why are you not using arc not a flip question I had to support down to 10.5 recently but i you can convert your stuff to arc properties it will make your life easier Comment : Did you try using the Static Analyzer It is really good at catching this sort of thing . Comment : @GradyPlayer This is an old app that started before arc . I just have been afraid to try to convert it . Have you ever converted a large software app to arc If so what was your experience Comment : @matt yes that was the first thing I tried . It did not see a problem with this . Comment : You need to look for places where you modify the channelTitle instance variable directly without going through the setter . One thing to try would be to refactor to rename that instance variable to channelTitle which will make it easier to find such places . Also make sure that nothing obtains the reference via the property getter and then releases it . For example NSString temp whatever.channelTitle .. . temp release . Or perhaps another class has an assign property that it releases in its -dealloc and it gets assigned from whatever.channelTitle .", "Question : I have a major issue that I am stuck with at work and would REALLY appreciate some help on . This has cost me 2 days already . What I am trying to do is have a special image class fire it s assigned callback when it s touched . Thats it . But when I touch the image it crashes often without an error message just lldb . Sometimes it says garbage like NSCFData tapped : : unrecognized-selector sent to instance 0x1780af360 . Sometimes it says message sent to deallocated object . I can run the app 10 times in a row and get one of these random messages just from tapping the same object on the screen each time . The code is very simple : .. . .. . And here is the code inside K PreviewImage my clickable image . This does NOT inherit from anything including NSObject .. . .. . The above code causes a crash 100 of the time . If I add @objc too the tap event-listener in the K PreviewImage like this .. . .. . Then the code WORKS and the touch-event is fired both inside K PreviewImage and the controllers callback function nestedTap . Not sure why that works but it does . However I m still up a creek without a paddle because when I make the K PreviewImage a function variable instead of a class member variable I get a crash again .. . .. . So my first question is why did I need to add @objc to get the callback to fire instead of giving me an unclear deallocated memory crash My second question is why is it when I moved the variable from a member variable to a function variable does it cause the crash all over again . If the object was deallocated it couldnt hear the tap event in the first place could it Why would it still be on screen And why is it getting dealloacted just because it s not a member variable How the heck can I create a custom object dynamically and have it fire click events UPDATE .. . .. . Here is the full code block involving how my K PreviewImage was being added with a touch-event .. . .. . Solved : .. . .. . Because I was not storing a reference to the K PreviewImage k even though the subview was added even though it belongs-to k k was not being retained . By making the array store a reference to K PreviewImage instead of iImage the compiler now retains a reference to the K Preview Image .. . Answer : First off it looks like you re trying to add an image as a subview . I don t know Swift all that well but view.addSubview k.image looks wrong to me and would make more sense as view.addSubview k . Secondly you re not keeping your reference to your K PreviewImage . You are assigning k.image as the subview which causes k to be detected as no longer used by the system . It will clean it up and when you try to access it you ll crash . Comment : First off thanks for taking the time to review this and give a thoughtful response . Regarding the system detecting K as no longer user why is that I am storing K inside of an array which is a member variable . By adding I.image why does the system remove the parent and keep the child image is a member variable of K It wasnt shown in this example but I do store K in an array after adding it to the view with array.append K Comment : Can you update your source to reflect the correct scope of k Because you re getting an error that states NSCFData tapped : is trying to be accessed it looks a lot like the object you re expecting is not the object you have -- indicating that the memory was released back to the system and an NSData object appeared in its place . Comment : Brilliant thanks to you I figured it out . I was storing the iImage class in the array reference but that apparently does NOT retain the object that is a part of i.e . the K PreviewImage but making the array and array of K PreviewImages the variable is retained properly now . THANK YOU THANK YOU THANK YOU I was stuck on this for days and resorted to passing data in with a sub class UIGestureTapEvent Now I can have clean code again", "Question : I am experimenting an EXC BAD ACCESS error that I can not solve so here I am introducing it to you hoping to get some help : .. . .. . Normally I use to solve this kind of errors using instruments-zombies but this time it doesn t seem that easy.. . .. . .. . As you can see in the attached image it looks like I have no interaction with this object it s only retained released by UIKit and QuartzCore so I don t know where to look or what to do to solve it . Any hint Thanks Image URL : http : i.stack.imgur.com 6R7f0.png enter image description here http : i.stack.imgur.com 6R7f0.png Comment : Not enough information to be able to say what the problem is other than you ve got a deallocated object that is still being referenced . Check that you have strong pointers to objects that you don t want to be deallocated . Comment : Yes that s what I have checked the first but the project is very very big and it s easy to forget something.. . Using instruments I expected to see which of my methods did release the object but it s never done by me that s why I feel so confused Thank you Comment : Are you using multiple threads Comment : Yes I am . The application uses multiple threads for a lot of things but I can t know if the error is happening in the main thread or not right Well actually I can suppose it s the main thread because it s something related with uikit which always runs in the main thread I guess . Comment : At which code or action doing you are getting this error You need to specify that atleast and provide which code leads to this error. . .. . Answer : Since you are saying you are using multi threading I m pretty sure that this is your problem : .. . .. . UIKit although advertised as thread safe since iOS4 is not entirely thread safe . It does internal calls to UIStringDrawing which is not thread safe and you end up with those crashes . Look here : UIStringDrawing methods don t seem to be thread safe in iOS 6 http : stackoverflow.com questions 12744558 uistringdrawing-methods-dont-seem-to-be-thread-safe-in-ios-6 .. . .. . Try drawing your text in CATextLayer instead Comment : +1 my guess as well Comment : This may be related with my problem but it doesn t help me very much right now.. . I need to find where the problem occurs so then I will use your solution . But first I need to find the part of my code that makes it crash and I just don t know where to look at . Thank you very much anyway Comment : If you add an exception breakpoint in Xcode to break in all exceptions and run the app it should stop on the crash point", "Question : this program crashes if i uncomment the release statements . i get that i am overreleasing and realized that quickly . but just to test zombies i turned them on NSZombiesEnabled YES and CFZombieLevel 16 and the program runs fine and throws no exceptions . what gives i thought turning on zombies would have just told me what a doofus i am...not fix it . Comment : Why don t you change id sender to NSButton sender in - IBAction countCharacters : That way you won t have to check . Unless this is not only called through the GUI . Comment : @zneak that doesn t make sense . An action method is always - IBAction selector : id sender . And whether or not you check is entirely orthogonal to how target action works . Comment : @bbum It does make sense . Explicitly telling what kind of object you expect to send the action makes it impossible in Interface Builder to assign the action to any other type of object . Which is obviously what he wants . I just double-checked in case I did say something utterly stupid and it behaves exactly the way I describe it . Comment : Yup . You are correct . My mistake . .. . Answer : Well zombies will tell you when a free d object receives a release correct So if your not sending the release you commented it out you won t see the zombies complaining Your NSString NSNumber methods are all convenience-methods and you don t have to release them . So -yeah You solved the problem yourself .", "Question : I want to make my image a cover background but it doesn t work for me . Here s my code : Comment : Well first step of having an image as a background is setting it as background : url .. . https : developer.mozilla.org en-US docs Web CSS background not using an img element . Also guessing from the name a 32x32 icon will look bad on any of today s screens . Except if you want a repeating image in which way you re looking for a bit different solution than cover image . .. . Answer : Try this : .. . .. . .. . h1 .. . .. . color : White .. . .. . .fullBack .. . .. . background-image : url http : www.willmaster.com images feed-icon32x32.png .. . background-size : cover .. . width : 100 .. . height : 100 .. . .. . .. . .. . div class fullBack .. . h1 some content here h1 .. . div .. . .. . using the background-size you can change the image-size in a page to cover the entire page . This https : css-tricks.com perfect-full-page-background-image is a good tutorial to learn how to use that attribute wisely if you wish for a cover background-image . EDIT - It s important to remember that background-size is a css3 trait - so use it with caution as it might not work well with old browsers . Comment : Might want to mention that background-size : cover is an IE9+ feature https : developer.mozilla.org en-US docs Web CSS background-size Browser compatibility . Comment : @MarkoGre ak Editted thank you :" ] }
[ "yes-answer-long", "yes-answer-short" ]
osx
UNK_RELATION
vfw@video@126
vfw -- video for windows vfw is a legacy api in microsoft windows to provide functions that enable an application to process @placeholder data .
{ "confidence": [ 58.83427810668945, 44.62342071533203, 43.988548278808594, 43.00442123413086, 40.950233459472656, 40.655059814453125, 40.655059814453125, 37.77573776245117, 35.840667724609375, 35.840667724609375, 35.840667724609375, 34.477294921875, 32.961341857910156, 32.961341857910156, 32.961341857910156, 32.89414978027344, 31.293785095214844, 30.925992965698242, 30.888870239257812, 29.227903366088867, 28.447845458984375, 26.71462631225586, 26.157752990722656, 25.9813175201416, 24.591123580932617, 23.79749298095703, 20.436656951904297, 20.18836212158203, 19.949615478515625, 19.582351684570312, 19.582351684570312, 19.535011291503906, 19.362442016601562, 18.693099975585938, 17.708959579467773, 16.483116149902344, 16.483116149902344, 16.483116149902344, 16.38332748413086, 15.98770523071289, 15.572011947631836, 15.370606422424316, 14.732464790344238, 14.689726829528809, 13.722358703613281, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 12.963476181030273, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371, 10.084151268005371 ], "content": [ "Does the VFW Video For Windows API support Alpha Channel Transparency", "VFW works in 64 bit Windows just the same as it ever did on 32-bit Windows .", "But why the VFW works not like it supposed to", "VfW works in x64 machines but only if your process is x86 .", "VFW is API from times when getting frame at all was a success and there were no implicit software conversion magic in video capture that you did not do yourself .", "Does it mean that VFW has less abilities than DirectShow", "VFW has apparently way less abilities than DirectShow .", "I suppose that might be something wrong with VFW input audio signal feeder .", "How to add other codecs to the dialog window and how to make it activated from VFW", "Pls tell me more about camera - driver - vfw COM Graph builder principles .", "I think VFW has kind of intellect to understand my need and looks through installed codecs for proper conversion .", "If you wish to use DirectX API instead of deprecated Video For Windows VFW API : http : www.delphibasics.info home delphibasicsprojects directxdelphiwebcamcaptureexample .. . .. . Here is a link-to a larger project implementing the code detailed below : http : www.delphibasics.info home delphibasicssnippets delphiwebcamcaptureexample .. . .. . Interchange lines indicated by comment notation as you wish .", "And with VFW you can organize it very comfortable using WM CAP GET SEQUENCE SETUP message and CAPTUREPARAMS structure .", "Anybody know if VFW support has been dropped from the 64-bit OSes or could it be something else", "Anybody know if VFW support has been dropped from the 64-bit OSes", "Hi Roman then WM CAP SET VIDEOFORMAT message doesn t ask VFW to try to find the proper codec to convert from device specific format to user specific right", "I m capturing audiodata from Webcam using VFW and on audio capture Callback and at the same time inside the body of the same capture Callback direct the sampled data to default MAPPER using waveOutWrite .", "When I call dlg window with video formats list from VFW WM CAP GET VIDEOFORMAT then I have 2 positions only one of those - MJPG Motion JPG when selected as a result makes video capture as black screen what means - it doesn t work but selectable .", "Even it accepted the WAVEFORMATEX and sent back WAVEHDR they re both ok.. . but the buffer data is populated with some other source not the webcam though VFW says it must be from Webcam cause video is capturing from the same source and it s working I just added one extramessage : SendMessage camHwnd WM CAP SET CALLBACK WAVESTREAM 0 audioCallback I m pretty much sure if I ll use waveIn instead of VFW it will work ok. .", "I m using Video for Windows to record screen grabs to AVI files .", "I wrote a program that relies on Video For Windows .", "The actual program starts up fine the GUI appears the File Open dialog works fine but the VFW library is saying it cannot open some generic AVI files that use several different codecs .", "Below is the audio dta reciever code from VFW and lpWHdr comes visually Ok even internal flag triggered to 2 Prepared. . seems like VFW and WaveAudio are created to each other : .. . .. . I think the buffer is not overrun because you can see the DateTime milliseconds stamp and it ticks every 1400 milliseconds and sample rate 11025 and the buffer size is about 16500 bytes looks like Ok. . .. . .. . UPD : I just copied unmanaged buffer into managed and looked through its values .", "ICM Microsoft Video 1 MSVC msvidc32.dll 6.1.7601.17514 .. . 3 .", "This does not include software codecs available that can process convert the video feed .", "install of Windows .", "ICM Microsoft YUV UYVY msyuv.dll 6.1.7601.17514 .. . 4 .", "These are the video formats your Web can output", "You need the 64-bit versions on a 64-bit version of Windows .", "ICM Microsoft RLE MRLE msrle32.dll 6.1.7601.17514 .. . 2 .", "How can I add say ICM Microsoft RLE codec", "If your process has to be x64 and you have to access x86 codecs then the only way to do it is to have a multiprocess architecture with a child-process doing the file read and passing the data to the x64 parent via named-pipes .", "The window shows encodings in which the camera itself can be set to deliver video .", "Do not try getting data and waveOuit them locally .", "Your goal is to collect audio data to record or send through Network .", "The simulator works I can see the video using Skype but not with the test app .", "I want to be able to export video with Alpha channel information .", "The actual video streams inside of it require the appropriate codec to be installed .", "1 We should use Asynchronous mechanizm of getting and sending packs of audio data to the playback end .", "An x64 process will only be able to open x64 codecs .", "Sometimes latency value of your speaker is bit higher than speed of sampling mic data and you ll get messy with buffers as it took place with me .", "Of course finding a video compression format that fits all your needs and supports alpha channel is another problem .", "Also I can record the signal from that cam using internal Windows recorder and I can see like signal level jumps up and down on my voice up and down so the mic of the webcam is Ok also. .", "Now when I execute the SendMessage FCapHandle WM CAP DRIVER CONNECT 0 0 a dialog pops up asking me to select the video capture source .", "My bet is that your application is installing and relying upon the 32-bit versions of the appropriate codecs for playing AVI files .", "YUY2 works ok and I know how to manage it .", "DLG GET VIDEOFORMAT http : i.stack.imgur.com 7egzH.png .. . .. . From other side if I see the list of all installed codecs it has much more than just MJPG and YUY2 .. . .. . 1 .", "ICM Intel IYUV IYUV iyuv 32.dll 6.1.7601.17514 ICM Toshiba .. . 5 .", "ICM YUV Codec Y411 tsbyuv.dll 6.1.7601.17514 .. . 6 .", "ICM Cinepak made by Radius cvid iccvid.dll 1.10.0.13 .. . .. . .. . .. . ICM Image Color Management and there is RLE - bitmap compression of 8 bits .", "And others .", "But the dialog shows only 2 and MJPG is not workable .", "How does it work", "I tried SET VIDEOFORMAT vainly. . only one - YUY2 is accepted and could be set .", "That list does not contain your installed codes .", "This is related neither to directshow http : stackoverflow.com questions tagged directshow nor to c http : stackoverflow.com questions tagged c 23", "MJPG might not work blackness because of faulty driver or because the picture is lost in further processing steps decoder is unable to decode it for whatever reason .", "The other codecs you discovered work separately from the camera source you can use them in code to do the conversion or encoding .", "You might need to deal with pixel format encoding fitting : the camera gives YUY2 and not every encoder would accept it directly it might need something else e.g .", "RGB .", "You are dealing with camera only it does not do any conversions .", "Usually it works fine but some users report the error : .. . .. . AVI error 80044066 : Bad format .. . .. . Any explanations of what this error means and what might be causing it would be gratefully accepted .", "Is it possible that some machines have the right codec installed but others do not", "I need to get a regular snapshot from a webcam in Delphi .", "Speed is not a problem once a second is fine .", "I have tried demo code from based on stuff from http : delphi.pjh2.de http : delphi.pjh2.de but I can t get it to work .", "It compiles and runs OK but the callback function never fires .", "I don t have a real webcam but am running instead a simulator .", "I don t really know where to start looking.. . .. . .. . Can anyone be bothered to try this code", "Apologies for the voluminous post - couldn t find how or if you can attach files - a zip file is available here http : docs.google.com uc id 0Bz3Kt0tCTCQ3YzYzOWVlNjctYTk5Zi00MmVjLTgxNWEtMTMyMTA3YWUzODU1 export download hl en .", "Alternatively any webcam demo code would be appreciated preferably with a known good EXE as well as source .", "Some message results :", "Are any of the WM CAP.. . messages returning errors", "Hi Remy see my edits to the question - message results are comments out to the right .", "Thanks .", "R .", "Your program works for me on Win7 32bits with D2010 .", "What it does though is raising an exception : .. . .. . which can be corrected by changing .. . .. . to .. . .. . And also it does not display the whole available image you d have to enlarge your Panel recenter or shrink the webcam output .", "Update with some code modifications that would make it work per your comments.. .", "On my system the message results I get are : WM CAP DRIVER CONNECTMsgResult false WM CAP SET PREVIEWRATEMsgResult true WM CAP SET OVERLAYMsgResult false WM CAP SET PREVIEWMsgResult false WM CAP SET CALLBACK FRAMEMsgResult true WM CAP GRAB FRAME NOSTOPMsgResult false and FrameCallbackFunction never fires .", "It looks as-if it is failing to connect .", "Clearly you cannot connect to the webcam .", "Have you tried with a capture driver other than 0", "It can be from 0 to 9 .", "Maybe you have more than 1 and the webcam is not the index 0", "MsgResult : SendMessage FCapHandle WM CAP DRIVER CONNECT x 0", "Thanks Fran ois .", "At present I don t have any webcams - just a simulator .", "The simulator seems to go in that Skype can see the camera OK .", "I tried calling SendMessage FCapHandle WM CAP DRIVER CONNECT x 0 with x 0 through 9 and they all returned false .", "Incidentally - how were you able to format the text as code in the comment", "Update - I installed a real webcam .", "The drop-down only has one entry in it - for the Logitech webcam .", "When I select this however I still get the same failure result false from SendMessage FCapHandle WM CAP DRIVER CONNECT 0 0 .", "Hey Fran ois I am tantalizingly close .", "With a real webcam connected I can get 1 second snapshots displaying on the panel .", "Problem is I need programmatic access to the image .", "The JPEG file saved is all black .", "I have tried several other variants of the example code off the web and they all work but the jpeg is blank ." ] }
{ "confidence": [ 65.39385986328125, 65.1976089477539, 63.4449462890625, 58.16400146484375, 53.04103088378906, 41.67233657836914, 25.71755599975586, 14.211991310119629, 13.758559226989746 ], "content": [ "Question : I wrote a program that relies on Video For Windows . It worked fine under XP Vista 32-bit OSes but now I am trying to run it on the newer 64-bit OSes it isn t able to open any AVI files . The actual program starts up fine the GUI appears the File Open dialog works fine but the VFW library is saying it cannot open some generic AVI files that use several different codecs . Anybody know if VFW support has been dropped from the 64-bit OSes or could it be something else Thanks . Comment : My bet is that your application is installing and relying upon the 32-bit versions of the appropriate codecs for playing AVI files . You need the 64-bit versions on a 64-bit version of Windows . Comment : AVI is a container format . The actual video streams inside of it require the appropriate codec to be installed . Which you obviously don t have available in a 64-bit version or on this new install of Windows . .. . Answer : Anybody know if VFW support has been dropped from the 64-bit OSes VFW works in 64 bit Windows just the same as it ever did on 32-bit Windows . You probably don t have the codecs installed but that s just a guess because you didn t give any details of error messages .", "Question : When I call dlg window with video formats list from VFW WM CAP GET VIDEOFORMAT then I have 2 positions only one of those - MJPG Motion JPG when selected as a result makes video capture as black screen what means - it doesn t work but selectable . YUY2 works ok and I know how to manage it . DLG GET VIDEOFORMAT http : i.stack.imgur.com 7egzH.png .. . .. . From other side if I see the list of all installed codecs it has much more than just MJPG and YUY2 .. . .. . 1 . ICM Microsoft RLE MRLE msrle32.dll 6.1.7601.17514 .. . 2 . ICM Microsoft Video 1 MSVC msvidc32.dll 6.1.7601.17514 .. . 3 . ICM Microsoft YUV UYVY msyuv.dll 6.1.7601.17514 .. . 4 . ICM Intel IYUV IYUV iyuv 32.dll 6.1.7601.17514 ICM Toshiba .. . 5 . ICM YUV Codec Y411 tsbyuv.dll 6.1.7601.17514 .. . 6 . ICM Cinepak made by Radius cvid iccvid.dll 1.10.0.13 .. . .. . .. . .. . ICM Image Color Management and there is RLE - bitmap compression of 8 bits . And others . But the dialog shows only 2 and MJPG is not workable . How does it work How to add other codecs to the dialog window and how to make it activated from VFW I tried SET VIDEOFORMAT vainly. . only one - YUY2 is accepted and could be set . Pls tell me more about camera - driver - vfw COM Graph builder principles . How can I add say ICM Microsoft RLE codec Comment : That list does not contain your installed codes . These are the video formats your Web can output Comment : This is related neither to directshow http : stackoverflow.com questions tagged directshow nor to c http : stackoverflow.com questions tagged c 23 .. . Answer : The window shows encodings in which the camera itself can be set to deliver video . This does not include software codecs available that can process convert the video feed . MJPG might not work blackness because of faulty driver or because the picture is lost in further processing steps decoder is unable to decode it for whatever reason . The other codecs you discovered work separately from the camera source you can use them in code to do the conversion or encoding . You might need to deal with pixel format encoding fitting : the camera gives YUY2 and not every encoder would accept it directly it might need something else e.g . RGB . Comment : Hi Roman then WM CAP SET VIDEOFORMAT message doesn t ask VFW to try to find the proper codec to convert from device specific format to user specific right Does it mean that VFW has less abilities than DirectShow I think VFW has kind of intellect to understand my need and looks through installed codecs for proper conversion . Comment : You are dealing with camera only it does not do any conversions . VFW is API from times when getting frame at all was a success and there were no implicit software conversion magic in video capture that you did not do yourself . VFW has apparently way less abilities than DirectShow .", "Question : I wrote a program that relies on Video For Windows . It worked fine under XP Vista 32-bit OSes but now I am trying to run it on the newer 64-bit OSes it isn t able to open any AVI files . The actual program starts up fine the GUI appears the File Open dialog works fine but the VFW library is saying it cannot open some generic AVI files that use several different codecs . Anybody know if VFW support has been dropped from the 64-bit OSes or could it be something else Thanks . Comment : My bet is that your application is installing and relying upon the 32-bit versions of the appropriate codecs for playing AVI files . You need the 64-bit versions on a 64-bit version of Windows . Comment : AVI is a container format . The actual video streams inside of it require the appropriate codec to be installed . Which you obviously don t have available in a 64-bit version or on this new install of Windows . .. . Answer : VfW works in x64 machines but only if your process is x86 . An x64 process will only be able to open x64 codecs . x64 codecs do exist but they are rare and need to be installed . If your process has to be x64 and you have to access x86 codecs then the only way to do it is to have a multiprocess architecture with a child-process doing the file read and passing the data to the x64 parent via named-pipes .", "Question : Does the VFW Video For Windows API support Alpha Channel Transparency I want to be able to export video with Alpha channel information . How can I do this in VC6 .. . Answer : I m pretty sure it does just set the pixel format to RGB32 which should give you an alpha channel to use . Of course finding a video compression format that fits all your needs and supports alpha channel is another problem .", "Question : I m capturing audiodata from Webcam using VFW and on audio capture Callback and at the same time inside the body of the same capture Callback direct the sampled data to default MAPPER using waveOutWrite . Signal quality from Webcam is 1 channel 8 bits 11025 samples sec . The sound format is supported by default audio device thanks to waveOpen with FORMAT QUERY flag . The return of waveWriteOut is NOERROR but what I can hear is far from my expectations . In the room is quiet and it should be sound like white noise of emptiness . Pls listen the sound YouTube rec https : youtu.be jJddqQjq5gA .. . .. . It starts pack by pack sized about 16K WAVEHDR structure is ok . Then it slows down gradually and exits with system unrecovered error . What is that similar to Below is the audio dta reciever code from VFW and lpWHdr comes visually Ok even internal flag triggered to 2 Prepared. . seems like VFW and WaveAudio are created to each other : .. . .. . I think the buffer is not overrun because you can see the DateTime milliseconds stamp and it ticks every 1400 milliseconds and sample rate 11025 and the buffer size is about 16500 bytes looks like Ok. . .. . .. . UPD : I just copied unmanaged buffer into managed and looked through its values . Looks like saw teeth or even overloaded sinus . 0 4 0 3 0 32 109 213 255 251 255 243 241 97 0 7 0 2 1 1 0 5 0 and then again up and down in about the same numbers and the same period . Not exactly about the same + - . Also I can record the signal from that cam using internal Windows recorder and I can see like signal level jumps up and down on my voice up and down so the mic of the webcam is Ok also. . I suppose that might be something wrong with VFW input audio signal feeder . Even it accepted the WAVEFORMATEX and sent back WAVEHDR they re both ok.. . but the buffer data is populated with some other source not the webcam though VFW says it must be from Webcam cause video is capturing from the same source and it s working I just added one extramessage : SendMessage camHwnd WM CAP SET CALLBACK WAVESTREAM 0 audioCallback I m pretty much sure if I ll use waveIn instead of VFW it will work ok. . I ll check it later on. . But why the VFW works not like it supposed to Comment : It s possibly a feedback loop . Also given that you are recording from the web and feeding a D A converter and both are not necessarily running at the same rate how do you know you are not having buffer overruns or underruns Comment : Pls see the additional UPD .. . Answer : The problem was very simple - that was USB hardware failure . I needed to unplug USB Camera and plug in again . But anyways I d like to share my knowledge about that . 1 We should use Asynchronous mechanizm of getting and sending packs of audio data to the playback end . Until the first buffer has played back we have to avoid sending new buffer to playback . The method is called - double or even tripple buffering . And with VFW you can organize it very comfortable using WM CAP GET SEQUENCE SETUP message and CAPTUREPARAMS structure . The wNumAudioRequested parameter is used to setup how many different buffers will be cyclically used to send audiodata to your audioCallback . It s set to 10 by default more than enough . 2 The best way to check out if your audio signal is the valid signal is : in your WAVESTREAM Callback do Marshaling of bytes from received buffer with audiodata into managed static array of bytes . Then inside the callback do output of 50-100 sample values with Console.Write array i + and see if the values re changing on your voice up and down . Take into account that the Zero level is at the middle of WAVEFORMATEX- wBitsPerSample value and in my case 8 bits sample the values are 125 126 127 128 129 . It s accepted as silence and no signal or Zero-noise . Once you sure you have correct audiodata now you can go further to your goal . 3 Remember when you re on recording from mic mode the local output wave device better to be closed . Your goal is to collect audio data to record or send through Network . Do not try getting data and waveOuit them locally . Sometimes latency value of your speaker is bit higher than speed of sampling mic data and you ll get messy with buffers as it took place with me . Then I just followed the principle - recording is when you collect save or send audiodata and it should be played back after recording or at the same time but on the endpoint PC . 4 To be continued with code", "Question : I need to get a regular snapshot from a webcam in Delphi . Speed is not a problem once a second is fine . I have tried demo code from based on stuff from http : delphi.pjh2.de http : delphi.pjh2.de but I can t get it to work . It compiles and runs OK but the callback function never fires . I don t have a real webcam but am running instead a simulator . The simulator works I can see the video using Skype but not with the test app . I don t really know where to start looking.. . .. . .. . Can anyone be bothered to try this code Apologies for the voluminous post - couldn t find how or if you can attach files - a zip file is available here http : docs.google.com uc id 0Bz3Kt0tCTCQ3YzYzOWVlNjctYTk5Zi00MmVjLTgxNWEtMTMyMTA3YWUzODU1 export download hl en . Alternatively any webcam demo code would be appreciated preferably with a known good EXE as well as source . Some message results : Comment : Are any of the WM CAP.. . messages returning errors Comment : Hi Remy see my edits to the question - message results are comments out to the right . Thanks . R . .. . Answer : If you wish to use DirectX API instead of deprecated Video For Windows VFW API : http : www.delphibasics.info home delphibasicsprojects directxdelphiwebcamcaptureexample .. . .. . Here is a link-to a larger project implementing the code detailed below : http : www.delphibasics.info home delphibasicssnippets delphiwebcamcaptureexample .. . .. . Interchange lines indicated by comment notation as you wish . Comment : Thanks Danny . Those links look like there is some good stuff there .", "Question : I m using Video for Windows to record screen grabs to AVI files . Usually it works fine but some users report the error : .. . .. . AVI error 80044066 : Bad format .. . .. . Any explanations of what this error means and what might be causing it would be gratefully accepted . .. . Answer : Is it possible that some machines have the right codec installed but others do not", "Question : I need to get a regular snapshot from a webcam in Delphi . Speed is not a problem once a second is fine . I have tried demo code from based on stuff from http : delphi.pjh2.de http : delphi.pjh2.de but I can t get it to work . It compiles and runs OK but the callback function never fires . I don t have a real webcam but am running instead a simulator . The simulator works I can see the video using Skype but not with the test app . I don t really know where to start looking.. . .. . .. . Can anyone be bothered to try this code Apologies for the voluminous post - couldn t find how or if you can attach files - a zip file is available here http : docs.google.com uc id 0Bz3Kt0tCTCQ3YzYzOWVlNjctYTk5Zi00MmVjLTgxNWEtMTMyMTA3YWUzODU1 export download hl en . Alternatively any webcam demo code would be appreciated preferably with a known good EXE as well as source . Some message results : Comment : Are any of the WM CAP.. . messages returning errors Comment : Hi Remy see my edits to the question - message results are comments out to the right . Thanks . R . .. . Answer : Your program works for me on Win7 32bits with D2010 . What it does though is raising an exception : .. . .. . which can be corrected by changing .. . .. . to .. . .. . And also it does not display the whole available image you d have to enlarge your Panel recenter or shrink the webcam output . Update with some code modifications that would make it work per your comments.. . Comment : On my system the message results I get are : WM CAP DRIVER CONNECTMsgResult false WM CAP SET PREVIEWRATEMsgResult true WM CAP SET OVERLAYMsgResult false WM CAP SET PREVIEWMsgResult false WM CAP SET CALLBACK FRAMEMsgResult true WM CAP GRAB FRAME NOSTOPMsgResult false and FrameCallbackFunction never fires . It looks as-if it is failing to connect . Comment : Clearly you cannot connect to the webcam . Have you tried with a capture driver other than 0 It can be from 0 to 9 . Maybe you have more than 1 and the webcam is not the index 0 MsgResult : SendMessage FCapHandle WM CAP DRIVER CONNECT x 0 Comment : Thanks Fran ois . At present I don t have any webcams - just a simulator . The simulator seems to go in that Skype can see the camera OK . I tried calling SendMessage FCapHandle WM CAP DRIVER CONNECT x 0 with x 0 through 9 and they all returned false . Incidentally - how were you able to format the text as code in the comment Comment : Update - I installed a real webcam . Now when I execute the SendMessage FCapHandle WM CAP DRIVER CONNECT 0 0 a dialog pops up asking me to select the video capture source . The drop-down only has one entry in it - for the Logitech webcam . When I select this however I still get the same failure result false from SendMessage FCapHandle WM CAP DRIVER CONNECT 0 0 . Comment : Hey Fran ois I am tantalizingly close . With a real webcam connected I can get 1 second snapshots displaying on the panel . Problem is I need programmatic access to the image . The JPEG file saved is all black . I have tried several other variants of the example code off the web and they all work but the jpeg is blank . Any ideas", "Question : I need to get a regular snapshot from a webcam in Delphi . Speed is not a problem once a second is fine . I have tried demo code from based on stuff from http : delphi.pjh2.de http : delphi.pjh2.de but I can t get it to work . It compiles and runs OK but the callback function never fires . I don t have a real webcam but am running instead a simulator . The simulator works I can see the video using Skype but not with the test app . I don t really know where to start looking.. . .. . .. . Can anyone be bothered to try this code Apologies for the voluminous post - couldn t find how or if you can attach files - a zip file is available here http : docs.google.com uc id 0Bz3Kt0tCTCQ3YzYzOWVlNjctYTk5Zi00MmVjLTgxNWEtMTMyMTA3YWUzODU1 export download hl en . Alternatively any webcam demo code would be appreciated preferably with a known good EXE as well as source . Some message results : Comment : Are any of the WM CAP.. . messages returning errors Comment : Hi Remy see my edits to the question - message results are comments out to the right . Thanks . R . .. . Answer : I use a component called TVideoCap . It is for 3 4 and 5 but it includes source so it is easy to update . It will do exactly what you want . Just do a search for TVideoCap . Comment : Thanks I ll check it out . Do you have any EXE that you have produced using this unit that you can give me that works - I just want to verify that there is nothing inherently wrong with my system . R Comment : Hi David I downloaded VideoCap and installed a real Webcam - my results are the same as in the previous answer above - now that I have a real webcam then I try to connect to a driver the dialog opens asking me to select the source but the connect fails anyway" ] }
[ "yes-answer-long", "yes-answer-short" ]
video
UNK_RELATION
graph-algorithm@graph-theory@111
graph-algorithm -- graph algorithms are a sequence of well-defined steps that will solve a problem related to @placeholder where a graph in this context is a collection of vertices nodes and edges that connect these vertices .
{ "confidence": [ 62.01491165161133, 59.69536590576172, 55.19707489013672, 54.6113395690918, 53.799896240234375, 53.799896240234375, 53.799896240234375, 51.74178695678711, 49.872459411621094, 49.52141189575195, 49.05086898803711, 48.99396896362305, 48.99396896362305, 48.707000732421875, 48.70699691772461, 48.33251190185547, 47.955142974853516, 47.74025344848633, 46.90009689331055, 46.7313232421875, 46.7313232421875, 46.60377883911133, 46.387451171875, 46.387451171875, 46.0715446472168, 45.85873031616211, 45.85873031616211, 45.85873031616211, 45.85873031616211, 45.72796630859375, 45.635597229003906, 45.48088455200195, 45.39347457885742, 45.061668395996094, 44.78313446044922, 44.37541198730469, 44.312644958496094, 44.22166061401367, 44.152278900146484, 43.52427673339844, 43.13723373413086, 42.61163330078125, 42.321781158447266, 42.263065338134766, 42.085636138916016, 42.035316467285156, 41.7635383605957, 41.46706771850586, 41.46372985839844, 41.43339920043945, 41.188560485839844, 41.04913330078125, 40.934303283691406, 40.845909118652344, 40.81841278076172, 40.79906463623047, 40.6792106628418, 40.61882400512695, 40.507850646972656, 40.41227722167969, 40.41227722167969, 40.41227722167969, 40.378353118896484, 40.19879913330078, 39.89228057861328, 39.8073616027832, 39.651611328125, 39.5789680480957, 39.563777923583984, 39.5152473449707, 39.297725677490234, 39.264225006103516, 39.113853454589844, 39.113853454589844, 39.113853454589844, 39.113853454589844, 39.07836151123047, 39.03014373779297, 39.02286911010742, 39.02286911010742, 39.00419998168945, 38.95820617675781, 38.94437026977539, 38.926971435546875, 38.869014739990234, 38.759613037109375, 38.74128341674805, 38.71833038330078, 38.69554138183594, 38.62944412231445, 38.54423904418945, 38.53147888183594, 38.50083541870117, 38.4668083190918, 38.448604583740234, 38.30131530761719, 38.299278259277344, 38.299278259277344 ], "content": [ "Remember my graph has weighted edges and not vertices .", "The graph has cities as vertices and bus transfers as edges .", "So build an undirected graph where the vertices are the cities .", "What do the nodes edges of the graph correspond to in the problem", "If i have the following undirected graph with weighted vertices and edges :", "A cycle graph contains no edges other than those connecting the vertices in the cycle .", "Conversely a graph with n vertices is dense if the number of edges is O n 2", "Suppose there are many vertices with some value in a circled graph .", "Convert your input graph G V E to a weighted graph G N D where N is the subset of vertices you want to cover and D is distances path lengths between corresponding vertices in the original graph .", "I do NOT assume that the graph is connected.If the graph is not connected then there is no Hamiltonian and this algorithm will detect it because at least one of the consecutive vertices won t be connected or else the graph will be connected .", "It can be easily seen that the edges of this interval graph are exactly the edges of our graph .", "Delete those M vertices from the original graph .", "When all vertices are removed the graph is connected .", "Assuming that the graph is unweighted then the following steps can find the solution in O V V + E where V is the number of vertices and E is the number of edges .", "In my particular case the parent graph is a molecular graph and so it will be connected and typically contain fewer than 100 vertices .", "That can be done by constructing graph where two vertices have degree one .", "the complete graph on n vertices has only n subgraphs including itself .", "I would appreciate advice algorithms for the following problem : .. . .. . Consider a graph with V vertices connected by E edges V E 10 5 .", "Above they are dividing cost by number of vertices in graph to check for negative cycle .", "Dense graph is a graph in which the number of edges is close to the maximal number of edges .", "Sparse graph is a graph in which the number of edges is close to the minimal number of edges .", "In the resulting graph you look for nodes with no outgoing edges .", "The MST in the resulting graph will be the minimum-spanning-tree covering the vertices in k in the original graph .", "It is widely believed that the chromatic number if a graph has chromatic number k then it has the complete graph on k vertices as a minor .", "Graph before and after clustering nodes R 1 and R 2 http : i.stack.imgur.com ORbC9.png .. . .. . In the picture linked above I have a graph with nodes R1 through R5 and vertices linking them .", "I have a bipartite graph with two sets of vertices A and B . Edges have no weights .", "I have created a Graph class with data-members to store vertices edges and vertex labels .", "Note that if your graph doesn t have vertices with no edges then O m subsumes O n anyway .", "I think a graph with n vertices is considered to be sparse if it has O n or less edges .", "Let G V E r a rooted directed-graph defined by a set of vertices V and a set of edges E with a designated root node r . The graph may contain cycles .", "To give a comparison let us assume graph has 1000 vertices .", "I want to divide a graph with N weighted-vertices and N-1 edges into three parts such that the maximum of the sum of weights of all the vertices in each of the parts is minimized .", "Simple sample graph http : i.stack.imgur.com Ay1pV.png .. . .. . So the graph is a directed-graph with weighted edges and it can be cyclic .", "Adding the graph-algorithm tag .", "produce a new graph with the same nodes but different edges such that .. . .. . 1 .", "To find colour for all vertices incrementally find vertex colour and add these 2 edges in a graph .", "I have searched the net and could not find any explanation of a DFS algorithm for finding all articulation vertices of a graph .", "Is there any graph-drawing algorithm that draws a large graph using only existing edges not by verifying all possible pairs", "The row i represents a graph with all vertices up to i included .", "How do you prove that that the maximum spanning tree of an undirected graph will contain the path that is the widest path between any two vertices A and B in the graph", "How many edges are in the cycle graph", "I m writing a function get connected-components for a class Graph : .. . .. . My graph is : .. . .. . where the keys are the nodes and the values are the edge .", "Main graph integral characteristics are number of vertices V and number of edges E . The relation of these two determines whether graph is sparse or dense wiki page here http : en.wikipedia.org wiki Dense graph .", "If your input graph has v vertices and e edges then there are 2 e - v +1 -1 different cycles although not all might be simple cycles .", "Repeating edges or repeating vertices", "I am currently working on a connected graph with 128 nodes and 3051 edges .", "Output : The algorithm will return TRUE for any graph B that has set of nodes that make of 75 or more of it equivalent to set of nodes that make 95 or more of graph A", "The relaxation is the process where you check for some vertices u and v : .. . .. . where est S a is the current estimate of the distance and dist a b is the distance between two vertices that are neighbors in the graph .", "@Tomas n is the number of nodes in the graph .", "We create graph G as follows : vertices will be the problems and there will be an edge between two problems iff v i - v j K .", "I do have an Graph 250 Nodes .", "I m not accessing the value of nodes from within graph and both nodes edges the array being accessed are allocated outside of the stack", "Graph drawing algorithms such as those described here http : cs.brown.edu rt gdhandbook chapters force-directed.pdf check all the vertices two-by-two and apply additional forces if two vertices are connected by an edge .", "Run Prim s algorithm on the resulting graph .", "I want to implement a graph where nodes are items and outward edges are the popularity of the next item .", "I have a graph where nodes represent points in 3D space .", "Anyway this is not purely a graph problem .", "@LajosArpad the algorithm finds the max clique in a given graph", "So we want to find the chromaticity of graph G . This will be easy once we recognize the graph is an interval graph which is a perfect graph those have chromaticity equal to cliqueness and both can be found by a simple algorithm .", "The input file consists of list of edges in the graph .", "How many edges does your graph have", "While there are edges left in the graph which are not in k .. . 1 .", "An independent set of a bipartite graph need not consist solely of vertices of only one side .", "If I remove the unwanted vertices I might also lose intermediate edges that connect k vertices that are far apart .", "I m not very good in graph shortest paths algorithms .", "I then make a graph and test the sorting algorithm on it with each collection .", "The other algorithm is almost as simple : for each vertices you need to count the number of predecessor in-degree which can be done while building the graph .", "@VincentvanderWeele N edges in a cycle graph N - 1 edges in Tree .", "A graph coloring algorithm for large scheduling problems .", "I have the function three colorability n E which gives output true when the graph with those edges and vertices can be coloured with 3 colors or false if not .", "I was studying Meet-in-the-Middle algorithm and found the following exercise : .. . .. . Given a graph of n nodes n 30 find out a set with the smallest number of vertices such that each edge in the graph has at least one node inside the set .", "Also verify that all nodes are visited otherwise the graph could be a forest .", "As I understand it this is the same question as asking the graph what is the highest probability of connecting all of the k vertices .", "If we have a very large graph checking all pairs of vertices would be costly .", "Now we combine these two graphs to form the graph G . The vertices of G are simply G 1 union G 2 .", "There is a weighted directed graph.How to get the shortest-path in the directed-graph that goes through some specified vertices .", "The idea for this problem is to explore all nodes and all their neighbors of a undirected graph .", "you can ignore vertices with no edges .", "How about converting your graph to a directed-graph by replacing each undirected edge by 2 edges for each direction", "Now you want to measure and rank that on edges hence transform the graph into its dual line graph .", "I find the number of disjoint-sets in a graph G and then I delete some vertices of graph G and make graph G and I want to find the number of disjoint-sets in G is there any good algorithm for that without doing the same thing to G as we did to G", "Look at it as a graph problem : You ve got a bunch of nodes your GPS coordinates with no edges .", "Can I just replace the vertices with edges", "The graph is a simple digraph where the nodes represent some tasks and the edges point to the tasks which depend on this task with the parent- child relationship .", "I have a graph and it s nodes adjacent matrix .", "What is the time-complexity of the Best algorithm to determine if an undirected graph is a tree", "I m having some trouble with a homework question involving using Tarjan s algorithm on a provided graph to find the particular SCC s for that graph .", "Say I have a directed acyclic graph with N vertices and a subset of the vertices at size M . .. . .. . The M vertices are all marked as visited how can I find all the vertices that all of their predecessors in the graph are visited .. . .. . for example : if there are 4 vertices a b c u and 3 edges a u b u c u and a b c are marked as visited I need to output u .", "From here http : www.brpreiss.com books opus4 html page534.html : .. . .. . Informally a graph with relatively few edges is sparse and a graph with many edges is dense .", "You can think of it as a graph Map with nodes Room and edges directions north east west south that lead to another Room .", "Here is a simple formulation of my problem : .. . .. . Given a weighted undirected graph G V E w and a subset of vertices S in G find the min max weight tree that spans S . Adding vertices is not allowed .", "The graph is undirected the connections can Not curve only straight lines.The Nodes vertices are fixed we have their position from or W E input .", "Here is the example graph .", "The cost of combining all the nodes in the graph at once would be 10 10 10 10 10 10 5 since there are five edges all weighted 10 in the entire graph .", "I need to find the minimum distance between two nodes in a undirected graph here are some details .. . .. . The graph is undirected and huge no of nodes is in order of 100 000 .. . The graph is sparse no of edges is less than no of nodes .. . I am not interested in the actual path just the distance .", "A graph is just a set of nodes and a set of edges which are just pairs of nodes with a weight ie length in your case .", "Otherwise you ll need a graph cycle enumeration algorithm .", "The algorithm always halts since the graph is acyclic ." ] }
{ "confidence": [ 84.30648803710938, 79.3550033569336, 79.0577392578125, 76.69771575927734, 76.69140625, 76.61042022705078, 75.04106903076172, 74.83307647705078, 74.63373565673828, 74.31620788574219, 74.0835189819336, 74.05345916748047, 73.1863021850586, 73.0552978515625, 71.10681915283203, 70.84290313720703, 70.53045654296875, 69.71639251708984, 69.71292114257812, 68.63556671142578 ], "content": [ "Question : null .. . Answer : Graph before and after clustering nodes R 1 and R 2 http : i.stack.imgur.com ORbC9.png .. . .. . In the picture linked above I have a graph with nodes R1 through R5 and vertices linking them . All the vertices are weighted 10 in this case and a node can have any number of vertices attached to it the vertices can have any positive integer weight . I want to essentially condense this graph down to one node by combining all the nodes . The computational cost of combining two nodes in the context of the program I m running these nodes actually represent operations on arrays but it is not necessary to understand that to look at the problem I m positing here is the weights of all the edges included when combining any number of nodes . For example in the picture the cost of combining nodes R1 and R2 is 10 10 10 2 since there is one edge between them and node R2 also has a second separate edge . The cost of combining all the nodes in the graph at once would be 10 10 10 10 10 10 5 since there are five edges all weighted 10 in the entire graph . However by combining two nodes at a time in a strategic order it is possible to reduce the cost to the order of 10 3 . I want to write an algorithm that will help me combine nodes in an efficient manner I ve tried writing a simple greedy algorithm as well as a recursive algorithm that finds every possible combination and returns the cheapest . Both algorithms work as intended but the recursive algorithm is prohibitively slow and the greedy algorithm doesn t do particularly well when compared to the minimum cost that the recursive algorithm finds . I have also tried reducing the run-time of the recursive algorithm through dynamic-programming but it appears that taking advantage of overlapping subproblems isn t really possible here due to the great variety of weights that the edges can have while overlapping subproblems occur occasionally they are too rare to be worth taking advantage of . I am hoping that I can write an optimization algorithm that will give me results much closer to the actual minimum .. . .. . I am not terribly well-versed in graph-theory or combinatorics though I did make an attempt to search through graph-theory questions here and on the Internet before posting so I am posting here in the hope that this might be a known problem or similar to a known problem that I can take advantage of or that anyone might have other advice for working on this . Thank you", "Question : I have an undirected positive-edge-weight graph V E for which I want a minimum-spanning-tree covering a subset k of vertices V the Steiner tree problem . I m not limiting the size of the spanning tree to k vertices rather I know exactly which k vertices must be included in the MST . Starting from the entire MST I could pair down edges nodes until I get the smallest MST that contains all k . I can use Prim s algorithm to get the entire MST and start deleting edges nodes while the MST of subset k is not destroyed alternatively I can use Floyd-Warshall to get all-pairs shortest paths and somehow union the paths . Are there better ways to approach this Comment : If I remove the unwanted vertices I might also lose intermediate edges that connect k vertices that are far apart . For example if I have : k--o--o--o--k where o represents an unnecessary vertex and k represents one I need if I deleted the middle o there would be no way to construct the MST between my k vertices . Comment : So you interested in the minimum-spanning-tree which doesn t necessarily span all vertices only the vertices in k Comment : Exactly . The MST that includes all of k at least and then as little else as possible . Comment : Hi could you solve your problem If possible can you help with the pseudo code code I have similar problem but the graph is unweighted . Comment : The question is unclear about whether k is a number or a set . Will you please clarify .. . Answer : Run Prim s algorithm on the restricted graph k E where E x y V : x k and y k . Constructing that graph takes O E . Comment : This might work alright some of the time but it s not even guaranteed that the E is connected -- and even if it is it might be possible to save arbitrarily much distance by introducing a Steiner point i.e . a vertex not in k . Less than arbitrarily much if the distances obey the Triangle Inequality but nothing says they have to . Comment : @j random hacker interested in posting an alternative solution Comment : @user2398029 : I upvoted meh s answer and I don t know why Bill the Lizard deleted adi s much earlier answer saying mostly the same thing . Basically this is an NP-hard problem to solve optimally if you google Steiner tree approximation you can probably get some OK algorithms . Comment : @user2398029 : It might be helpful to look at chapter 3 of this link from adi s answer : cc.gatech.edu fac Vijay.Vazirani book.pdf http : www.cc.gatech.edu fac Vijay.Vazirani book.pdf . I re post this here since I can see deleted posts but I m not sure what the rep cutoff is for that .", "Question : If i have the following undirected graph with weighted vertices and edges : enter image description here http : i.stack.imgur.com 00ef1.jpg .. . .. . I am trying to come up with a ruby algorithm to find a best shortest-path within a defined limit sum of edges with the highest value sum of vertices . The start point will also be the ending point . for e.g . finding a path with a maximum of 20 with the highest total value . This problem seems like a np hard problem and it is hard to find the best solution . Is there a modified algorithm of dijkstra I tried using a greedy algorithm but it did not give me a optimal solution . and by using bruteforce on all poosible path will work but it will take very long if the number of nodes increases . Was wondering if there is any combination of algorithms that i can use to improve my solution Thanks . Comment : I don t understand first you say : I am trying to come up with a ruby algorithm to find a best shortest-path within a defined limit sum of edges with the highest value sum of vertices but then you say : finding a path with a maximum of 20 with the highest total value . In the second statement seems like you don t care about the path is the shortest . So do you want the path with the highest value max sum of vertices that compliant the limit sum of edges Is the meaning of best shortest-path what I say above .. . Answer : The problem is actually NP hard you can prove this doing a reduction of Hamiltonian path problem https : en.wikipedia.org wiki Hamiltonian path problem to this problem . Basically given an input for the Hamiltonian path problem we can stay with the undirected graph you can create an input for the problem you describe if follow this steps : .. . .. . build a new graph .. . .. . create a new graph that is the same that receive the Hamiltonian path problem but give to each vertex and edge weight 1 . create an input for your problem .. . .. . Pass to your problem the graph just created in the previous step and limit equals to infinity . Notice now that the result given by your problem is a path as longest as posible with respect at the number of vertex since the limit restriction is an upper bound in the sum of weight of the edges . This mean that you can add as vertex as posible and still complaint the limit restriction . How many vertex are in the path determine the total value of this count of vertex in the path since the weight is 1 for all of them . So the resulting path is the longest posible in the graph . With this insight we can verify if this path is a hamiltonian path just check the length of the path . If the path is of length N where N is the number of nodes in the graph there is a hamiltonian path otherwise there isn t . To solve the problem you can use an approach similar to Bellman-Ford https : en.wikipedia.org wiki Bellman E2 80 93Ford algorithm with some modifications . First create a matrix A i j where you storage all the highest total value paths that ends-with j and has length number of edges i . This is the key you can t just storage one of this path because in the next step you need to check all of them to make a relax here is where the implementation become non-polynomial . The relax technique in the step i iterate through all the storage path in A i-1 u and try to improve the value in A i v saving the new paths that actually do it you must check for when try to improve A i v in order to get all the paths of course this relax take into account the limit restriction . If you uses a global max and a global path and update it in each relax process you end with the highest value path for the entire graph .", "Question : I have an undirected positive-edge-weight graph V E for which I want a minimum-spanning-tree covering a subset k of vertices V the Steiner tree problem . I m not limiting the size of the spanning tree to k vertices rather I know exactly which k vertices must be included in the MST . Starting from the entire MST I could pair down edges nodes until I get the smallest MST that contains all k . I can use Prim s algorithm to get the entire MST and start deleting edges nodes while the MST of subset k is not destroyed alternatively I can use Floyd-Warshall to get all-pairs shortest paths and somehow union the paths . Are there better ways to approach this Comment : If I remove the unwanted vertices I might also lose intermediate edges that connect k vertices that are far apart . For example if I have : k--o--o--o--k where o represents an unnecessary vertex and k represents one I need if I deleted the middle o there would be no way to construct the MST between my k vertices . Comment : So you interested in the minimum-spanning-tree which doesn t necessarily span all vertices only the vertices in k Comment : Exactly . The MST that includes all of k at least and then as little else as possible . Comment : Hi could you solve your problem If possible can you help with the pseudo code code I have similar problem but the graph is unweighted . Comment : The question is unclear about whether k is a number or a set . Will you please clarify .. . Answer : The problem you stated is a famous NP-hard problem called Steiner tree in graphs https : en.wikipedia.org wiki Steiner tree problem Generalization of minimum Steiner tree . There are no known solutions in polynomial time and many believe no such solutions exist . Comment : Actually Steiner tree in graphs has a fixed set of k vertices as input while the OP gives just the k and lets the algorithm find the set . This problem is called k -MST https : en.wikipedia.org wiki K-minimum spanning tree and is also NP-hard . See also problems related to MST https : en.wikipedia.org wiki Minimum spanning tree Related problems on Wikipedia . Comment : @Palec Actually that is wrong . I m not limiting the size of the spanning tree to k vertices rather I know exactly which k vertices must be included in the MST . This problem is the Steiner tree problem . Comment : Also -1 to @meh because the fact that the problem is NP-hard doesn t mean we can t get useful solutions with approximation algorithms . This answer does not help the OP in solving his problem .", "Question : Given bipartite graph . Each vertex has some integer value - weight . Is it possible to find maximum weighted independent vertex set http : en.wikipedia.org wiki Independent set 28graph theory 29 in this graph in polynomial time If such solution exists what is the algorithm for this problem Comment : How is your graph represented Where are the weights At the edges or at the nodes What do you mean by independent vertex set Comment : It doesnt matter how the graph is represented . Each vertex has some integer weight . You may read about independent set here - en.wikipedia.org wiki Independent set graph-theory http : en.wikipedia.org wiki Independent set graph-theory Comment : For the general graph this problem known to be NP-complete . But for the bipartite graph does the same approaches Comment : Yes it s possible using min cut Comment : @NiklasB . Could you describe the idea please .. . Answer : In any graph the complement of an independent set is a vertex cover http : en.wikipedia.org wiki Vertex cover and vice versa so your problem is equivalent to finding the minimum weight vertex cover in the graph . The latter can be solved using maximum flow techniques : .. . .. . Introduce a super-source S and a super-sink T . connect the nodes on the left side of the bipartite graph to S via edges that have their weight as capacity . Do the same thing for the right side and sink T . Assign infinite capacity to the edges of the original graph . Now find the minimum S-T cut in the constructed network . The value of the cut is the weight of the minimum vertex cover . To see why this is true think about the cut edges : They can t be the original edges because those have infinite capacity . If a left-side edge is cut this corresponds to taking the corresponding left-side node into the vertex cover . If we do not cut a left-side edge we need to cut all the right-side edges from adjacent vertices on the right side . Thus to actually reconstruct the vertex cover just collect all the vertices that are adjacent to cut edges or alternatively the left-side nodes not reachable from S and the right-side nodes reachable from S . Comment : Cool thank you", "Question : I asked this question on reddit but haven t converged on a solution yet . Since many of my searches bring me to Stack Overflow I decided I would give this a try . Here is a simple formulation of my problem : .. . .. . Given a weighted undirected graph G V E w and a subset of vertices S in G find the min max weight tree that spans S . Adding vertices is not allowed . An extension of the basic model is adding edges with 0 weight and vertices that must be excluded . This seems similar to the question asked here : .. . .. . Algorithm to find minimum-spanning-tree of chosen vertices http : stackoverflow.com questions 13146710 algorithm-to-find-minimum-spanning-tree-of-chosen-vertices .. . .. . There is also more insight into what values the edges can take . Each edge is actually a correlation probability which I can encode in several ways so the main questions I want to ask the graph are : .. . .. . 1 . Given k vertices that must be connected what are the top X min max spanning trees that connect them and what vertices do they pass-through As I understand it this is the same question as asking the graph what is the highest probability of connecting all of the k vertices . 2 . Getting more vague is there a logical way to cluster the nodes As for implementation I have the boost libraries installed and once I get the framework rolling on this problem I can deal with how to multi-thread it if appropriate what kind of graph to use and how to store cache the data since the number of vertices and edges is going to be quite large . Update Looking at the problem I am trying to solve it makes sense that it would be NP-complete . The real world problem that I am trying to solve involves medical diagnoses specifically when the medical community is working on a problem with a specific idea in mind and they need to take a step back and reconsider how they got there . What I want from the program I am trying to design is : .. . .. . Given several conditions tests symptoms age gender season confirmed diagnosis timeline how can you relate them What cells tissues organs systems are touched Are they even related Along with the defined groups that conditions symptoms can belong to is there a way to logically group the conditions symptoms Example Flu-like symptoms red eyes early pneumonia and some of the signs of diabetes . Is there a way to relate all of the symptoms Are there some tests that could be done to make it easier to determine What systems are involved It just seemed natural to try and map this to a graph or several graphs and use probabilities as the correlation between different symptoms conditions . Comment : This problem is NP-hard so there is no known efficient algorithm for it . You will probably have to brute-force search for the answer . Comment : Unfortunately that is what I came up with as well . Any ideas on how to parallelize it efficiently What implementation of a graph do you think is best probably the adjacency-matrix .. . Answer : I have seen models for your problem that were mostly based on Bayesian inference and fuzzy-logic . Bayesian inference networks express the relation between causes and effects e.g . smoking and lung cancer . Look here http : www.autonlab.org tutorials bayesinf05.pdf for a quick tutorial . You can apply fuzzy-logic to that modelling to try to take into account the variablility in real life as not everyone gets lung cancer . Comment : This is sort of the direction that I was headed except that I am looking a bit at Markov fields and hidden Markov models . Mostly I want to preserve the correlation between variables but be able to move along the graph in an undirected manner . I m not necessarily looking for a cause effect relationship but a correlation possibly with hidden data .", "Question : I have an undirected positive-edge-weight graph V E for which I want a minimum-spanning-tree covering a subset k of vertices V the Steiner tree problem . I m not limiting the size of the spanning tree to k vertices rather I know exactly which k vertices must be included in the MST . Starting from the entire MST I could pair down edges nodes until I get the smallest MST that contains all k . I can use Prim s algorithm to get the entire MST and start deleting edges nodes while the MST of subset k is not destroyed alternatively I can use Floyd-Warshall to get all-pairs shortest paths and somehow union the paths . Are there better ways to approach this Comment : If I remove the unwanted vertices I might also lose intermediate edges that connect k vertices that are far apart . For example if I have : k--o--o--o--k where o represents an unnecessary vertex and k represents one I need if I deleted the middle o there would be no way to construct the MST between my k vertices . Comment : So you interested in the minimum-spanning-tree which doesn t necessarily span all vertices only the vertices in k Comment : Exactly . The MST that includes all of k at least and then as little else as possible . Comment : Hi could you solve your problem If possible can you help with the pseudo code code I have similar problem but the graph is unweighted . Comment : The question is unclear about whether k is a number or a set . Will you please clarify .. . Answer : I suggest you do the following : .. . .. . 1 . Create a copy of the graph . 2 . While there are edges left in the graph which are not in k .. . 1 . Remove an arbitrary vertex v which is not in k .. . 2 . For all pairs a b of neighbors of v .. . 1 . Add an edge a b with weight Weight a v + Weight v b .. . 3 . Run Prim s algorithm on the resulting graph . The intuition is that we short-circuit the nodes which are connected through a vertex not in k . The cost of going via any such node v is the cost of going from the first node to v plus the cost of going from v to the second node . The MST in the resulting graph will be the minimum-spanning-tree covering the vertices in k in the original graph . Note that if you have many nodes in V but not in k then you may have quite a blow-up in the number of edges . Lot s of edges will presumably be redundant however so there s probably room for some optimizations.. . .. . .. . Related problem : .. . .. . K-minimum spanning tree http : en.wikipedia.org wiki K-minimum spanning tree NP-hard Comment : Foiled . You re right about the K-minimum spanning tree . Thanks for the link I ll take a look at the approximations . Comment : Hmm. . I removed that part completely . K-minimum spanning tree was for k arbitrary number of nodes . I suppose you have k fixed nodes which actually makes the problem easier . See my updated answer . Comment : This algorithm is faulty : Let k1 . . kN denote nodes from the set k and v1 .. . vM denote nodes not in k . Let d x y denote the weight of the edge between nodes x and y if existing . Take the graph d k1 v1 1 d v1 k2 2 d v1 k3 3 and d k1 k3 4 . The MST that uses all nodes from k is k1 v1 v1 k2 v1 k3 . Shrinking this graph we get d k1 k2 3 d k1 k3 4 and d k2 k3 5 . MST here is k1 k2 k1 k3 which includes k1 k3 which is not present in the optimal case . Hence the algorithm is not producing the optimal spanning tree .", "Question : specific question here . Suppose you have a graph where each vertice specifies how many connections they must have to another vertices and the following rules properties apply : .. . .. . 1- The graph can be incomplete no need to every vertice to have a connection with every other .. . .. . 2- There can be two connections between two vertices only if they are in opposite directions e.g : A points do B B points to A . 3- Suppose they are on a 2D plane there can be no crossing of connections not even tangents . 4- Theres no interest for the shortest-path just respecting the properties and knowing if the solution is unique or not . 5- There can be no possible solution .. . .. . EDIT : Alright guys sorry for not being specific . I ll try to clarify my point here : what I want to do is given a number of vertices know if a graph is connected if all the points have at least a connection to the graph . The vertices given can be impossible to make a graph of it so I want to know if there s is a solution if the solution is unique or not or worst case scenario if there is no possible solution . I think that clarifies point 4 and 5 . The graph is undirected the connections can Not curve only straight lines.The Nodes vertices are fixed we have their position from or W E input . I wanted to know the best approach and I ve been researching and it is a connectivity problem though maybe some specific alg may be more efficient doing this task . That s all sorry for late reply .. . .. . EDIT2 : Alright guys would the problem be different if we think that each vertice is on a row and column of a plane matrix and they can only connect with other Vertices on the same column or row So it would be just 90 180 270 360 straight connections . This would hugely shorten the possibilities right Comment : It s not clear what your question is . What problem is this algorithm supposed to solve What do you mean by match What are the input and output here Comment : Basically what I m wondering is what algorithm can make connections between the vertices following those properties and finding a solution Comment : Okay you want to generate a graph . I still don t understand what you re asking though particularly in points 2 4 and 5 . Comment : You are going to need to add some examples or more details to explain what you are trying to do and even after clarification you will need to narrow down the scope of the question because general What algorithm do I need questions tend to be too broad and open-ended Comment : Do edges need to be straight or can they curve .. . Answer : Assuming that you are asking us to : .. . .. . Find out if it is possible to generate one-or-more directed planar graphs such that each vertex has a given out-degree not necessarily the same out-degree per vertex . Let s also assume that you want the graph to be connected . If there are n vertices and the vertices have degrees d 1 .. . d n then for vertex i there are C n-1 d i n-1 d i n-1-d i possible combinations of out-edges from that vertex . Taking the product of all these combinations over all the vertices will give you the upper bound on the number of possible graphs . The naive approach is : .. . .. . Generate all possible graphs . Filter the graphs to only have connected graphs . Run a planarity test https : archive.org details PlanarityTestingByPathAddition on the graph to determine if it is planar you can consider the graph to be undirected in this step discard if it isn t . Profit Comment : That is an interesting approach but I wanted to generate a graph that would be already connected or just admit It cant be feasible . Although I think my approach is kinda naive since we generally generate graphs and then apply a search algorithm to know if it follows our specifications right EDIT : Wow that thesis is gigantic so many algorithms and theorems . Smart people", "Question : How can I find iterate over ALL the cycles in a directed-graph from to a given node For example I want something like this : .. . .. . but not : B- C- B Comment : Homework I assume me.utexas.edu bard IP Handouts cycles.pdf http : www.me.utexas.edu bard IP Handouts cycles.pdf not that it s not a valid question : Comment : Note that this is at least NP Hard . Possibly PSPACE I d have to think about it but it s too early in the morning for complexity-theory B- Comment : If your input graph has v vertices and e edges then there are 2 e - v +1 -1 different cycles although not all might be simple cycles . That s quite a lot - you might not want to explicitly write all of them . Also since the output size is exponential the complexity of the algorithm cannot be polynomial . I think there is still no answer to this question . Comment : My best option for me was this : personal.kent.edu rmuhamma Algorithms MyAlgorithms GraphAlgor http : www.personal.kent.edu rmuhamma Algorithms MyAlgorithms GraphAlgor depthSearch.htm .. . Answer : There are two steps algorithms involved in finding all cycles in a DAG . The first step is to use Tarjan s algorithm to find the set of strongly connected-components . 1 . Start from any arbitrary vertex . 2 . DFS from that vertex . For each node x keep two numbers dfs index x and dfs lowval x . dfs index x stores when that node is visited while dfs lowval x min dfs low k where k is all the children of x that is not the directly parent of x in the dfs-spanning tree . 3 . All nodes with the same dfs lowval x are in the same strongly connected component . The second step is to find cycles paths within the connected-components . My suggestion is to use a modified version of Hierholzer s algorithm . The idea is : .. . .. . 1 . Choose any starting vertex v and follow a trail of edges from that vertex until you return to v . It is not possible to get stuck at any vertex other than v because the even degree of all vertices ensures that when the trail enters another vertex w there must be an unused edge leaving w . The tour formed in this way is a closed tour but may not cover all the vertices and edges of the initial graph . 2 . As long as there exists a vertex v that belongs-to the current tour but that has adjacent edges not part of the tour start another trail from v following unused edges until you return to v and join the tour formed in this way to the previous tour . Here is the link-to a Java implementation with a test case : .. . .. . http : stones333.blogspot.com 2013 12 find-cycles-in-directed-graph-dag.html Comment : How can a cycle exist in a DAG Directed Acyclic Graph", "Question : I have an unweighted connected graph . I want to find a connected subgraph that definitely includes a certain set of nodes and as few extras as possible . How could this be accomplished Just in case I ll restate the question using more precise language . Let G V E be an unweighted undirected connected graph . Let N be some subset of V . What s the best way to find the smallest connected subgraph G V E of G V E such that N is a subset of V Approximations are fine . .. . Answer : I can t think of an efficient algorithm to find the optimal solution but assuming that your input graph is dense the following might work well enough : .. . .. . 1 . Convert your input graph G V E to a weighted graph G N D where N is the subset of vertices you want to cover and D is distances path lengths between corresponding vertices in the original graph . This will collapse all vertices you don t need into edges . 2 . Compute the minimum-spanning-tree for G . 3 . Expand the minimum-spanning-tree by the following procedure : for every edge d in the minimum-spanning-tree take the corresponding path in graph G and add all vertices including endpoints on the path to the result set V and all edges in the path to the result set E . This algorithm is easy to trip up to give suboptimal solutions . Example case : equilateral triangle where there are vertices at the corners in midpoints of sides and in the middle of the triangle and edges along the sides and from the corners to the middle of the triangle . To cover the corners it s enough to pick the single middle point of the triangle but this algorithm might choose the sides . Nonetheless if the graph is dense it should work OK . Comment : Thanks I think this would work .", "Question : I would appreciate advice algorithms for the following problem : .. . .. . Consider a graph with V vertices connected by E edges V E 10 5 . When a vertex is removed all the edges connected to that vertex are removed . The vertices are labeled 1 2 .. . V . .. . .. . Input is given on E lines and on each line there are two space-separated vertex numbers representing an edge between those two vertices . The next V lines are a permutation of 1 2 .. . V representing the order in which the vertices are removed . Output V lines stating if the graph is connected i.e . there is a sequence of paths between every pair of vertices at each step . V and E are known and are given as space-separated integers on the first line of input . For example consider the following example input edges are undirected : .. . .. . 5 5 .. . .. . 1 2 .. . .. . 3 1 .. . .. . 2 3 .. . .. . 2 4 .. . .. . 5 4 .. . .. . 3 .. . .. . 4 .. . .. . 1 .. . .. . 2 .. . .. . 5 .. . .. . The first line indicates that there are 5 vertices and 5 edges . The next 5 lines describe the edges which are undirected i.e . an edge from 1 to 2 can also be taken from 2 to 1 . The 5 lines after that give the order in which the vertices are removed . For this example we would get the output as follows : .. . .. . When vertex 3 is removed the graph is connected since we can go from any of 1 2 4 5 to any other of 1 2 4 5 . When vertex 4 is removed the graph is disconnected because there are no connections out of vertex 5 . When vertex 1 is removed the same problem exists . When vertex 2 is removed only 5 is left so the graph is connected . When all vertices are removed the graph is connected . I tried a naive recursive approach as follows to check if it is possible to go from a start vertex to an end vertex : .. . .. . Checking at each step if it is possible to travel from all vertices A to all other vertices B using the above algorithm is far too slow O V 2 E V algorithm should be ideally O V log V or maybe O V 2 to run in about one second . .. . Answer : For each step store number of partition graph has . For initial graph it is done by doing full traversal DFS or BFS from initial vertex than repeat traversal from vertex that is not yet covered . If number of partitions is 1 than graph is connected . If removed vertex has degree 0 than number of partition is decreased by one . If removed vertex has degree 1 than number of partitions stays the same . If removed vertex has degree larger than 1 than number of partitions can be increased by max degree-1 . That is checked by similar traversing from neighbours of removed vertex . Start from initial neighbour and find all neighours that are connected to it . Repeat traversing from not visited neigbour . Comment : In the case where the degree of the removed vertex is greater than 1 can you go into more detail on how to find the change in number of partitions perhaps providing pseudocode I don t quite understand how the complexity of this solution has a smaller upper bound than E V for the DFS . Comment : Traverse all nodes connected to one neighbor . If all other neighbors are visited than removing vertex didn t split graph . If some neighbors were not visited than increase number of partitions by 1 and repeat process of traversing starting from some not visited neigbor . Note that if only one neighbor is left unvisited there is no need to make that last traversing starting from it .", "Question : I have been working on a graph implementation for the last few days . All of this is really new to me and I am stuck on two parts of my implementation . I am implementing a digraph of courses from an input file . From the file I can determine which courses are prereqs for other courses . I then create a digraph with courses as nodes and edges connecting courses that are prereqs . I also want to find the total number of nodes and edges and perform a topological-sort on the graph I will later be adding weights to the edges . Here is my implementation . Finding the number of nodes was easy just return work.size . I have confirmed this is working properly . I am lost on how I would return the number of edges in my graph . It seems it would be simple but everything I tried doesn t work . Secondly I am completely lost on how to perform a topological-sort on this graph . Any assistance is appreciated . Comment : Please note that Digraph : : addEdge can add a new edge from A to B even if there is already an edge . .. . Answer : First for the number of edges it would be simpler to count them directly when you build the graph just add a counter in your Digraph class and increment it each time you add an edge .. . .. . For the topological-sort first I have a question : your edges are from prereqs to dependant courses That is you have a link A - B if A is a prereq of B If this not the case you need to invert your graph . You to main algorithm in order to build a topological-sort : one based on a simple DFS http : en.wikipedia.org wiki Depth-first search and the other relying on in-degrees http : en.wikipedia.org wiki Directed graph Indegree and outdegree of your vertices courses in your case . Normally you need to verify that your graph doesn t contain any cycle which will normally be the case if your data are coherent . Let s consider the DFS based algorithm : a DFS traverses each vertices from a given root following edges as they appear . We can easily prove that order of last encounter of a vertex forms a reverse topological order . So all we need is to push in a stack the current vertex after the calls on its successors . I made a quick and dirty implementation for you using C++11 again . First add the following to the Digraph class : .. . .. . Then here comes the code : .. . .. . The code compiles but I haven t tested . If for any reasons you have an issue with the recursive algorithm the function Digraph : : dfs it can be derecursified using a stack containing the parent of the target vertex and the iterator to the current successor the iterator reach the end of the adjacency-list you can push the parent in the topological-sort . The other algorithm is almost as simple : for each vertices you need to count the number of predecessor in-degree which can be done while building the graph . In order to compute the topological-sort you look for the first vertex with a in-degree of 0 no predecessor you then decrease the in-degree of all its successors and continue with the next vertex with 0 . If the graph has no cycle there will always be a vertex with a in-degree of 0 at beginning of course but also during the algorithm run as you decrease it until all vertices have been seen . The order of vertices encounter form a topological-sort this is related to the Bellman shortest-path algorithm . Note that these 2 algorithms are listed here : http : en.wikipedia.org wiki Topological sorting . The one using in-degree is described in terms of removing edges which we simply simulate by decreasing the in-degree a far less destructive approach", "Question : Graph drawing algorithms such as those described here http : cs.brown.edu rt gdhandbook chapters force-directed.pdf check all the vertices two-by-two and apply additional forces if two vertices are connected by an edge . If we have a very large graph checking all pairs of vertices would be costly . Is there any graph-drawing algorithm that draws a large graph using only existing edges not by verifying all possible pairs EDIT .. . By drawing algorithm I meant an algorithm that assigns a 2D or 3D position to each vertex such that rendering spheres or circles or any other shape as vertices at their assigned positions lead to a plausible visual representation of the whole graph . Comment : does the graph have to be planar Comment : No not necessarily . Comment : The problem with your question is in very unclear requirements on the drawing algorithm - plausible visual representation is not a clear objective criteria . I can easily create a very simple drawing algorithm for you that will fulfill the condition but it will create ugly graphs . Who will decide what is ugly and what is not Comment : I had been thinking there must be an algorithm out there in the literature that satisfies mentioned conditions . Comment : Which conditions You have specified no clear conditions . Go back and read my previous comment again . .. . Answer : Check this Spring-Electrical Embedding http : reference.wolfram.com mathematica tutorial GraphDrawingIntroduction.html 194525651 It is in O nlog n . Comment : Thanks . That s what I had been thinking as a solution : confining the attractive force to nearby vertices . I think it adds the overhead of knowing neighbors but it s not something that cannot be solved . Comment : Peng what is n You should always say what is n if you put expression like that . Right @Farzad Comment : @Tomas n is the number of nodes in the graph . This is the common notation from graph-theory . : - Comment : And by the way answers like this are discouraged because they don t contain anything besides the link - which might stop working . Comment : @Tomas what you re referring to is the worst case that doesn t happen for real-world large graphs . Have a look at SNAP large graph dataset http : snap.stanford.edu data . These large graphs are sparse they may have millions of vertices but don t have hundreds of billions of edges . Plus this post has the answer I was looking for . A useful link is better than a long useless answer or no answer .", "Question : Graph drawing algorithms such as those described here http : cs.brown.edu rt gdhandbook chapters force-directed.pdf check all the vertices two-by-two and apply additional forces if two vertices are connected by an edge . If we have a very large graph checking all pairs of vertices would be costly . Is there any graph-drawing algorithm that draws a large graph using only existing edges not by verifying all possible pairs EDIT .. . By drawing algorithm I meant an algorithm that assigns a 2D or 3D position to each vertex such that rendering spheres or circles or any other shape as vertices at their assigned positions lead to a plausible visual representation of the whole graph . Comment : does the graph have to be planar Comment : No not necessarily . Comment : The problem with your question is in very unclear requirements on the drawing algorithm - plausible visual representation is not a clear objective criteria . I can easily create a very simple drawing algorithm for you that will fulfill the condition but it will create ugly graphs . Who will decide what is ugly and what is not Comment : I had been thinking there must be an algorithm out there in the literature that satisfies mentioned conditions . Comment : Which conditions You have specified no clear conditions . Go back and read my previous comment again . .. . Answer : If you have sparse-matrix you can consider about creating graph as list of neighbours or simplier like pair of vertices e.g . 1 3 and 1 and 3 are the numbers of vertices . Comment : Having the list of edges is a representation and storing format not a graph-drawing format . I edit the question and add this .", "Question : specific question here . Suppose you have a graph where each vertice specifies how many connections they must have to another vertices and the following rules properties apply : .. . .. . 1- The graph can be incomplete no need to every vertice to have a connection with every other .. . .. . 2- There can be two connections between two vertices only if they are in opposite directions e.g : A points do B B points to A . 3- Suppose they are on a 2D plane there can be no crossing of connections not even tangents . 4- Theres no interest for the shortest-path just respecting the properties and knowing if the solution is unique or not . 5- There can be no possible solution .. . .. . EDIT : Alright guys sorry for not being specific . I ll try to clarify my point here : what I want to do is given a number of vertices know if a graph is connected if all the points have at least a connection to the graph . The vertices given can be impossible to make a graph of it so I want to know if there s is a solution if the solution is unique or not or worst case scenario if there is no possible solution . I think that clarifies point 4 and 5 . The graph is undirected the connections can Not curve only straight lines.The Nodes vertices are fixed we have their position from or W E input . I wanted to know the best approach and I ve been researching and it is a connectivity problem though maybe some specific alg may be more efficient doing this task . That s all sorry for late reply .. . .. . EDIT2 : Alright guys would the problem be different if we think that each vertice is on a row and column of a plane matrix and they can only connect with other Vertices on the same column or row So it would be just 90 180 270 360 straight connections . This would hugely shorten the possibilities right Comment : It s not clear what your question is . What problem is this algorithm supposed to solve What do you mean by match What are the input and output here Comment : Basically what I m wondering is what algorithm can make connections between the vertices following those properties and finding a solution Comment : Okay you want to generate a graph . I still don t understand what you re asking though particularly in points 2 4 and 5 . Comment : You are going to need to add some examples or more details to explain what you are trying to do and even after clarification you will need to narrow down the scope of the question because general What algorithm do I need questions tend to be too broad and open-ended Comment : Do edges need to be straight or can they curve .. . Answer : I am going to assume that the question is : Given the degree of each vertex work out a graph that passes all the constraints given . I think you can reduce this to a very large integer-programming problem - linear constraints but with the variables required to be integers in fact either 0 or 1 which makes the problem much more difficult than ordinary linear-programming . Let the unknowns be of the form Xij where Xij is 1 if there is an edge from node i to node j and 0 otherwise . The requirements on the number of connections then amount to requirements of the form SUM all i Xij K for some K dependent on the requirement . The requirement that the graph is planar reduces to the requirement that the graph not contain two known graphs as subgraphs - https : en.wikipedia.org wiki Graph minor . Each possible subgraph then produces a constraint such as X01 + X02 + .. . 5 - there will be a huge number of these constraints - so large that for large number of nodes simply producing all the constraints may be too expensive to be practical let alone solving them . The number of constraints goes up as at least the 6th power of the number of nodes . However this is polynomial so theoretically practical to write down the MIP to be solved - so perhaps this is better than no algorithm at all .", "Question : I have an undirected positive-edge-weight graph V E for which I want a minimum-spanning-tree covering a subset k of vertices V the Steiner tree problem . I m not limiting the size of the spanning tree to k vertices rather I know exactly which k vertices must be included in the MST . Starting from the entire MST I could pair down edges nodes until I get the smallest MST that contains all k . I can use Prim s algorithm to get the entire MST and start deleting edges nodes while the MST of subset k is not destroyed alternatively I can use Floyd-Warshall to get all-pairs shortest paths and somehow union the paths . Are there better ways to approach this Comment : If I remove the unwanted vertices I might also lose intermediate edges that connect k vertices that are far apart . For example if I have : k--o--o--o--k where o represents an unnecessary vertex and k represents one I need if I deleted the middle o there would be no way to construct the MST between my k vertices . Comment : So you interested in the minimum-spanning-tree which doesn t necessarily span all vertices only the vertices in k Comment : Exactly . The MST that includes all of k at least and then as little else as possible . Comment : Hi could you solve your problem If possible can you help with the pseudo code code I have similar problem but the graph is unweighted . Comment : The question is unclear about whether k is a number or a set . Will you please clarify .. . Answer : There s a lot of confusion going on here . Based on what the OP says : .. . .. . I m not limiting the size of the spanning tree to k vertices rather I know exactly which k vertices must be included in the MST . This is the Steiner tree problem on graphs . This is not the k-MST problem . The Steiner tree problem is defined as such : .. . .. . Given a weighted graph G V E a subset S V of the vertices and a root r V we want to find a minimum weight tree which connects all the vertices in S to r . 1 http : i.stack.imgur.com lQP8U.png .. . .. . As others have mentionned this problem is NP-hard . Therefore you can use an approximation algorithm . Early Simple Approximation Algorithms .. . .. . Two famous methods are Takahashi s method and Kruskal s method both of which have been extended improved by Rayward-Smith : .. . .. . Takahashi H Matsuyama A : An approximate solution for the Steiner problem in graphs . Math . Jap 1980 24 : 573 577 . Kruskal JB : On the Shortest Spanning Subtree of a Graph and the Traveling Salesman Problem . In Proceedings of the American Mathematical Society Volume 7 . 1956 : 48 50 . Rayward-Smith VJ Clare A : On finding Steiner vertices . Networks 1986 16 : 283 294 . .. . .. . Shortest path approximation by Takahashi with modification by Rayward-Smith .. . .. . enter image description here http : i.stack.imgur.com xUjLc.png .. . .. . .. . .. . Kruskal s approximation algorithm with modification by Rayward-Smith .. . .. . enter image description here http : i.stack.imgur.com DIIFf.png .. . .. . .. . .. . Modern More Advanced Approximation Algorithms .. . .. . In biology more recent approaches have treated the problem using the cavity method which has led to a modified belief-propagation method that has shown good accuracy on large-data sets : .. . .. . Bayati M . Borgs C . Braunstein A . Chayes J . Ramezanpour A . Zecchina R . : Statistical mechanics of steiner trees . Phys . Rev . Lett . 101 3 037208 2008 15 . For an application : Steiner tree methods for optimal sub-network identification : an empirical study . BMC Bioinformatics . BMC Bioinformatics 2013 30 14 : 144 . Epub 2013 Apr 30 . In the context of search-engine problems approaches have focused on efficiency for very large-data sets that can be pre-processed to some degree . G . Bhalotia A . Hulgeri C . Nakhe S . Chakrabarti and S . Sudarshan . Keyword Searching and Browsing in Databases using BANKS . In ICDE pages 431 440 . G . Kasneci M . Ramanath M . Sozio F . M . Suchanek and G . Weikum . STAR : Steiner-tree approximation in relationship graphs . In ICDE 09 pages 868 879 2009", "Question : Say I have a directed acyclic graph with N vertices and a subset of the vertices at size M . .. . .. . The M vertices are all marked as visited how can I find all the vertices that all of their predecessors in the graph are visited .. . .. . for example : if there are 4 vertices a b c u and 3 edges a u b u c u and a b c are marked as visited I need to output u . I was thinking of going through all the vertices and for each vertex check all of his predecessors but I think that this isn t much efficient. . .. . Answer : Delete those M vertices from the original graph . This can be done by just removing the outgoing edges from the visited nodes . The nodes that are not in M and that are not reachable from any other vertex have all their predecessors visited in M . If the graph is of the form of an adjacency-matrix then this can be done by just scanning each column and checking whether there is any non-zero entry in it .", "Question : What does relaxation of an edge mean in the context of graph-theory I came across this while studying up on Dijkstra s algorithm for single-source shortest-path . .. . Answer : Relaxing an edge a concept you can find in other shortest-path algorithms as well is trying to lower the cost of getting to a vertex by using another vertex . You are calculating the distances from a beginning vertex say S to all the other vertices . At some point you have intermediate results -- current estimates . The relaxation is the process where you check for some vertices u and v : .. . .. . where est S a is the current estimate of the distance and dist a b is the distance between two vertices that are neighbors in the graph . What you are basically checking in the relaxation process is weather your current estimate from a to b could be improved by diverting the path through c this diversion would be the length of a path from a to c and from c to b .", "Question : If i have the following undirected graph with weighted vertices and edges : enter image description here http : i.stack.imgur.com 00ef1.jpg .. . .. . I am trying to come up with a ruby algorithm to find a best shortest-path within a defined limit sum of edges with the highest value sum of vertices . The start point will also be the ending point . for e.g . finding a path with a maximum of 20 with the highest total value . This problem seems like a np hard problem and it is hard to find the best solution . Is there a modified algorithm of dijkstra I tried using a greedy algorithm but it did not give me a optimal solution . and by using bruteforce on all poosible path will work but it will take very long if the number of nodes increases . Was wondering if there is any combination of algorithms that i can use to improve my solution Thanks . Comment : I don t understand first you say : I am trying to come up with a ruby algorithm to find a best shortest-path within a defined limit sum of edges with the highest value sum of vertices but then you say : finding a path with a maximum of 20 with the highest total value . In the second statement seems like you don t care about the path is the shortest . So do you want the path with the highest value max sum of vertices that compliant the limit sum of edges Is the meaning of best shortest-path what I say above .. . Answer : You can find an example of Djikstra s algorithm here https : github.com mburst dijkstras-algorithm blob master dijkstras.rb . What I would do is add a variable to count the number of vertices in the shortest-path and evaluate if the shortest-path has too many vertices or is too long once determining what the shortest-path even is .", "Question : How can I find iterate over ALL the cycles in a directed-graph from to a given node For example I want something like this : .. . .. . but not : B- C- B Comment : Homework I assume me.utexas.edu bard IP Handouts cycles.pdf http : www.me.utexas.edu bard IP Handouts cycles.pdf not that it s not a valid question : Comment : Note that this is at least NP Hard . Possibly PSPACE I d have to think about it but it s too early in the morning for complexity-theory B- Comment : If your input graph has v vertices and e edges then there are 2 e - v +1 -1 different cycles although not all might be simple cycles . That s quite a lot - you might not want to explicitly write all of them . Also since the output size is exponential the complexity of the algorithm cannot be polynomial . I think there is still no answer to this question . Comment : My best option for me was this : personal.kent.edu rmuhamma Algorithms MyAlgorithms GraphAlgor http : www.personal.kent.edu rmuhamma Algorithms MyAlgorithms GraphAlgor depthSearch.htm .. . Answer : Start at node X and check for all child nodes parent and child nodes are equivalent if undirected . Mark those child nodes as being children of X . From any such child node A mark it s children of being children of A X where X is marked as being 2 steps away . . If you later hit X and mark it as being a child of X that means X is in a 3 node cycle . Backtracking to it s parent is easy as-is the algorithm has no support for this so you d find whichever parent has X . Note : If graph is undirected or has any bidirectional edges this algorithm gets more complicated assuming you don t want to traverse the same edge twice for a cycle ." ] }
[ "yes-answer-long", "yes-answer-short" ]
graph-theory
UNK_RELATION
ionicpopup@popup@107
ionicpopup -- in the ionic-framework the ionic popup service allows programmatically creating and showing @placeholder windows that require the user to respond in order to continue .
{ "confidence": [ 44.07548522949219, 43.68624496459961, 43.36260986328125, 42.294437408447266, 40.67612075805664, 40.58345031738281, 39.92512512207031, 39.92512512207031, 38.913818359375, 38.801883697509766, 38.401309967041016, 38.392059326171875, 37.80262756347656, 37.02758026123047, 37.02758026123047, 37.00703048706055, 36.514793395996094, 36.447547912597656, 36.446083068847656, 36.36614990234375, 36.12089157104492, 35.8271484375, 35.700592041015625, 35.594703674316406, 35.275367736816406, 33.748409271240234, 33.5334358215332, 33.513275146484375, 32.89484786987305, 32.377830505371094, 32.23607635498047, 31.739238739013672, 31.178131103515625, 30.992801666259766, 30.825593948364258, 30.63983917236328, 30.577510833740234, 30.442054748535156, 30.442054748535156, 30.442054748535156, 30.442054748535156, 30.442054748535156, 30.354209899902344, 30.354209899902344, 30.354209899902344, 29.288387298583984, 29.286447525024414, 29.201072692871094, 28.95675277709961, 28.376293182373047, 27.90142059326172, 27.90142059326172, 27.500347137451172, 27.301555633544922, 27.138158798217773, 27.138158798217773, 27.093231201171875, 26.989391326904297, 26.857471466064453, 26.34473991394043, 26.34473991394043, 26.26089859008789, 26.1871337890625, 25.98255157470703, 25.98255157470703, 25.98255157470703, 25.96678924560547, 25.9376220703125, 25.87374496459961, 25.706443786621094, 25.30365753173828, 25.30365753173828, 25.30365753173828, 25.30365753173828, 25.116104125976562, 25.116104125976562, 24.959712982177734, 24.597522735595703, 24.597522735595703, 24.597522735595703, 24.597522735595703, 24.597522735595703, 24.597522735595703, 24.462257385253906, 24.148048400878906, 24.148048400878906, 24.148048400878906, 24.148048400878906, 24.148048400878906, 23.960494995117188, 23.8303279876709, 22.893112182617188, 22.893112182617188, 22.893112182617188, 22.893112182617188, 22.88425064086914, 22.763019561767578, 22.717819213867188, 22.479312896728516, 21.873794555664062 ], "content": [ "In my ionic-framework on click of submit button a confirmation popup opens .", "I m new to ionic-framework .", "Ionic Popup buttons are different they are defined in JS code in the buttons array as part of the popup object see ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup .", "I cannot use ionic modal I must use ionic popup .", "UPDATE : on ionic 1.0.0 this is now possible http : ionicframework.com docs api service ionicPopup .. . .. . showConfirm Options : .. . .. . .. . .. . Yes you can do wathever you want using ionic popup.show and bind the Cancel event .", "I am using Confirm style ionic popup why buttons are not showing in the bottom of the popup .", "I have a popup script that works with a simple Ionic starter .", "I have an ionic popup which works fine on ng-click .", "In my ionic project ionic + angularjs I need to use the ionicPopup kind of box to show the full details of the particular product when user clicks on that product name .", "I would like to make an IONIC popup dialog that consists of popup header popup body and popup button sections .", "I d like to add an ID to ionic popup but apparently it is not possible using the default options provided by the framework .", "I am new at ionic-framework and angular Js .", "And also Xcode is not showing error or exceptions in ionic code .", "I ve tested Ionic popups successfully by setting the popup variable as follows : .. . .. . And in the test :", "I want to remove the title area from the ionic popup completely .", "I am not very new to ionic-framework .", "Ionic Version : 1.x .. . .. . Platform : all .. . .. . I have an ionic app which uses an ionic popover .", "However I am new to ionic .", "Perhaps the ionic popover is not the best solution if I need it to continue scrolling .", "when i click on qty than it will be set on ionicPopup http : i.stack.imgur.com B2zyp.png when i click on qty than it will be set on ionicPopup .. . .. . I want to bind quantity from my database value so how can not bind the value in ionic popup it s possible in ionicPopup", "I m creating an Ionic application with a form and some required fields .", "SO i have my ionic Popup and upon firing enter button from my laptop keyboard it resubmits the form from which fired the ionicPopup and refuses to close .", "How to programmatically close http : ionicframework.com docs api service 24ionicPopup ionicPopup :", "After investigation on the ionic popover.confirm function https : github.com driftyco ionic blob master js angular service popup.js this is not possible to customize it .", "I m using Ionic Slidebox and tried placing it in a slide html template but once I click the popup doesn t work .", "I want to use the datepicker in an ionic popup but the I am unable to select the date because the popup is in front of it .", "Would someone have an idea how to dynamically hide and show buttons in an ionic popup", "I am new to ionic .", "Why dont you use the ionic modal for this", "So in ionic I will have to make sure that on the event where I leave the view that closes the popup if active .", "I created a custom popup in ionic if I change the background-color of popup class from CSS background-color of all other popups is changed .", "It s an ionic app so unfortunately no link .", "This link http : stackoverflow.com questions 32636833 ionic-how-to-use-cssclass-in-ionicpopup might help you - did you not do a google-search first before posting here", "I m using ionic and I m trying to create a multiview popup using ion-slide-box .", "Here s the class I wrote to test that the popup exists and to ensure the text is correct in the header and body : .. . .. . Also check out this site for more on testing Ionic in protractor it talks about how to check to see if the popup exists : http : gonehybrid.com how-to-write-automated-tests-for-your-ionic-app-part-3", "ionicPopup http : ionicframework.com docs api service 24ionicPopup returns promises .", "In my code when I trigger the ionicPopup upon button tap it triggers another ionicPopup but it should close the previous ionicPopup .", "Yes you are absolute right and I shall give ionic modal a try .", "Well I tried ionic modal and made something workable for my case .", "I am on my first big ionic project and am stuck .", "I m implementing Global Error Handling inside an Ionic application .", "How can i load ionic modal in specific content view", "it even has a started template for ionic projects .", "I am building a mobile app with Ionic and AngularJS .", "I am very new to ionic and not a pro with angular .", "As it turns out my actual problem is that the ionicPopup does not support pressing ENTER or go on Android keyboard to close the popup .", "Is there some kind of hook in Ionic or Cordova where this setting can be set", "Please take a look @ ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup", "At least in the latest release of Ionic 1.0.0 you can do the following : .. . .. . Here is the relative documentation http : ionicframework.com docs api service 24ionicPopup .", "I have a function that redirects me to a state while showing a ionicPopup the problem is that in my code this feature can be turned n times and this popup opens n times .", "But I have not found a way to do it natively with Ionic which is a shame .", "I m using jquery UI datepicker widget in my ionic app .", "I used the example given in Ionic docs along with your code : .. . .. . Notice .. . .. . that actually waiting for the confirmPopup.close and then executes what is inside in our case opening new popup .", "When the form is submitted and if it isn t valid I display an alert message using Ionic s ionicPopup service .", "@VanderVidi I cannot think of any good reason why I didn t use ionic modal for this .", ".. . I want create .. . .. . ion-nav-view .. . .. . with specific width and height and put ionic-modal inside it .. . .. . Thanks for yours answer", "ionicPopup was likely written for mobile environments first .", "I m trying to change the width of ionicPopup I ve tried using the following css code to import it onto cssClass : my-popup : .. . .. . But that didn t seem to work .", "I created a project with ionicPopup .", "Ionic Version : 1.x .. . .. . Platform : all .. . .. . ion-toggle button is clickable even after a popup is on .. . .. . http : codepen.io ankitaurfrnd pen JKJprp .. . .. . Toggle button should not be clicked when mask is on .", "Thanks for replay Davide Pastore i wan t bind value in ionic popup in image where quantity is hint text so i want to get quantity value from table", "However in my implementation while it close the final ionicPopup the initial ionicPopup doesnt close rather it hides which causes the app to freeze .", "Why are you injecting ionicPopup inside a config function when you have to inject it in a controller factory service .. . .. . http : ionicframework.com docs api service ionicPopup .. . .. . config function accepts providers you can inject only a provider if at all you need it.. . you could do something like below .", "See also gonehybrid.com http : gonehybrid.com how-to-write-automated-tests-for-your-ionic-app-part-3", "Ionic Popups are just made of DOM elements so you should be able to use normal locators to find test them .", "I found this codepen someone put up : .. . .. . https : codepen.io ionic pen GpCst .. . .. . This may do the trick", "I have a form that is displayed inside http : ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup .", "Maybe you shouldn t use ionicPopup but ionicModal .", "I put the ionicPopup code in a factory .", "try creating factory or service .", "So does that mean we cannot connect buttons to the controller in an ionicPopup", "I want to show an ionicpopup positioned next to a particular div in a view .", "I want to receive an IonicPopup telling me that an error occurred .", "I have an function in an object that obtains data from an ionicPopup dialog .", "Can any one correct me where i caught wrong in implementing Ionic Pop-up with custome template and with ajax response dynamic-content .", "I did some research on internet and found a solution at : a proposed solution to the freeze reference on null problem by mhartington https : github.com driftyco ionic issues 3926 .", "My datepicker directive : .. . .. . .. . .. . My ionic popup code : .. . .. . jQuery UI datepicker : http : api.jqueryui.com datepicker .. . .. . EDIT .. . .. . I solved the datepicker appearing in the background problem by adding .. . .. . to the datepicker input .", "I have even created a blank project and tried to run application using ionic serve command .", "I have even uninstalled the ionic clear the cache and installed everything again but results were same .", "try running an ionic project in the intel-xdk it has a built-in emulator that works a lot better for testing your project .", "I also had some issues with the ionic-cli but intel-xdk makes everything super simple .", "I have an interesting situation where I am polling for a location change on a travelling page in my ionic app .", "In one of my Ionic application I need to check Network connection is available or not on the Device .", "This was working before it popups the alert and upon clicking on my laptop keyboard enter key it closes the popup but now it is not working like that it keeps refreshing and showing the popup .", "Or is there any other way to display the details with the same kind of effect ionicPopup do .", "Has anyone succeeded in using Protractor to detect an ionicPopup alert", "I want to remove the entire title space from the ionicPopup .", "Do you want to inject the quantity from the scope to the IonicPopup", "So if I want to display a success message on that ionicPopup without changing the subtitle .", "I made a tutorial on How to Display Images in a Popover http : devdactic.com images-videos-fullscreen-ionic where I used templates and custom CSS .", "Each list has a ng-click that is suppose to trigger IonicPopup found in one of my controllers : .. . .. . .controller PopTestCtrl function scope ionicPopup Charge .. . .. . scope.status loading : false message : .. . .. . donate for cause causeId scope.charge function causeId .. . .. . That s it in a nutshell .", "I can not understand 100 your question but I guess you need a button within a ionicPopup call a function of the controller", "Is there a way to make sure that all ionicPopups are closed or at least that they close each ionicpopup upon button tap .", "Trying to explain further what is required here is provide angular directives inside of the ionicPopup buttons .", "I want to get users comments via ionicpopup the code is as below : .. . .. . but when Save button is clicked nothing will happen .", "Inspect your element and find its ng-repeat value then .. . .. . var button element by.repeater button in buttons .getText .. . .. . You also need to have the browser sit out somehow for a couple seconds so it doesn t resolve to the tests while the ionic popup isn t actually there .", "I have written simple log statements like Console.log Alert and ionicPopup .", "I took sample code for the IonicPopup http : ionicframework.com docs api service 24ionicPopup and I ve modified the wifi password entry to be a username and password entry .", "After user input in popup input field it will alert the value user wrote .", "I m using the following code for some validation stuff using both ionicPopup and Firebase : .. . .. . But In the case of error and after I get the wrong code alert the popup gets closed as e.preventDefault has been ignored ." ] }
{ "confidence": [ 64.94883728027344, 61.382625579833984, 59.57017135620117, 59.19899368286133, 58.92850112915039, 58.036319732666016, 57.99921417236328, 56.33566665649414, 56.02334213256836, 53.34886932373047, 53.291282653808594, 52.335304260253906, 51.99496841430664, 51.115997314453125, 50.40718460083008, 47.77325439453125, 47.5789680480957, 46.558258056640625, 45.06458282470703, 44.33220672607422 ], "content": [ "Question : null .. . Answer : I have a popup script that works with a simple Ionic starter . I m using Ionic Slidebox and tried placing it in a slide html template but once I click the popup doesn t work . My index.html : .. . .. . My poptest.html is a basic layout ion-view ion-content ion-list . Each list has a ng-click that is suppose to trigger IonicPopup found in one of my controllers : .. . .. . .controller PopTestCtrl function scope ionicPopup Charge .. . .. . scope.status loading : false message : .. . .. . donate for cause causeId scope.charge function causeId .. . .. . That s it in a nutshell . Comment : We need to see some code in order to help you out . Comment : Added the code .", "Question : null .. . Answer : I m new to ionic-framework . I have a problem . I have a function that redirects me to a state while showing a ionicPopup the problem is that in my code this feature can be turned n times and this popup opens n times . I want only open once and will not open until it is closed . How can I do it . Comment : Is your problem resolved or did you found root cause of issue", "Question : I am on my first big ionic project and am stuck . Would someone have an idea how to dynamically hide and show buttons in an ionic popup I need the buttons to initially be hidden but then after something happens the buttons should show up . Any idea how to get that done Trying to explain further what is required here is provide angular directives inside of the ionicPopup buttons . eg .. . .. . But ng-disabled user.length 1 gets trimmed when the pop-up is rendered . Comment : can you post what you currently have Comment : and what is after something happens. . what action like. . Comment : Hi PriceG the mahasagar . I am implementing code from here : github.com lkatney ProfileImageUpload-AngularJS https : github.com lkatney ProfileImageUpload-AngularJS . The plugin module opens popup and then asks the user to select a file using a hidden input-type-file .. . tag . A chosen file is then drawn directly into the opened popup pane . After the image draw is done onLoadDone call I would like to show the popup buttons with specific action options . These buttons and these actions should not be available or visible before the drawing is complete . Comment : appologies for the typo PrinceG .. . Answer : It should be easy using scope variables and ng-hide ng-show .. . .. . The button will only display if scope.it happened true Comment : thanks much errata but that is not what I asked about . Your answer is for binding regular html buttons or elements to angular . Ionic Popup buttons are different they are defined in JS code in the buttons array as part of the popup object see ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup . Each element in the buttons array is an object with text type which is a class and an onTap function . What we need is a way to bind them to the rest of the JS Angular code do ng-hide or ng-show or to otherwise change their style AFTER the popup object was launched by popup.show .", "Question : when i click on qty than it will be set on ionicPopup http : i.stack.imgur.com B2zyp.png when i click on qty than it will be set on ionicPopup .. . .. . I want to bind quantity from my database value so how can not bind the value in ionic popup it s possible in ionicPopup any help thanks in advance Comment : Your question is not so clear . Can you elaborate better it and explain what you expect Comment : Thanks for replay Davide Pastore i wan t bind value in ionic popup in image where quantity is hint text so i want to get quantity value from table Comment : Do you want to inject the quantity from the scope to the IonicPopup Or otherwise Comment : yes i use scope varable DAVIDE PASTORE .. . Answer : You can do it . This is the content of your controller : .. . .. . This is the template : Comment : Thanks it s work for me Davide Pastore", "Question : In my ionic project ionic + angularjs I need to use the ionicPopup kind of box to show the full details of the particular product when user clicks on that product name . But I was trying to custmozing the popup I couldn t . Even I tried with templateUrl : templates example.html . But I didn t get the expected results . I need to show the product s details with a width of 75 and a height of 75 . Or is there any other way to display the details with the same kind of effect ionicPopup do . Please help me out . Comment : For customising I use css . It is interesting to know different methods to solve this problem Comment : How Could u explain this Comment : As whole page is HTML so you can add css to pop-up box . If you inspect element of the pop-up box then you will see different classes like popup and popup head . Now you just need to add specific style for each classes as per you need . Make those styles as Important for overriding original styles . Comment : for showing the details Do i have to use template or templateUrl Because now I am using as separate html page and I use templateUrl . But I am not retrieving the data from the controller to my popup . Comment : If you getting that html tags you can manage css and if problem is solved by model then don t use css because this may change other integration . .. . Answer : Maybe you shouldn t use ionicPopup but ionicModal . I made a tutorial on How to Display Images in a Popover http : devdactic.com images-videos-fullscreen-ionic where I used templates and custom CSS . This could work for you as well In your case you might want to call .. . .. . Additional you should wrap your template HTML in .. . .. . where closeModal closes the modal view . Finally add some CSS styling for your 75 height and width . Comment : Thanks a lot for ur response . I will try and get back soon", "Question : SO i have my ionic Popup and upon firing enter button from my laptop keyboard it resubmits the form from which fired the ionicPopup and refuses to close . why is this so This was working before it popups the alert and upon clicking on my laptop keyboard enter key it closes the popup but now it is not working like that it keeps refreshing and showing the popup . .. . Answer : ionicPopup was likely written for mobile environments first . Looking at their template you can see there s not logic to take focus away and allow enter keys .. . .. . My suggestion and What I m working on is rewriting the popup and adding some logic to 1 steal focus and 2 allow enter key on the button .. . .. . see http : stackoverflow.com a 21534977", "Question : I have an interesting situation where I am polling for a location change on a travelling page in my ionic app . When the App detects a location change is by a certain location it invokes an ionicPopup.show alert to see what the user wants to do about it . My problem is there is a button on the page to move to another state and cancel the location poll but if this is pressed at the same time the popup is being invoked which is easier to do than you think the popup remains in view but does not contain the buttons to dismiss it . Meanwhile the state has changed in the background to the new page . What I m looking for is a way to avoid these both happening at the same time is there a way I can clear any active ionicPopup s when the button is pressed .. . Answer : How to programmatically close http : ionicframework.com docs api service 24ionicPopup ionicPopup : Comment : Thanks Vidul but im more looking for a way to close any popups that are open eg ionicPopup.closeAll as my ionicpPopup.show is in an interval function Comment : actually in saying that I could have a variable set outside of the interval which is assigned the ionicPopup promise each loop of the interval and then that could be cancelled on button click . Thanks for your help Comment : @SM3RKY My pleasure .", "Question : I m using ionicPopup.confirm but I would like to change cancel s button text . Is it possible to do so I m aware of .show syntax : .. . .. . But it does not seem to work with .confirm .. . Thank 4 the help .. . Answer : UPDATE : on ionic 1.0.0 this is now possible http : ionicframework.com docs api service ionicPopup .. . .. . showConfirm Options : .. . .. . .. . .. . Yes you can do wathever you want using ionic popup.show and bind the Cancel event . After investigation on the ionic popover.confirm function https : github.com driftyco ionic blob master js angular service popup.js this is not possible to customize it . The value of popover.confirm are hardcoded line 446", "Question : I m implementing Global Error Handling inside an Ionic application . I want to receive an IonicPopup telling me that an error occurred . For the errorExceptionHandler I created a new config based on an existing solution that holds an alert as Global Error Handling . This immediately resulted into the following error . angular.js : 68 Uncaught Error : injector : modulerr Failed to instantiate module app due to : Error : injector : unpr Unknown provider : ionicPopup .. . .. . What am I missing here Comment : try creating factory or service . .. . Answer : Why are you injecting ionicPopup inside a config function when you have to inject it in a controller factory service .. . .. . http : ionicframework.com docs api service ionicPopup .. . .. . config function accepts providers you can inject only a provider if at all you need it.. . you could do something like below .", "Question : Has anyone succeeded in using Protractor to detect an ionicPopup alert I ve tried all the workarounds suggested here https : github.com angular protractor issues 1486 but no luck . I need Protractor to detect the alert and check the text in the alert . Comment : Could you provide a reproducible example using a public site .. . Answer : I ve tested Ionic popups successfully by setting the popup variable as follows : .. . .. . And in the test : Comment : Thanks very much This worked . See also gonehybrid.com http : gonehybrid.com how-to-write-automated-tests-for-your-ionic-app-part-3", "Question : In my code when I trigger the ionicPopup upon button tap it triggers another ionicPopup but it should close the previous ionicPopup . However in my implementation while it close the final ionicPopup the initial ionicPopup doesnt close rather it hides which causes the app to freeze . Is there a way to make sure that all ionicPopups are closed or at least that they close each ionicpopup upon button tap . This is a codepen of my code http : codepen.io anon pen dYVdJv .. . .. . once execution of code is complete i get this when i check my code .. . .. . this is actually the popup opened in the first ionicPopup.show the second ionicPopup.show gets closed . Dont know why the first one only gets hidden instead of closed . .. . Answer : Here is an working example . I used the example given in Ionic docs along with your code : .. . .. . Notice .. . .. . that actually waiting for the confirmPopup.close and then executes what is inside in our case opening new popup . Comment : timeout is the most important piece of code here . Thanks for sharing .", "Question : Has anyone succeeded in using Protractor to detect an ionicPopup alert I ve tried all the workarounds suggested here https : github.com angular protractor issues 1486 but no luck . I need Protractor to detect the alert and check the text in the alert . Comment : Could you provide a reproducible example using a public site .. . Answer : Here s the class I wrote to test that the popup exists and to ensure the text is correct in the header and body : .. . .. . Also check out this site for more on testing Ionic in protractor it talks about how to check to see if the popup exists : http : gonehybrid.com how-to-write-automated-tests-for-your-ionic-app-part-3 Comment : Perfect answer This completely answers my question including how to check for the text in both header and body all wrapped in a nice generic utility class . Thanks", "Question : I am new to ionic . I have written simple log statements like Console.log Alert and ionicPopup . nothing is working in Xcode . The same things are working in Android . My question is how to implement this in Xcode Version - 7.3.1 . .. . Answer : Main Problem was with plugging Cordova.js and ngCordova.js which was giving me an error . And also Xcode is not showing error or exceptions in ionic code . Also unable to debug nothing can be traced . Now correcting my js files I am able to get alert popups .", "Question : I am new at ionic-framework and angular Js . I am using Confirm style ionic popup why buttons are not showing in the bottom of the popup . Here is the updated codepen . Please help me I am having this issue since a long . Any help would be appreciated . .. . Answer : Here : I have updated the code pen though everything is correct but sometimes the popup works differently . All you need to do is .. . .. . EDIT : Well the functionality that you want should be done in a ionicModal but since you want to do it in ionicPopup . PS : you shouldn t use ion-content in a pop-up . Just a info . I have updated the Code-Pen http : codepen.io anon pen rVPJbG : Comment : where you have given this CSS Comment : same place where you have given .popup width : 90 important height : 90 max-height : 90 important mark it as accepted answer Comment : thanks for your answer . I have seen that but you have not used anywhere in html or .js file . That was my question . It worked but not expected i think its popup problem . I will upload screenshot again Comment : Here I can see buttons at bottom part but My list data appears behind buttons in scroll mode . Shall I do something like Footer bar here Which would make these two buttons as like footer bar and my list or main content will be reside between top header bar Accordian List text has been written and footer bar two buttons . Comment : did it work", "Question : I have a form that is displayed inside http : ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup . The issue is that when cursor is placed inside the final input text area the keyboard shows but the input doesn t scroll back into view and is obscured by the keyboard . The user has to scroll down . I am using an android device . The documentation http : ionicframework.com docs api page keyboard says .. . .. . Ionic will attempt to prevent the keyboard from obscuring inputs and focusable elements when it appears by scrolling them into view . In order for this to work any focusable elements must be within a Scroll View or a directive such as Content that has a Scroll View . If I wrapped the form with ion-content tag the input box does scroll back into view but using messes up with my layout and am looking for another solution . Update : How the manifest lookslike Comment : I had the same problem http : stackoverflow.com questions 31353335 keyboard-hiding-edittexts-in-fragments and solved it here http : stackoverflow.com a 31405304 3956566 not sure if this will help . Let me know . .. . Answer : If you are using cordova keyboard you can Use cordova.plugins.Keyboard.disableScroll false when the popup open and use cordova.plugins.Keyboard.disableScroll true when it closes . this way the layout can handle overlapping keyboard in case of using popups . Comment : Am not using cordova keyboard", "Question : null .. . Answer : I took sample code for the IonicPopup http : ionicframework.com docs api service 24ionicPopup and I ve modified the wifi password entry to be a username and password entry . It works as expected but if you click the Login button without entering a username or password all that happens is e.preventDefault . Is there a way I can add an animation to the popup perhaps a shake animation if either field is left blank Comment : I m having the same problem . Did you get the answer Comment : Nope I moved on since this was more UX than functionality might have to include some sort of animation library to shake the box . I ve read many posts advising against including jQuery but I know the jQuery UI has a lot of animations might have luck with that or something else.. . Comment : But I have not found a way to do it natively with Ionic which is a shame . Comment : Thanks for the answer .", "Question : I m creating an Ionic application with a form and some required fields . When the form is submitted and if it isn t valid I display an alert message using Ionic s ionicPopup service . My problem is : the user can press ENTER or Go button within Android to both invoke form submission and close the popup which causes another popup to open . You can see this happening here : .. . .. . Sample Code http : play.ionic.io app cc24eac76ae1 .. . .. . Focus the input press ENTER and when the error message is displayed press ENTER again to close it . Another popup will open most likely because the input behind the backdrop still has focus or maybe because the modal is created within the form - having ENTER invoke submit again . Is there any way to avoid that behavior Maybe the ENTER within the ionicPopup to close it without submitting the form again or at least having some code to close any active popups before displaying a new one Because when you open multiple popups if you try the mouse or tap to close a message the user is prompted to then close all other dialogs before being sent back to the main screen . I know I could try to get the reference to the popup and call the close method but it didn t quite work for me . Eventually the new alert opens before the previous one is fully closed and the backdrop gets stuck on the screen forever . Thanks for helping . Comment : you need to lose focus from the controls so when press enter will response to alert only Comment : I ve found out it doesn t work . Turns out the actual problem is that the popup cannot be closed by pressing enter . When I press enter the second time I m actually submitting the form again . Hence opening another popup . And I m struggling taking the focus out of the form because my page does not have any visible controls other than the form controls login page for example . .. . Answer : As it turns out my actual problem is that the ionicPopup does not support pressing ENTER or go on Android keyboard to close the popup . For some reason I tried to take the focus out of the inputs but it didn t work . For anyone with the same problem I ended up creating an angular-directive to close the device keyboard when the form is submitted . Here s the directive code : .. . .. . then I used it on the form tags like this : .. . .. . Obviously the problem still happens when testing directly on the browser but works when deploying to the devices . Comment : I think you don t need to use platform ready in the code . it will execute every time rather in your the app.js once you include that keyboard instance you can use that throughout and you can check if keyboard is shown then hide . Also we can use single vairable for multiple instance of popups hide the first intance and open other by assigning new one . Remember always close any popups popover when controller scope gets destroyed. .", "Question : I m trying to change the width of ionicPopup I ve tried using the following css code to import it onto cssClass : my-popup : .. . .. . But that didn t seem to work . I ve really got stuck there and currently unable to find a solution . Any help will be much appreciated . Thank you . .. . Answer : This link http : stackoverflow.com questions 32636833 ionic-how-to-use-cssclass-in-ionicpopup might help you - did you not do a google-search first before posting here A quick google-search gave me that . Comment : I tried that solution and for me width was never applied . So for example : - ugh - forgot that enter submitted . Give me a sec to get the codepen url . Comment : So check this CodePen - the title mod works but not the width : codepen.io cfjedimaster pen jrONXx http : codepen.io cfjedimaster pen jrONXx Comment : I have done it for you in the codepen . You have to put width : 100 important so that the width can override the default styling . Please check it out . Comment : Got a new URL for that CodePen I ll put a comment on the link you sent too . Comment : Apologies here you go : codepen.io anon pen mEdboR http : codepen.io anon pen mEdboR", "Question : I have a form that is displayed inside http : ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup . The issue is that when cursor is placed inside the final input text area the keyboard shows but the input doesn t scroll back into view and is obscured by the keyboard . The user has to scroll down . I am using an android device . The documentation http : ionicframework.com docs api page keyboard says .. . .. . Ionic will attempt to prevent the keyboard from obscuring inputs and focusable elements when it appears by scrolling them into view . In order for this to work any focusable elements must be within a Scroll View or a directive such as Content that has a Scroll View . If I wrapped the form with ion-content tag the input box does scroll back into view but using messes up with my layout and am looking for another solution . Update : How the manifest lookslike Comment : I had the same problem http : stackoverflow.com questions 31353335 keyboard-hiding-edittexts-in-fragments and solved it here http : stackoverflow.com a 31405304 3956566 not sure if this will help . Let me know . .. . Answer : Add this into your Activity in AndroidMenifest Comment : This setting is already in there", "Question : I have a form that is displayed inside http : ionicframework.com docs api service ionicPopup http : ionicframework.com docs api service 24ionicPopup . The issue is that when cursor is placed inside the final input text area the keyboard shows but the input doesn t scroll back into view and is obscured by the keyboard . The user has to scroll down . I am using an android device . The documentation http : ionicframework.com docs api page keyboard says .. . .. . Ionic will attempt to prevent the keyboard from obscuring inputs and focusable elements when it appears by scrolling them into view . In order for this to work any focusable elements must be within a Scroll View or a directive such as Content that has a Scroll View . If I wrapped the form with ion-content tag the input box does scroll back into view but using messes up with my layout and am looking for another solution . Update : How the manifest lookslike Comment : I had the same problem http : stackoverflow.com questions 31353335 keyboard-hiding-edittexts-in-fragments and solved it here http : stackoverflow.com a 31405304 3956566 not sure if this will help . Let me know . .. . Answer : You have to set android : windowSoftInputMode adjustResize in the manifest to the Application or to the Activity . And check whether you set something like getWindow .setSoftInputMode .. . in your Activity . If so remove those lines . Comment : Please take a look at the manifest in my question . That settings is already there . Comment : yes . I had a look and its set in only one Activity not in Application . how do i know thats the Activity where the keyboard problem presents . Comment : So should I add that setting each Activity tag This file is generated and isn t manually put together . I think cordova generates this file for us . Is there some kind of hook in Ionic or Cordova where this setting can be set" ] }
[ "yes-answer-long", "yes-answer-short" ]
popup
UNK_RELATION
fseek@ansi-c@49
fseek -- fseek is a c function belonging to the @placeholder standard-library and included in stdio.h .
{ "confidence": [ 43.890899658203125, 41.63212203979492, 41.37101364135742, 40.98477554321289, 40.55280303955078, 40.308143615722656, 40.26618957519531, 40.19492721557617, 39.64677429199219, 39.0873908996582, 39.0873908996582, 39.0873908996582, 39.0873908996582, 39.0873908996582, 38.11499786376953, 37.50690841674805, 37.50480651855469, 37.50480651855469, 37.50480651855469, 37.50480651855469, 37.50480651855469, 36.931888580322266, 36.931888580322266, 36.931888580322266, 36.82868194580078, 36.82303237915039, 36.476966857910156, 36.47486114501953, 35.5273551940918, 35.51697540283203, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.37937927246094, 35.240447998046875, 34.34943771362305, 34.34943771362305, 34.34943771362305, 34.05288314819336, 34.05288314819336, 34.05288314819336, 34.05288314819336, 34.05288314819336, 34.05288314819336, 34.05288314819336, 34.05288314819336, 34.04035186767578, 33.41391372680664, 33.39830780029297, 33.39830780029297, 33.39347457885742, 33.285667419433594, 33.285667419433594, 33.115020751953125, 33.115020751953125, 33.07661437988281, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.50037384033203, 32.16537857055664, 31.992595672607422, 31.973960876464844, 31.883968353271484, 31.470428466796875, 31.470428466796875, 31.470428466796875 ], "content": [ "Steve Jessop and I showed that using fseek is slower and if you are using the GNU C library fseek is a lot slower .", "en.cppreference.com w c io fseek http : en.cppreference.com w c io fseek", "The GNU C library makes a system call at every fseek .", "In principle fseek http : www.cplusplus.com reference cstdio fseek kw fseek should be fast .", "fseek or fflush require the library to commit buffered operations .", "For every non-french speaking here : php.net fseek http : php.net fseek", "Since C++ inherits fseek and SEEK END from C I m quoting the C standard here : .. . .. . C11 ISO IEC 9899 : 201x 7.21.9.2 The fseek function section 3 .. . .. . A binary stream need not meaningfully support fseek calls with a whence value of SEEK END .", "From the man page http : linux.die.net man 3 fseek for fseek .. . .. . .. . fgetpos fseek fsetpos return 0 and ftell returns the current offset .", "The problem i face is that fseek shows not responds with a result to have an infinite-loop while feof fp in function Counter .By replacing the fseek with a fgetc the programm works fine.My my question is what is going wrong with the fseek .", "I m having trouble with fseek .", "Is fseek working in this mode", "fseek takes three parameters .", "Is fseek returning an error", "then why two fseek are required", "That said to detect the error in fseek itself you should be checking the return-value of fseek for success or error .", "Look into your stdio.h : .. . .. . So after preprocessing your fseek f 0 SEEK END becames fseek f 0 2 and compiler will see 2 instead of meaningful name .", "Second why is fseek returning null", "And the second move is done manually by fseek .", "To fix this simply remove the fseek statement .", "Try and remove the latter fseek and check", "And stdin is never supposed to work with fseek .", "In case fseek is failure it will set the errno variable .", "If the fopen returns NULL fseek has undefined behaviour .", "The offset argument of fseek is required to be a long not a long-long .", "The reason to not use fstat is that fstat is POSIX but fopen ftell and fseek are part of the C Standard .", "Will fseek modify f", "The man page for fseek 3 says the definition is : .. . .. . fseek FILE stream long offset int whence .. . .. . For your use-case whence must be set to a constant SEEK CUR defined in stdio.h .", "Your usage of fseek seems wrong .", "This prints : .. . .. . The code above includes my variable initializations for the fseek function .", "You should note however that ANSI C does require fseek or another positioning function .", "Maybe you don t need fseek at all", "The issue here appears because of the fseek SEEK CUR parameter .", "A solution may be to completely remove the fseek call .", "I put fseek outside the for-loop and it works", "Your problem is that you are not using fseek correctly .", "Please note that the argument to fseek is bytes not lines .", "What could cause that weird behaviour with fseek", "I tried using fseek as shown below .", "Open with append : .. . .. . then just write to pFile2 no need to fseek .", "Clearly fseek pt 0 SEEK CUR is making the difference .", "Why isn t fseek with SEEK SET working in append mode", "fseek only sets the read pointer in this mode .", "Is using fseek to backtrack character fscanf operations reliable", "If given the choice you should use fseek .", "Who says you re not allowed to use fseek", "Seems odd to bar fseek yet allow rewind .", "Checking the return of fseek would be appropriate .", "I am currently using fseek in program .", "What is the purpose of fseek ptr sizeof Triangolo SEEK SET", "fwrite will do the job of fseek f 1 SEEK CUR", "so the EBADF return code referenced below is an error condition on the fseek .", "if you call fseek on null-pointer then user will hit a segfault. .", "Also to use fseek it is generally advisable to open the file in binary mode .", "You can use a loop instead to fseek necessary bytes .", "So x must fit into a long else don t use fseek .", "Do mind that input of fseek is a long int rather then a normal int .", "Consider using fseek fp 0 SEEK END combined with ftell .", "This means that file-pointer opened with a mode will ignore operations performed with fseek .", "If you would like to append to an existing file initially but then fseek to arbitrary place use r+ followed by fseek f 0 SEEK END .", "POSIX defines data in between to be zero bytes : http : www.unix.com man-page POSIX 3posix fseek .. . .. . The fseek function shall allow the file-position indicator to be set beyond the end of existing data in the file .", "@kevingomes : The use of fseek here - The C standard requires a positioning operation between a read and a write operation on an update stream or between a write and a read .", "The use of fseek here - The C standard requires a positioning operation between a read and a write operation on an update stream or between a write and a read .", "Then I search the ID in the file and if he wants to change the surname I move the FSEEK to -1 for the name I move the FSEEK to -2 or I move the FSEEK to +1 if he wants to change the age .", "Moral of the story : standard I O buffering doesn t cut it in my implementation the performance of fseek is atrocious as the questioner says .", "Actually it could be that the standard I O is doing the read ahead but a too-simple implementation of fseek is discarding the buffer every time .", "That sounds like an fseek kinda deal right", "Replacement of a string of the same size can by fseek .", "I need to add LFS to a C process which uses fseek .", "How do I read a file backwards line by line using fseek", "I solved.Problem was in fseek that started from 1 instead of zero .", "Also my fseek fp 0 SEEK END is returning NULL for some reason .", "fseek .. . is supposed to return 0 NULL on success so that is perfectly understandable .", "If I remove the comments from either fseek or rewind or fscanf the program runs .", "I even tried setting fseek manually but it just wouldn t move .", "If you re reading through the file sequentially why bother with fseek at all", "So you should use both fseek and ftell in your program or none", "However nothing forbids or allows fseek to behave the same way .", "I have a bad performance running fseek . . in a very big file .", "Second fopen fseek fread are the wrong tools for this access pattern .", "Also fseek may not work on stdin and it s unnecessary for your purpose .", "When I change to fseek pFile 7 SEEK SET it does not return anything .", "When I change to fseek pFile 10 SEEK SET it returns 195 0 .", "When I change to fseek pFile 7 SEEK SET it does not return anything .", "If the position to read the record by fseek Record must be a fixed length .", "@alk The man page for fseek did not mention that the file could not be open with a .", "fseek takes over 20s even though the data is already in disk cache .", "incrediman s fundamental suggestion to use a read buffer is vital since fseek is appalling .", "I traced it the sucker makes a system call on every fseek .", "If you open a file with a or a+ it will append to the end regardless of fseek or rewind .", "fseek infile -10 SEEK CUR would make bring it short by 1 character .", "Using fseek has the advantage that it will work on block device files", "As a result there is nothing we can do to fix this with regard to fseek SEEK END .", "On linux at least you could use lseek64 instead of fseek .", "http : en.cppreference.com w c io fseek .. . .. . POSIX allows seeking beyond the existing end of file .", "This is documented in the C standard 7.19.5.3 fopen : .. . .. . Opening a file with append mode a as the first character in the mode argument causes all subsequent writes to the file to be forced to the then current end-of-file regardless of intervening calls to the fseek function .", "Because the file is big I wish to use fseek and fgets write a function that can return an arbitrary line in the file .", "Reading 200MB takes .. . .. . 0.15s without using fseek BUFSZ is 30k .. . 0.57s using fseek .. . .. . Repeated measurements show that without fseek using sfio still shaves about 10 off the run time but the run times are very noisy almost all time is spent in the OS .", "Again open the file twice to avoid having to fseek between reads and writes .", "But what with fseek fsetpos and rewind dropping the effect of the previous calls to ungetc", "@s7amuser i thought that I could read the file from the start with that fseek ." ] }
{ "confidence": [ 52.34857940673828, 50.55388259887695, 49.42683792114258, 48.97816848754883, 48.590476989746094, 47.82956314086914, 47.781517028808594, 47.723876953125, 47.516788482666016, 47.04534149169922, 47.034061431884766, 47.02065658569336, 45.56088638305664, 44.002540588378906, 43.79370880126953, 43.75712203979492, 43.753238677978516, 43.603607177734375, 43.51697540283203, 43.51697540283203 ], "content": [ "Question : This question already has an answer here : .. . .. . How do you determine the size of a file in C questions 8236 how-do-you-determine-the-size-of-a-file-in-c 13 answers .. . .. . My question is simple : .. . .. . Should I use fseek with SEEK END to get to the end of a file and then get the length of it Because in the man it is said : .. . .. . Library implementations are allowed to not meaningfully support SEEK END therefore code using it has no real standard portability . Right now I am using stat from C which is better Comment : You mention stat and man so is it safe to assume you are using Linux or some other Unix Do you care about other platforms Comment : This question is good but the way you phrased it makes it heavily opinion based and leads to discussions which is not desirable . Comment : See securecoding.cert.org confluence display seccode https : www.securecoding.cert.org confluence display seccode FIO19-C.+Do+not+use+fseek 28 29+and+ftell 28 29+to+compute+the+size+of+a+regular+file . .. . Answer : Since C++ inherits fseek and SEEK END from C I m quoting the C standard here : .. . .. . C11 ISO IEC 9899 : 201x 7.21.9.2 The fseek function section 3 .. . .. . A binary stream need not meaningfully support fseek calls with a whence value of SEEK END .", "Question : i make this simple C program whose purpose is to count the characters that are in a text file which is given through the second command-line argument . The problem i face is that fseek shows not responds with a result to have an infinite-loop while feof fp in function Counter .By replacing the fseek with a fgetc the programm works fine.My my question is what is going wrong with the fseek . Thanks in advance . Comment : Use constant SEEK CUR instead of 1 it makes the code clearer . Comment : I have used it with the same result Comment : See Why is while feof file always wrong http : stackoverflow.com questions 5431941 why-is-while-feof-file-always-wrong . Comment : Consider using fseek fp 0 SEEK END combined with ftell . Comment : Yes fseek fp 0 SEEK END cntr ftell will give you what you re expecting . .. . Answer : It is allowed and well defined behaviour to seek beyond the end of a file . That s why fseek does not set the end-of-file indicator it even more unsets it on success . From the C Standard http : port70.net nsz c c11 n1570.html 7.21.9.2 : .. . .. . 5 After determining the new position a successful call to the fseek function .. . clears the end-of-file indicator for the stream and then establishes the new position . Comment : Good catch I have seen code where you can write a byte fseek 1 GB further and write another byte leading to the file system seeing a 1 GB file fitting on a 256 MB disk .", "Question : I m not being able to understand it aren t we supposed to have SEEK CUR SEEK SET or SEEK END in the whence Why does it have 2 and how does it work like this .. . Answer : Look into your stdio.h : .. . .. . So after preprocessing your fseek f 0 SEEK END becames fseek f 0 2 and compiler will see 2 instead of meaningful name . As result we can avoid this name at all and put numerical value right now .", "Question : I ve read posts that show how to use fseek and ftell to determine the size of a file . I was about to use this technique but then I ran into this link https : www.securecoding.cert.org confluence display seccode FIO19-C.+Do+not+use+fseek 28 29+and+ftell 28 29+to+compute+the+size+of+a+file that describes a potential vulnerability . The link recommends using fstat instead . Can anyone comment on this .. . Answer : According to C standard 7.21.3 http : www.open-std.org jtc1 sc22 wg14 www docs n1570.pdf : .. . .. . Setting the le position indicator to end-of- le as with fseek file 0 SEEK END has unde ned behavior for a binary stream because of possible trailing null characters or for any stream with state-dependent encoding that does not assuredly end in the initial shift state . A letter-of-the-law kind of guy might think this UB can be avoided by calculating file size with : .. . .. . But the C standard also says this : .. . .. . A binary stream need not meaningfully support fseek calls with a whence value of SEEK END . As a result there is nothing we can do to fix this with regard to fseek SEEK END . Still I would prefer fseek ftell instead of OS-specific API calls .", "Question : Q : I m trying to update a file in-place by using fopen mode r+ reading a certain string and writing back a modified string but it s not working . .. . A : Be sure to call fseek before you write both to seek back to the beginning of the string you re trying to overwrite and because an fseek or fflush is always required between reading and writing in the read-write + modes . .. . .. . My question is why fseek or fflush is always required between reading and writing in the read-write + modes Section 5.2 of c traps and pitfall mentioned that it is because of backward compatibility issue . Any one can explain in details Thanks . Comment : c traps and pitfalls is over 20 years old - do you really need to be backward compatible with stuff that was old 20 years ago Comment : Even if the book is 20 years old those rules still stand . .. . Answer : The library buffers input and output operations . Check out setvbuf and the IOFBF IOLBF parameters to that funktion . fseek or fflush require the library to commit buffered operations . The standard specifies a seek or flush operation as mandatory to allow the library some shortcuts otherwise for every I O operation the lib would have to check if the previous operation was also a read op or a write op and trigger a flush by itself if the direction of the I O changed .", "Question : Is using fseek to backtrack character fscanf operations reliable Like for example if I have just fscanf-ed 10 characters but I would like to backtrack the 10 chars can I just fseek infile -10 SEEK CUR For most situations it works but I seem to have problems with the character M . Apparently fseek registers it as a char but fscanf doesn t register it thus in my previous example a 10 char block containing a M would require fseek infile -11 SEEK CUR instead . fseek infile -10 SEEK CUR would make bring it short by 1 character . Why is this so Edit : I was using fopen in text mode .. . Answer : You re seeing the difference between a text and a binary file . When a file is opened in text mode no b in the fopen second argument the stdio library may indeed must interpret the contents of the file according to the operating-system s conventions for text-files . For example in Windows a line ends-with r n and this gets translated to a single n by stdio since that is the C convention . When writing to a text file a single n gets output as r n . This makes it easier to write portable C programs that handle text-files . Some details become complicated however and fseeking is one of them . Because of this the C standard only defines fseek in text-files in a few cases : to the very beginning to the very end to the current position and to a previous position that has been retrieved with ftell . In other words you can t compute a location to seek to for text-files . Or you can but you have to take care of the all the platform-specific details yourself . Alternatively you can use binary files and do the line-ending transformations yourself . Again portability suffers . In your case if you just want to go back to where you last did fscancf the easiest would be to use ftell just before you fscanf . Comment : Thanks I didn t know about ftell.. . definitely a better way to implement than to fseek manually", "Question : I m trying to append the contents of a file myfile.txt to the end of a second file myfile2.txt in c . I can copy the contents but I can t find a way to append . Here s my code : .. . .. . I don t think I m using fseek correctly but what I m trying to do is call fseek to put the pointer at the end of the file then write at the location of that pointer instead of at the beginning of the file . Is this the right approach Comment : In addition to the answers below Your fseek idea ought to work but since you use SEEK END the pointer is already at the very end-- and then you go back 100 characters . Use 0 for the offset and it ought to work . Minor : you check if your reading file can open but not your writing file . Check both . .. . Answer : Open with append : .. . .. . then just write to pFile2 no need to fseek . Comment : You should note however that ANSI C does require fseek or another positioning function . Comment : @Wyatt8740 : where My standard says : Opening a file with append mode a as the first character in the mode argument shall cause all subsequent writes to the file to be forced to the then current end-of-file regardless of intervening calls to fseek . Granted that is not ANSI C it is ISO C . Comment : from GNU s man fopen : Note that ANSI C requires that a file positioning function intervene between output and input unless an input operation encounters end-of-file . Looks like I read it wrong though it s only when alternating between input and output . Comment : @Wyatt8740 : that s fair enough and that s my experience as well . Although I think if I was reading and writing at the same time I would probably use lower-level interfaces than stdio .", "Question : I wish to open a file using the a+b mode i.e . if it does not exist it is created automatically but if it does I don t want to overwrite it . I want to be able to read and write to the file . The file is binary and I want to save records of a specific struct in it . So I want to do fseek to the record I want and then save the record using fwrite . The code looks as follows MyRecord is a typedef to a struct while FILENAME is a define to the file s name : .. . .. . However this code just appends the record to the end of the file even if I set pos to 0 . Why isn t fseek with SEEK SET working in append mode I know I can simply open it with r+b and if it fails open it with wb but I want to know why this doesn t work and why fseek with SEEK SET is leaving the file-pointer at the end . Any references to places where this behaviour is documented appreciated because I couldn t find any or I am using the wrong keywords . .. . Answer : That s because in a mode writing to the FILE always appends to the end . fseek only sets the read pointer in this mode . This is documented in the C standard 7.19.5.3 fopen : .. . .. . Opening a file with append mode a as the first character in the mode argument causes all subsequent writes to the file to be forced to the then current end-of-file regardless of intervening calls to the fseek function . Comment : Thanks the answer I needed .", "Question : Part of Code 1 : - .. . .. . Part of Code 2 : - .. . .. . I want to replace next character after every space in a file . That file is pointed by the pointer pt . Both the code shows no error and runs fine but when I externally opens the .txt file first code did nothing whereas the second code replaces the next character after space successfully . Clearly fseek pt 0 SEEK CUR is making the difference . So I am unable to understand that what it is doing in the second code Comment : Are you sure it s fputc z ft and not fputc z pt in the 2nd code Comment : @AndyFaizan : oops sorry...My mistake That was pt Comment : @kevingomes : The use of fseek here - The C standard requires a positioning operation between a read and a write operation on an update stream or between a write and a read . This is a positioning operation between a write and a read . It is not a no-op it places the stream into a mode which allows the next fgetc to work correctly reliably across platforms as required by the C standard Comment : From the comment - it places the stream into a mode which allows the next fgetc to work correctly . Otherwise it malfunctions like part 1 of your code . I guess that s about it Comment : @AndyFaizan : You should make that an answer . .. . Answer : The use of fseek here - The C standard requires a positioning operation between a read and a write operation on an update stream or between a write and a read . This is a positioning operation between a write and a read . It is not a no-op it places the stream into a mode which allows the next fgetc to work correctly reliably across platforms as required by the C standard . EDIT : .. . .. . 2 fseek calls are required because the first one acts as the no-op call between an fgetc and a subsequent fputc call . After the fputc the second one acts as the no-op between the fputc and the subsequent fgetc call . since a loop is running Comment : then why two fseek are required Comment : Try and remove the latter fseek and check Comment : I ckecked it did nothing Comment : Sorry I got it . Wait for an edit Comment : Check the edited answer", "Question : SOLUTION AT BOTTOM .. . .. . I m working on an IP forwarding program . After reading one header field I use fseek to point the file-pointer to the beginning of the next IP header field . Only I have a current position value of 20 and an offset of 40 yet when I fseek it stays at Byte number 20 . This prints : .. . .. . The code above includes my variable initializations for the fseek function . I have tried using SEEK CUR as the int whence parameter but then the program doesn t terminate . The end of file is never reached after running for just a second I get pos is 234167456 bytes and the file is only 377 Bytes . UPDATE .. . .. . Apparently you are supposed to open the file in r+ mode so I have updated that but it is still doing the same thing .. . .. . Also tried rb mode .. . .. . SOLUTION .. . .. . My solution was to just loop the number of bytes times and call fgetc inside each loop . Not a good fit but it works .. . Answer : What is definition of your variable current position Your usage of fseek seems wrong . The man page for fseek 3 says the definition is : .. . .. . fseek FILE stream long offset int whence .. . .. . For your use-case whence must be set to a constant SEEK CUR defined in stdio.h . Comment : I forgot to include variable initializations -- they have been added . I thought I was supposed to use SEEK CUR as well but then the file never reaches the end . I let it run for a second and the got pos is 234167456 bytes and the file is only 377 Bytes . The program doesn t terminate Comment : It s not unusual that after fixing one bug you encounter another one .", "Question : Q : I m trying to update a file in-place by using fopen mode r+ reading a certain string and writing back a modified string but it s not working . .. . A : Be sure to call fseek before you write both to seek back to the beginning of the string you re trying to overwrite and because an fseek or fflush is always required between reading and writing in the read-write + modes . .. . .. . My question is why fseek or fflush is always required between reading and writing in the read-write + modes Section 5.2 of c traps and pitfall mentioned that it is because of backward compatibility issue . Any one can explain in details Thanks . Comment : c traps and pitfalls is over 20 years old - do you really need to be backward compatible with stuff that was old 20 years ago Comment : Even if the book is 20 years old those rules still stand . .. . Answer : Read Plauger s The Standard C Library http : rads.stackoverflow.com amzn click 0131315099 for some insights into why various features of the C89 standard-library are as they are - and in particular why parts of the standard I O library are as they are . One reason is that C runs on very diverse systems and with diverse media devices such as tapes may well need to be handled somewhat differently from the disk drive you re accustomed to thinking of . Also on Unix consider your tty device - it connects a keyboard and a mouse to a screen - three quite different bits of hardware . Coordinating between those is tricky enough the rules in the standard make it easier . Comment : Yep excellent book . Comment : +1 for the book . Comment : @JonathanLeffler If I intend to write to the first half of an existing file and then read the remaining old data immediately after that since I need to flush between read and write mode do I need to use fseek pFile 0 SEEK CUR to make sure buffer gets flushed due to fseek set file-pointer position remains unchanged I had put it in a question but got no answers Comment : @JonathanLeffler Further it is said in the reference that flushing is needed before a write if reading operation which did not reach the end-of-file .Indirectly does it mean to say if reading reaches end-of-file AND we want to write from that end we don t require the buffer to be flushed", "Question : I ve read posts that show how to use fseek and ftell to determine the size of a file . I was about to use this technique but then I ran into this link https : www.securecoding.cert.org confluence display seccode FIO19-C.+Do+not+use+fseek 28 29+and+ftell 28 29+to+compute+the+size+of+a+file that describes a potential vulnerability . The link recommends using fstat instead . Can anyone comment on this .. . Answer : The reason to not use fstat is that fstat is POSIX but fopen ftell and fseek are part of the C Standard . There may be a system that implements the C Standard but not POSIX . On such a system fstat would not work at all . Comment : The point of the CERT advisory is that on such a system the seek tell approach might have implementation-defined or undefined-behavior . However on such a system you don t have fstat . Any system that does have fstat certainly has sane well-defined idea of file offsets and lengths .", "Question : What is the fastest way to read every 30th byte of a large binary file 2-3 GB I ve read there are performance problems with fseek because of I O buffers but I don t want to read 2-3 GB of data into memory before grabbing every 30th byte either . .. . Answer : The whole purpose of a buffered I O library is to free you from such concerns . If you have to read every 30th byte the OS is going to wind up reading the whole file because the OS reads in larger chunks . Here are your options from highest performance to lowest performance : .. . .. . If you have a large address space i.e . you re running a 64-bit OS on 64-bit hardware then using memory-mapped IO mmap on POSIX systems will save you the cost of having the OS copy data from kernel space to user space . This savings could be significant . As shown by the detailed notes below and thanks to Steve Jessop for the benchmark if you care about I O performance you should download Phong Vo s sfio library http : www2.research.att.com gsf download ref sfio sfio.html from the AT T Advanced Software Technology group . It is safer better designed and faster than C s standard I O library . On programs that use fseek a lot it is dramatically faster : up to seven times faster on a simple microbenchmark . Just relax and use fseek and fgetc which are designed and implemented exactly to solve your problem . If you take this problem seriously you should measure all three alternatives . Steve Jessop and I showed that using fseek is slower and if you are using the GNU C library fseek is a lot slower . You should measure mmap it may be the fastest of all . .. . .. . Addendum : You want to look into your filesystem and making sure it can pull 2 3 GB off the disk quickly . XFS may beat ext2 for example . Of course if you re stuck with NTFS or HFS+ it s just going to be slow . Shocking results just in .. . .. . I repeated Steve Jessop s measurements on Linux . The GNU C library makes a system call at every fseek . Unless POSIX requires this for some reason it s insane . I could chew up a bunch of ones and zeroes and puke a better buffered I O library than that . Anyway costs go up by about a factor of 20 much of which is spent in the kernel . If you use fgetc instead of fread to read single bytes you can save about 20 on small benchmarks . Less shocking results with a decent I O library .. . .. . I did the experiment again this time using Phong Vo s sfio library . Reading 200MB takes .. . .. . 0.15s without using fseek BUFSZ is 30k .. . 0.57s using fseek .. . .. . Repeated measurements show that without fseek using sfio still shaves about 10 off the run time but the run times are very noisy almost all time is spent in the OS . On this machine laptop I don t have enough free disk space to run with a file that won t fit in the disk cache but I m willing to draw these conclusions : .. . .. . Using a sensible I O library fseek is more expensive but not more expensive enough to make a big difference 4 seconds if all you do is the I O . The GNU project does not provide a sensible I O library . As is too often the case the GNU software sucks . Conclusion : if you want fast I O your first move should be to replace the GNU I O library with the AT T sfio library . Other effects are likely to be small by comparison . Comment : Prepare to be shocked fseek causes a big slowdown on my machine NTFS Windows XP cygwin . Comment : @Steve : cool Compared with what Comment : @Steve : I m pretty skeptical about cygwin . I d love to know how performance compares with the Microsoft C compiler and library identical code . Comment : I could chew up a bunch of ones and zeroes and puke a better buffered I O library than that . It s open-source . Re-write it yourself and submit it if it gets rejected for some big reason e.g . POSIX requires it then you ll know why the GNU library performs so badly . If it gets accepted then you ll have single-handedly made a huge improvement to Linux s default I O libraries .", "Question : I am trying to run below code and expecting error as EBADF The stream is NULL .. . .. . Output : .. . .. . Through which utility can I see error EBADF I am running this C Program on HP-UX box and using a C++ compiler by HP . I rewrote the code as below as per suggestion : .. . .. . My question is and sorry if I am asking it in wrong sense that how would I know that error is EBADF The fildes argument is not a valid file-descriptor . Note : EABDF is ALSO error set for fopen when a NULL pointer is returned by fopen i.e in case of unsuccessfull completion of fopen . Comment : 1 . check the return codes and handle the errors properly. . 2 . use gdb Comment : its possible you may be interested in perror http : www.cplusplus.com reference cstdio perror : having detected an error condition setting errno this will interpret errno and print the system error message Comment : @amdixon have made use of perror and below is what close enough to what I want but I was expecting specifically EBADF The fildes argument is not a valid file-descriptor . in case of fopen error : Output : Error code for fopen is : 2 Error printed by perror : No such file or directory Comment : so the EBADF return code referenced below is an error condition on the fseek . since we are now properly handling errors the program has stopped now when it hits the fact that that file doesnt exist or possibly cant be accessed . if you adjust the path access to fix everything will work .. . Answer : First and foremost you should be checking for the success of fopen as-if it fails passing the returned pointer NULL will invoke undefined behaviour https : en.wikipedia.org wiki Undefined behavior in fseek . You should not be using the returned pointer any further if fopen failed . That said to detect the error in fseek itself you should be checking the return-value of fseek for success or error . In case fseek is failure it will set the errno variable . You can check the same against the EBADF . You don t need any utility as such to check the error-code . You can use include errno.h with you code and you can access the errno variable value . From the man page http : linux.die.net man 3 fseek for fseek .. . .. . .. . fgetpos fseek fsetpos return 0 and ftell returns the current offset . Otherwise -1 is returned and errno is set to indicate the error . .. . .. . and regarding the EBADF as you mentioned .. . .. . EBADF .. . The stream specified is not a seekable stream . Comment : should also check return code of fopen. . Comment : user should check that fp is not null and go no further as proper practice . if you call fseek on null-pointer then user will hit a segfault. . Comment : If the fopen returns NULL fseek has undefined behaviour . Segfault is only one of many possible symptoms of that . Also to use fseek it is generally advisable to open the file in binary mode . Comment : nw gets my vote Comment : I rewrote something like below . My question is and sorry if I am asking it in wrong sense that how would I know that this error is EBADF The fildes argument is not a valid file-descriptor . : Note : EBADF also correspond to fopen error and gets set when null-pointer is returned by fopen .", "Question : I have started learning C via Youtube and K R some time ago and I am trying to write some programs as practice . Currently I want to create a program that reads words from a file and compares the beginning of it with the input from the user . The program successfully compares the first word and gives me a result but I just can t get the fseek to move correctly to the next line This is the current version of the part that seeks for words . .. . .. . fileCount is set to 0 and strlen should return the length of the string srtFile but it doesn t quite well . I even tried setting fseek manually but it just wouldn t move . The words from my file are : First Last Index Field ID Number Fire Film . each is in a new line . When I run the program and type in F to search for a word that has a capital f the output is : .. . .. . I am desperate . Any ideas clues EDIT A big thank to everyone who helped me with this Comment : Don t you want to increase fileCount If you re in Windows you might want to open with rb because of the CRLF convention . If you re reading through the file sequentially why bother with fseek at all Comment : Your filepointer is already at the next word fgets moves the file-pointer as it reads so the fseek is superfluous . Comment : BTW fseek may be dangerous for files opened in text mode explained here http : arstechnica.com civis viewtopic.php t 420490 . Summary : because of n - r n conversion the parameter to fseek should either be 0 or come from an earlier ftell call . So you should use both fseek and ftell in your program or none Maybe you don t need fseek at all . Comment : calls to the system functions fopen fseek fgets when used in code should have have the returned value checked to assure not error occurs and or to enable the code to recognize an error event and have a chance to fix it . Comment : in the posted code there is absolutely no need for the call to fseek as the call will step the file-pointer which after the call to fgets is already moved forward the amount of characters read by fgets .. . Answer : Your problem is that you are not using fseek correctly . In your code .. . .. . sets the pointer to where its current at plus the filecount the offset . That s why it skipped Last and reads Index as string 2 . To fix this simply remove the fseek statement .", "Question : Is using fseek to backtrack character fscanf operations reliable Like for example if I have just fscanf-ed 10 characters but I would like to backtrack the 10 chars can I just fseek infile -10 SEEK CUR For most situations it works but I seem to have problems with the character M . Apparently fseek registers it as a char but fscanf doesn t register it thus in my previous example a 10 char block containing a M would require fseek infile -11 SEEK CUR instead . fseek infile -10 SEEK CUR would make bring it short by 1 character . Why is this so Edit : I was using fopen in text mode .. . Answer : Fseek has no understanding of the file s contents and just moves the filepointer 10 characters back . fscanf depending on the OS may interpret newlines differently it may even be so that fscanf will insert the M if you re on DOS and the M does not appear in the file . Check your manual that came with your C compiler", "Question : I have a question about the fseek usage in C . I know it can set the offset position of a file-descriptor created by fopen . But can it also set the offset position of a newly created file To be more specific can I : .. . .. . Will it create a file with 1 GB size and no content Or should I at least write something in order to create this 1 GB file Comment : I am reasonably certain that there will be content it will just be random content as in what ever happens to be in the disk area allocated . You may want to initialize the data area to some known value . Comment : However pubs.opengroup.org onlinepubs 009695399 functions fseek.html http : pubs.opengroup.org onlinepubs 009695399 functions fseek.html says that The fseek function shall allow the file-position indicator to be set beyond the end of existing data in the file . If data is later written at this point subsequent reads of data in the gap shall return bytes with the value 0 until data is actually written into the gap . however what happens if you close the file then open it again Would it still remember Comment : The seek will just move the position but will not extend the file unless you write something at that position . Comment : As @MarioZannone said . On a side note better use fseeko when you want to handle really large-files . Comment : fseek may allow seeking beyond the end of the file but there is nothing that states explicitly whether the file size is extended as a result . lseek http : pubs.opengroup.org onlinepubs 009695399 functions lseek.html explicitly states that seeking by itself will not extend the size of the file . In other words you d need some form of write operation to extend the size of the file when using lseek . However nothing forbids or allows fseek to behave the same way . C11 draft N1570 states If a read or write error occurs the error indicator for the stream is set and fseek fails . .. . Answer : http : en.cppreference.com w c io fseek .. . .. . POSIX allows seeking beyond the existing end of file . If an output is performed after this seek any read from the gap will return zero bytes . Where supported by the filesystem this creates a sparse file https : en.wikipedia.org wiki Sparse file .", "Question : I am working with 4 files and want to inject a string at a specified offset to each one of them.I am using fseek but the data is being written to the end of files instead of intended offsets.Why and how can i fix it : Comment : Mode a stands for a ppend . .. . Answer : The a mode means that the data will be written to end-of-file . Try using r+ mode read + write instead . Quote from N1570 http : chimera.roma1.infn.it SP COMMON iso-iec-9899-1990.pdf 7.21.5.3 The fopen function : .. . .. . 6 Opening a file with append mode a as the first character in the mode argument causes all subsequent writes to the file to be forced to the then current end-of-file regardless of intervening calls to the fseek function . This means that file-pointer opened with a mode will ignore operations performed with fseek .", "Question : I want to read a file into a buffer . I get segmentation-fault at fread . Looks like ftell gives correct size back . But then things go wrong . Will fseek modify f Why fread does not work Comment : Do not use fseek ftell to compute the size of a file especially in binary mode . Per the C Standard open-std.org jtc1 sc22 wg14 www docs n1124.pdf http : www.open-std.org jtc1 sc22 wg14 www docs n1124.pdf : A binary stream need not meaningfully support fseek calls with a whence value of SEEK END . Also see : securecoding.cert.org confluence display c https : www.securecoding.cert.org confluence display c FIO19-C.+Do+not+use+fseek 28 29+and+ftell 28 29+to+compute+the+size+of+a+regular+file .. . Answer : Correct code : Comment : fread reads data as is does not add anything . Edit your original code and show how you try to free buf .", "Question : I want to read a file into a buffer . I get segmentation-fault at fread . Looks like ftell gives correct size back . But then things go wrong . Will fseek modify f Why fread does not work Comment : Do not use fseek ftell to compute the size of a file especially in binary mode . Per the C Standard open-std.org jtc1 sc22 wg14 www docs n1124.pdf http : www.open-std.org jtc1 sc22 wg14 www docs n1124.pdf : A binary stream need not meaningfully support fseek calls with a whence value of SEEK END . Also see : securecoding.cert.org confluence display c https : www.securecoding.cert.org confluence display c FIO19-C.+Do+not+use+fseek 28 29+and+ftell 28 29+to+compute+the+size+of+a+regular+file .. . Answer : As above answer described it gives undefined behaviour so either use dynamic-allocation or declare it as an array .. . .. . And the pass it to fread . Comment : You should check if size is above max length and handle the case correctly . Comment : @Leandros Yes that condition should be checked ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ansi-c
UNK_RELATION
user-permissions@user-permissions@93
user-permissions -- for questions regarding the appropriate use settings and enforcement of @placeholder typically for the purpose of either providing access to shared resources or restricting access to private resources .
{ "confidence": [ 32.1587028503418, 27.88199806213379, 27.12302017211914, 26.438983917236328, 26.311912536621094, 26.0689697265625, 25.863967895507812, 25.298059463500977, 24.22536849975586, 24.093761444091797, 24.093761444091797, 24.074676513671875, 23.890169143676758, 23.81869125366211, 23.79507064819336, 23.79507064819336, 23.79507064819336, 23.79507064819336, 23.56948471069336, 23.492698669433594, 23.296730041503906, 22.876720428466797, 22.8297119140625, 22.756778717041016, 22.47323226928711, 22.296398162841797, 22.226058959960938, 22.03203582763672, 21.80474090576172, 21.670841217041016, 21.556053161621094, 21.3790283203125, 21.336809158325195, 21.336809158325195, 21.336809158325195, 21.336809158325195, 21.336809158325195, 21.271944046020508, 21.243423461914062, 21.23617935180664, 21.179393768310547, 21.179393768310547, 21.129053115844727, 21.113685607910156, 21.00796890258789, 20.662939071655273, 20.574176788330078, 20.559450149536133, 20.519901275634766, 20.519901275634766, 20.519901275634766, 20.392505645751953, 20.345863342285156, 20.259912490844727, 20.217172622680664, 20.107707977294922, 20.107707977294922, 20.107707977294922, 20.090408325195312, 20.078266143798828, 20.01289176940918, 19.869083404541016, 19.836395263671875, 19.83230209350586, 19.83230209350586, 19.573774337768555, 19.573774337768555, 19.573774337768555, 19.573774337768555, 19.573774337768555, 19.493228912353516, 19.475696563720703, 19.469104766845703, 19.469104766845703, 19.469104766845703, 19.469104766845703, 19.464550018310547, 19.422557830810547, 19.422557830810547, 19.337862014770508, 19.337387084960938, 19.329273223876953, 19.30811882019043, 19.30811882019043, 19.124662399291992, 19.099166870117188, 19.09186363220215, 19.09186363220215, 19.03426742553711, 19.03426742553711, 19.03426742553711, 19.03426742553711, 19.02539825439453, 18.97271156311035, 18.97271156311035, 18.97271156311035, 18.88959503173828, 18.79909896850586, 18.79909896850586, 18.7569580078125 ], "content": [ "If they re an admin they get manage permissions for all resources .", "Besides loading the MSR kernel module and setting the appropriate file-permissions on the msr device file one must grant the CAP SYS RAWIO capability to any user executable that needs access to the MSR driver using the command below :", "But still the user is not able to access these files but the root can .", "I have given all the permissions in manifest.xml regarding internet-connection .", "Is there a way to set user-permissions to the repository", "We can t just rely on the final directory permissions as permissions higher up the path may be blocking access to the final directory .", "It seems to be duplicate of stackoverflow.com questions 81361 http : stackoverflow.com questions 81361 how-to-setup-access-control-in-svn", "However I would like to allow certain groups permission to access these pages and disallow access for other groups permissions .", "Many thanks for any help resources to read .", "The question I am asking myself is..do I need to ask user for the permission to access to text messages on phone", "You must not ask user for permision because you can t access nothing from messages .", "So the Kernel makes decisions on providing access and if it is to fulfil the request the Kernel operates the data .", "I see you can create rules for Resources such as only allowing a user to edit posts which they are assigned to .", "If that doesn t work use Process Monitor available from the MS web site to check exactly which access permissions are being requested .", "access on last three views should be denied for user-group1 .", "user-group2 should be able to access the last three views of the component .", "access on first three views should be denied for user-group2 .", "How can I provide access to FXM to a New User in Sitecore 8", "Running sudo rails .. . didn t work either with these permissions .", "Actually there is no access management for file : protocol available .", "In backend access", "Warning : mysql-connect function.mysql-connect : Access denied for user user @ localhost using password : YES on line 38 .", "In your example you re calling a controller action called GetLocationById and the behavior you re looking for is to have the action return the location if the user has access to locations as well as the related holidays if the user has access to holidays .", "security-settings http : i.stack.imgur.com tU3Or.png .. . .. . However when I try to actually read the file it fails Access is denied .", "The program is running under the permissions of the authenticated Windows user .", "I created a component for ease of use permissions on iOS .", "To access Internet the only Uses Permission needed is android.permission.INTERNET in Manifest .", "How to configure the project ticket-system access per user", "I m trying to figure out what is the best way to manage model access permissions with Django .", "front end or back end access", "Set up svnserve.conf repos conf svnserve.conf in order to define general access configuration .. . .. . Here is simple guide of how to edit and configure access to your repository http : wiki.wsmoak.net cgi-bin wiki.pl Subversion Configuration .", "For permissions reasons I need use the administrator user as a owner of service but the following message apears when I start it .", "Is there a better way to manage the process instead of manually granting each user access to their profile page", "We check that the logged-in user has write access to the working directory before updating the application .", "In my opinion -- when the Kernel receives a request from a User for example to open a file it then analyses the User s access rights .", "My requirement is like this : .. . .. . user-group1 should be able to access the first three views of the component .", "Because the user didn t know about this feature they might have previously denied camera access but now want to enable it .", "The permissions look like this : .. . .. . I keep getting Operation not permitted error message when I try to read these files from userspace but works fine when root tries to access them .", "I am trying to understand the way the filesystem and the kernel are related and how they work together specifically regarding the permissions .", "If it doesn t have a menu item or it doesn t work then I would suggest trying a brute-force type approach - it takes a while but grant another user you have access to full access and trim down the access levels until you find the specific menu item .", "In your Manifest add lines below : .. . .. . Please have a look to : .. . .. . http : developer.android.com guide topics manifest manifest-intro.html perms http : developer.android.com training articles security-tips.html Permissions .. . .. . To access device features as Camera GPS .. . you need to request permissions .", "3 I assigned Element author role having least permissions http : documentation.opencms.org opencms-documentation background permissions-in-opencms users-groups-roles-and-ous roles-in-opencms .. . .. . Element Author .. . .. . An element author can only access the page-editor and content editors .", "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 .", "Not sure why this is happening and why the database is locked by the SQL user and won t let the Access user update the relevant records .", ".. . .. . Second and more importantly applying the permissions directly to the user doesn t appear to be working", "Edit : I should mention that I tried the User Role Editor plugin to see if that would improve things but it says my editor user should have the right permissions to preview save and publish other people s posts .", "I declared user-permission android : name android.permission.INTERNET in my AndroidManifest since I thought it was the goto way of getting user-permissions .", "So far I tried : .. . .. . Content Access module https : www.drupal.org project content access : it hides content-type per role but file is still accessible via URL .. . Field Permissions module https : www.drupal.org project field permissions : it hides field per role but file is still accessible via URL .. . Private files folder : I managed to set it up that only admin user can access files but for authenticated users if access denied .. . I also play around with Permissions by Term File entity and Group modules but no luck .", "Wordpress summary of roles : .. . .. . Super Admin somebody with access to the site network administration features and all other features .", "Administrator somebody who has access to all the administration features within a single site .", "Code reference from http : www.svnforum.org threads 38790-Access-Rights-Reporting-in-Subversion-or-Viusal-SVN", "I m basically trying to generate files with something like permissions -r-------- on a POSIX filesystem files that are intended to be unusually private encrypted cryptographic keys which should be accessible only to the user and are not intended to be modified .", "And if that is the case how can those permissions be set", "If permissions is not requested then a SecurityException is thrown .", "Since this application needs to access data in other DB we add that group to that DB as well and set access execute rights to needed objects either specific object or schemas .", "I want to use Process.GetProcesses string but there is an access denied exception that won t allow me to get the remote computer process .", "For example checking access rights works quite differently on file systems that use the standard Unix rwx flags e.g .", "If your access-control info is stored in the database you could load it here and use that data to set up your rules .", "I then looked in the SQL and queried the database with EXEC sp-who2 Active and I can see that the user name I use for SQL is RUNNABLE while the user used by the Access application coded in Access VBA is SUSPENDED the command it is suspended on is SELECT .", "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 want to set permissions for uploaded files that way that only authenticated users or users with particular role can access download them .", "One approach would be to not use expand in the entity query and instead let the server decide whether to include the holidays based on user-permissions .", "We can t just rely just on the directory group permissions either in this age of inherited groups .", "I am assigning permission as per jsp forms to user.If any user has permission to access the form that form will be added to menu bar after login .", "This problem in real life comes if you want to let the user know if the share they re creating would not be readable to the users they re giving access to .", "I ve checked sp-who2 on the working database when it s running with Access and the user that is SUSPENDED for the problematic database is sleeping with this one .", "Hello guys I ve built an admin panel which now I have to protect based on which user try to access it .", "For certain user group that has some access to a certain application we create AD group and assign AD users to it .", "That causes lots of strange behaviors when all of a sudden some user gets denied access to objects in DB .", "When using this API I want to limit access to the items created by a given user .", "But does it mean write access for ALL repositories or is it possible to define which repo the team has access to", "Also you can consult official documentation http : svnbook.red-bean.com nightly en svn.serverconfig.svnserve.html svn.serverconfig.svnserve.auth in order to dive into subversion access management .", "Though I m not sure if it s possible to restrict access to particular fields .", "And how best to manage their access using their active-directory accounts .", "I refer to allowing full access of any file of the server for all users", "For example several roles will only have access to certain datasets .", "There doesn t seem to be a way to just add permissions on but have anti-permissions on a specific table .", "It is not about permissions .", "To specify permissions", "What would the appropriate place be in the code", "I have checked all the permissions for each user and groups also tried them to add as individual user on project portal site as contributors .", "While this solution works right now if you ever add tables to the database you will have to add permissions for each user for the new tables .", "Am trying to use https : github.com RallyTools RallyRestToolkitForRuby to pull permissions of all users in my Rally Subscription .", "My permissions are .. . .. . which uses-features as required false should i use for solution", "Because our system places a limit on the amount of space a user can have in the storage we created a user whose sole purpose is to be the owner of these files .", "My questions are : .. . .. . Is there any way to find out with which privileges through which AD group some user got access denial for certain sql query that was triggered from application", "For each item on the list grant all permissions .. . 3 .", "Revoke permissions on the special table .. . .. . Or alternatively : 2 .", "I want to extend this application also with some other tables where at the same way user and group permissions need to be assigned .", "However you can check for the link i posted to understand in which condition you need to set user-permissions .", "What set of Windows permissions does the Windows user need in order to be able to do that certificate revocation check", "It could be that though the user has permission for locations he may not have permissions for holidays .", "Either in Java or in the security settings themselves I don t particularly care as long as it works :", "It s not possible to set write access on only issues .", "There are several frameworks that make access-control more manageable .", "Access is enforced by the certificates that also sign your app .", "So either become the superuser use sudo or use ionice on one of your own processes .", "I was wondering how large companies manage such things there must be a way to automatically grant individuals access to their page without having to set access for each one individually .", "My workplace are not keen on granting access to active-directory or adding fields there so I m wondering if it s possible to create pages in a stand alone site or a CMS like Drupal WordPress Umbraco and grant people access .", "there are two permissions for Locations and holidays ." ] }
{ "confidence": [ 38.500450134277344, 33.690330505371094, 32.77627182006836, 32.693992614746094, 32.57023620605469, 32.477928161621094, 32.40526580810547, 31.98897933959961, 31.985286712646484, 31.208438873291016, 29.99783706665039, 28.580127716064453, 28.539165496826172, 28.1707763671875, 27.538875579833984, 26.047414779663086, 25.977787017822266, 25.902877807617188, 25.70819854736328, 25.59607696533203 ], "content": [ "Question : I am trying to understand the way the filesystem and the kernel are related and how they work together specifically regarding the permissions . I know that in fact the filesystem is running in kernel space but in this context I consider them as two separates entities . When Bob UID 1001 GID 1001 groups humans minor tries to read file.txt which is let s say rwx r-- --x with owner Alice and group owner minor -- which one of the kernel and the filesystem permits access Does the filesystem have a function taking as parameters the entire list of Bob s groups Bob s UID and other stuff sent by the kernel which would allow the filesystem to determine whether Bob can or cannot read the targeted file Furthermore if this is the way it works -- how does the kernel know the data the filesystem needs for extended special attributes In the case of synology extended attributes ext4 btrfs for example . Many thanks for any help resources to read . .. . Answer : Good day to you In my opinion -- when the Kernel receives a request from a User for example to open a file it then analyses the User s access rights . If they are correct -- the Kernel manages the hardware to provide the User with the requested data . In a context of a computer system consisting of a Kernel and a File-System also including hardware to input to store and to output the data the File-System itself has no possibility of making decisions like the Kernel do it is just an informational structure written in a manner defined by the rules of operating it to which the Kernel must have an access in order to interact correctly these rules may be stored in the Kernel . So the Kernel makes decisions on providing access and if it is to fulfil the request the Kernel operates the data . And the File-System is a set of both stored data on some hardware and a software part as the instructions to the Kernel : how to manipulate the hardware s physical layer and maybe how to decide on access-providing on a logical layer but the decisive role again is up to the Kernel which must accord to all the provided rules . This variant is just a variant and it may vary in various operating-system realizations . I don t know in which of them it is implemented whether this is OS Linux or OS Windows approach or maybe not . And for example if we describe a remote cloud-storage to which the User connects -- this storage something in it that acts as a described Kernel maybe its Kernel decides whether to grant the access or not and the local Kernel acts as a User to which the remote system is like a Kernel . Also I saw a similar or relative question here on Stack Overflow too : What does opening a file actually do http : stackoverflow.com questions 33495283 what-does-opening-a-file-actually-do -- maybe there you will find some additional information .", "Question : From my research I have found that the Authority package https : github.com machuga authority-l4 is best for implementing a role permissions based user auth system while maintaining flexibility . I am having trouble understanding exactly how to use this package . The documentation covers it s functions and configuration but does not explain a few things . Was hoping someone could point me in the right direction . What is the purpose of the config file To specify permissions Are these not stored in the database I see you can group permissions together using Aliases . What if I do not want to use an alias . Is there a way to create just a permission by itself I see you can create rules for Resources such as only allowing a user to edit posts which they are assigned to . The documentation does not appear to have much information on this . Any help would be greatly appreciated . Searched the internet but not finding much for this package . .. . Answer : I haven t used Authority although I am looking at it for a project . Based on my reading of the docs here s the way it works : .. . .. . The config file is there to specify configuration for the package . The roles permissions can be stored in the database although they don t have to be . The configuration file is there to tell the package how to work . So for example the config file allows you to set up aliases for one or more permissions - if you use aliases this needs to be done up front so that the package works the way you expect it to . As another example the rules more later can and should be set up in the config . Consider the following config from the Authority docs : .. . .. . What is this doing Let s go through it step-by-step : .. . .. . First this is specifying something that s supposed to happen when the application is initialized . Presumably there are other events that could occur but I m unsure why you d want to change the rules after the app is initialized . When the app is initialized the closure is called . The closure does this : .. . .. . 1 . gets the current user - later rules depend on who is logged in .. . .. . 2 . set up a couple of aliases - cuz we re lazy and don t want to specify rules for create read etc . one-by-one . We can just use manage instead . 3 . next it checks the current user . If they re an admin they get manage permissions for all resources . If your access-control info is stored in the database you could load it here and use that data to set up your rules . Now later on in the execution of your app you need to check and see if the user can for example create a user record . Do this in your controller : .. . .. . This checks the rules you set up in your config and determines if the user is allowed to do this . If they re not then in my example throw an exception . You probably want to handle it more gracefully . Authority gives you the flexibility to define your permissions much more precisely . For example .. . .. . This rule includes a check that allows a user to manage their own user record but nobody else s . To do this you need to adjust the example above . In this case the Authority instance gets passed into the closure as self then the current user ID is retrieved and checked against the user being edited user . If the user is trying to edit someone other than themselves the check fails . That s a very basic overview - hope it helps . Comment : Thanks for the detailed explanation . Definitely helps . In my application there will be a lot of rules and it just felt odd to place them in the config file . It is going to be long... .", "Question : I should start by saying I consider myself a proficient user . But today I had the need to automate this and was stumped . Let s suppose I am root and as such I m able to traverse the whole filesystem but I can t run sudo nor su . I have a given user and a given path . How can I check over the CLI whether the user will be able to read and or write to the path I know this sounds easy but keep in mind that : .. . .. . We re not nor can we become the user . We can t just rely on the final directory permissions as permissions higher up the path may be blocking access to the final directory . We can t just rely just on the directory group permissions either in this age of inherited groups . I m assuming this can t be done through any command and I d need to first gather all user groups then traverse the whole hierarchy of the path check read permissions all along the path and then read-write for the final directory . Sounds awfully expensive though . Comment : Your assumptions look valid from here . Don t forget execute permissions for the directory . Comment : i don t see why you shouldn t be able to su Comment : hop : Whatever the reason that s the problem statement . Can t use x can t be answered by then use x . This problem in real life comes if you want to let the user know if the share they re creating would not be readable to the users they re giving access to . For example when creating a guest-accessible shared folder whose user behind the scenes is really nobody that the guests won t be able to read or write to . Comment : @hop : I don t have this problem in real life doesn t necessarily equal this is not a real-life problem . Comment : @Eduo : this site is not for posing puzzles . .. . Answer : the best way is to validate via user himself :", "Question : I should start by saying I consider myself a proficient user . But today I had the need to automate this and was stumped . Let s suppose I am root and as such I m able to traverse the whole filesystem but I can t run sudo nor su . I have a given user and a given path . How can I check over the CLI whether the user will be able to read and or write to the path I know this sounds easy but keep in mind that : .. . .. . We re not nor can we become the user . We can t just rely on the final directory permissions as permissions higher up the path may be blocking access to the final directory . We can t just rely just on the directory group permissions either in this age of inherited groups . I m assuming this can t be done through any command and I d need to first gather all user groups then traverse the whole hierarchy of the path check read permissions all along the path and then read-write for the final directory . Sounds awfully expensive though . Comment : Your assumptions look valid from here . Don t forget execute permissions for the directory . Comment : i don t see why you shouldn t be able to su Comment : hop : Whatever the reason that s the problem statement . Can t use x can t be answered by then use x . This problem in real life comes if you want to let the user know if the share they re creating would not be readable to the users they re giving access to . For example when creating a guest-accessible shared folder whose user behind the scenes is really nobody that the guests won t be able to read or write to . Comment : @hop : I don t have this problem in real life doesn t necessarily equal this is not a real-life problem . Comment : @Eduo : this site is not for posing puzzles . .. . Answer : Tag me a scripting guru", "Question : null .. . Answer : I want to set permissions for uploaded files that way that only authenticated users or users with particular role can access download them . I don t want to just hide file but want to denied access completely . So if someone have direct file URL example.com sites default files example.pdf he should be logged in to access it . I tried many things but I failed every time . So far I tried : .. . .. . Content Access module https : www.drupal.org project content access : it hides content-type per role but file is still accessible via URL .. . Field Permissions module https : www.drupal.org project field permissions : it hides field per role but file is still accessible via URL .. . Private files folder : I managed to set it up that only admin user can access files but for authenticated users if access denied .. . I also play around with Permissions by Term File entity and Group modules but no luck . What I also want to try but do not have enough knowledge : .. . .. . restrict access via function hook file download .. . change private folder .htaccess file so only authenticated users or users with particular role can access files inside private folder .. . .. . .. . Thank you all in advance for any assistance you can provide .", "Question : I am trying to write a simple application that can read msr registers and am running this application from userspace . I have loaded the msr module and given read permissions for everyone to dev cpu msr . But still the user is not able to access these files but the root can . The permissions look like this : .. . .. . I keep getting Operation not permitted error message when I try to read these files from userspace but works fine when root tries to access them . What am I doing wrong I am on Ubuntu 13.04 with kernel version 3.11.0 . Comment : did you run your program with sudo .. . Answer : Changes in the mainline Linux kernel since around 3.7 now require an executable to have capability CAP SYS RAWIO to open the MSR device file 2 . Besides loading the MSR kernel module and setting the appropriate file-permissions on the msr device file one must grant the CAP SYS RAWIO capability to any user executable that needs access to the MSR driver using the command below : Comment : Thanks I tried giving the CAP SYS RAWIO capability to executable like you suggested and still face the same problem Comment : Thank you very much . That worked for me .", "Question : null .. . Answer : Using Java s ACL File Attribute API https : docs.oracle.com javase 8 docs api java nio file attribute package-summary.html I create a file for which only the current user has only read and delete permission specifically https : docs.oracle.com javase 8 docs api java nio file attribute AclEntryPermission.html READ DATA READ ATTRIBUTES READ NAMED ATTRS READ ACL and DELETE . It looks like the permissions take : .. . .. . basic-security-settings http : i.stack.imgur.com DyUgG.png .. . .. . security-settings http : i.stack.imgur.com tU3Or.png .. . .. . However when I try to actually read the file it fails Access is denied . I ve tried opening it notepad using cat from git for Windows bash and opening a FileInputStream from Java . Can anyone explain why this fails Is there anyway to debug the authorization process I m basically trying to generate files with something like permissions -r-------- on a POSIX filesystem files that are intended to be unusually private encrypted cryptographic keys which should be accessible only to the user and are not intended to be modified . Is there something else I ought to be doing Is there a better way working from a JVM Comment : At a guess you might need to include synchronize and or execute permission . If that doesn t work use Process Monitor available from the MS web site to check exactly which access permissions are being requested . If you still can t work out what s happening post the output of icacls myfilename as well as the details from Process Monitor .", "Question : I should start by saying I consider myself a proficient user . But today I had the need to automate this and was stumped . Let s suppose I am root and as such I m able to traverse the whole filesystem but I can t run sudo nor su . I have a given user and a given path . How can I check over the CLI whether the user will be able to read and or write to the path I know this sounds easy but keep in mind that : .. . .. . We re not nor can we become the user . We can t just rely on the final directory permissions as permissions higher up the path may be blocking access to the final directory . We can t just rely just on the directory group permissions either in this age of inherited groups . I m assuming this can t be done through any command and I d need to first gather all user groups then traverse the whole hierarchy of the path check read permissions all along the path and then read-write for the final directory . Sounds awfully expensive though . Comment : Your assumptions look valid from here . Don t forget execute permissions for the directory . Comment : i don t see why you shouldn t be able to su Comment : hop : Whatever the reason that s the problem statement . Can t use x can t be answered by then use x . This problem in real life comes if you want to let the user know if the share they re creating would not be readable to the users they re giving access to . For example when creating a guest-accessible shared folder whose user behind the scenes is really nobody that the guests won t be able to read or write to . Comment : @hop : I don t have this problem in real life doesn t necessarily equal this is not a real-life problem . Comment : @Eduo : this site is not for posing puzzles . .. . Answer : I cannot actually provide a full answer and I can t add anything substantial to your own ideas except perhaps this : .. . .. . I suspect that a general approach to checking effective access rights does not exist simply because access rights depend heavily on the underlying file system s . For example checking access rights works quite differently on file systems that use the standard Unix rwx flags e.g . Linux ext2 ext3 than with file systems that support ACLs such as XFS http : oss.sgi.com projects xfs or NTFS . There might be several specific command-line tools that do what you want to do for specific file system types . Analogy : tools such as fsck mkfs may exist per file system type . Especially with UNIX-like operating systems where all kinds of file systems can be mounted in one big directory structure assuming only one specific permissions mechanism might lead to problems . If you build your own solution for this problem think about this fact first then decide exactly which access right mechanism s you want to support . I m not sure but I could imagine that Unix the POSIX specification prescribes the rwx access rights flags as a minimum that every Unix should support .", "Question : From my research I have found that the Authority package https : github.com machuga authority-l4 is best for implementing a role permissions based user auth system while maintaining flexibility . I am having trouble understanding exactly how to use this package . The documentation covers it s functions and configuration but does not explain a few things . Was hoping someone could point me in the right direction . What is the purpose of the config file To specify permissions Are these not stored in the database I see you can group permissions together using Aliases . What if I do not want to use an alias . Is there a way to create just a permission by itself I see you can create rules for Resources such as only allowing a user to edit posts which they are assigned to . The documentation does not appear to have much information on this . Any help would be greatly appreciated . Searched the internet but not finding much for this package . .. . Answer : So it appears Authority l4 is just a Facade addon . The actual package itself resides here : https : github.com machuga authority .. . .. . The documentation here is much more thorough . This should be specified on the l4 package .", "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 created a repository on a network-drive with svnadmin create repos . Is there a way to set user-permissions to the repository And if that is the case how can those permissions be set Comment : It seems to be duplicate of stackoverflow.com questions 81361 http : stackoverflow.com questions 81361 how-to-setup-access-control-in-svn .. . Answer : If you need to manage access via svn : protocol embedded authorization all you need to do is to change files in conf folder of your newly created repository : .. . .. . 1 . Set up passwd repos conf passwd in order to define a list of users and passwords .. . 2 . Set up authz repos conf authz in order to define groups and privileges .. . 3 . Set up svnserve.conf repos conf svnserve.conf in order to define general access configuration .. . .. . Here is simple guide of how to edit and configure access to your repository http : wiki.wsmoak.net cgi-bin wiki.pl Subversion Configuration . Also you can consult official documentation http : svnbook.red-bean.com nightly en svn.serverconfig.svnserve.html svn.serverconfig.svnserve.auth in order to dive into subversion access management . In case you need to manage access via http : protocol you might like to consult official subversion documentation on this matter http : svnbook.red-bean.com nightly en svn.serverconfig.httpd.html it s a bit more complex topic than embedded subversion authorization . Comment : But doesn t this approach only work if the repository is on a server and not a network-drive Comment : if you mean file : protocol then you re right it does not work . Actually there is no access management for file : protocol available . Comment : Thank you this answers my question Comment : is there a faster way if you have 100 repos to point them all to the same auth and passdb i have it running with http : but can t figure it out with svn : Comment : @DanyKhalife You can have a single global auth and passwd file but the svnserve.conf file in your 100 repos will need to be updated to point at the global auth and passwd file . You d update authz-db and password-db in the svnserve.conf files .", "Question : I have developed one SIP based application which is not able to use an internet-connection while debugging on an android device . But when debugging on the emulator it works properly . I have given all the permissions in manifest.xml regarding internet-connection . Is there any other permission to use the internet-connection to run an application on the device here i have attached my manifest.xml.Any help and suggestions will be appreciated . .. . .. . Comment : Can you post the permissions you have in your manifest already so we can see what you ve tried Welcome to SO Comment : Post your manifest Comment : @C.Barlow : thanking to your response . here i am attaching my manifest.xml . please verify it . Comment : @Jack : thanking to your response . here i am attaching my manifest.xml . please verify it . .. . Answer : To access Internet the only Uses Permission needed is android.permission.INTERNET in Manifest . Please Check your Internet connectivity with a Browser in Phone first . Comment : @Periyasam : thanks for your reply . but i had verified my INTERNET Connection on device . even other applications works properly on device.I have tested the INTERNET connection throgh SipDroid and Fring applications.it works properly.i am using android version 2.3.3", "Question : Lets say I have two entities Location and Holidays . Holidays are associated with a Location . Therefore in breeze I can write a query like follows to retrieve the holidays related to a particular location : .. . .. . However this data-retrieval is permission based . I.e . there are two permissions for Locations and holidays . It could be that though the user has permission for locations he may not have permissions for holidays . Is there anyway that I could still use the extend method to retrieve the holidays at the same time considering permissions Or else do I have to expose a separate method in the controller to retrieve holidays after checking permissions .. . Answer : In your example you re calling a controller action called GetLocationById and the behavior you re looking for is to have the action return the location if the user has access to locations as well as the related holidays if the user has access to holidays . One approach would be to not use expand in the entity query and instead let the server decide whether to include the holidays based on user-permissions . For example : .. . .. . I m making a lot of assumptions here- forgive me if I misunderstood .", "Question : I set up an organization on GitHub and invited some members . Most members have the status member . They can create issues but are not able to set a label or to assign the issue to another member . I figured out where to set repository permissions : https : github.com organizations MyOrganization settings member privileges . But what I need now are ticket-system related permissions . How to configure the project ticket-system access per user Additionally : How to do this per team .. . Answer : Unfortunately that s not possible yet . Many organisations have used GitHub bots to assign labels automatically without giving users write access . Edit : If you are okay with having you re users have write access i.e . can pull push clone then you can go to https : github.com orgs org teams team repositories and configure access there . GitHub team permissions repos http : i.stack.imgur.com vCeEN.png Comment : Thank you for the fast answer It it s not possible for users and not possible for teams What is the sense of teams if it s not possible to set up access rights for its members Comment : It s not possible to set write access on only issues . This might be something GitHub will be introducing since they ve been introducing a lot of new features lately . Right now you have one of 2 choices : 1 you give all users write access or you give a team write access dropbox.com s 6b805khvuocr6d5 https : www.dropbox.com s 6b805khvuocr6d5 Screenshot 202016-06-01 2015.26.32.png dl 0 or 2 you give no write access and have a bot handle ticket changes . Comment : Note that giving your users teams write access will allow them to push clone everything . Comment : The first variant to give a team write access would be OK for now . But does it mean write access for ALL repositories or is it possible to define which repo the team has access to I didn t find such option . Comment : Ah OK found it : https : github.com orgs ORGANIZATION teams TEAM repositories and there under Repositories i.stack.imgur.com vCeEN.png http : i.stack.imgur.com vCeEN.png .", "Question : We have MS SQL Server 2012 in production use and MS AD . Let me explain in short what our concept of assigning user-permissions is like . For certain user group that has some access to a certain application we create AD group and assign AD users to it . Since this application needs to access data in other DB we add that group to that DB as well and set access execute rights to needed objects either specific object or schemas . Since certain people use other applications and DBs they are added to other AD groups as well . Those groups by no surprise need to access some objects to second database too . So we have situation when certain users are in few different AD groups with different accesses to the same objects in a DB . That causes lots of strange behaviors when all of a sudden some user gets denied access to objects in DB . My questions are : .. . .. . Is there any way to find out with which privileges through which AD group some user got access denial for certain sql query that was triggered from application Can someone explain how sql-server handles privileges in such environment I m open for any suggestions on how to handle set accesses differently altogether but not involving reprogramming applications only DBA site . Thank you . .. . Answer : Assuming that you re an admin you can look at sys.login token sys.user token and sys.fn my permissions while impersonating the user in question to get some idea . Something like : Comment : Thank you for your answer Ben . I ll surely look into it . As far as I get it what I need involves lots of digging . But you gave me a good direction . As far as it goes for fn my permission functions name lacks s on the end . Comment : Does impersonation work on a user that is added to SQL server merely through AD group", "Question : I m facing the following problem : .. . .. . I added a custom list setting which is shown under the general settings of any list . The link in the general settings redirects to an aspx-Site where the admin can set some settings . The normal users without the right permissions can t see the list-settings which is correct but they can open the aspx-site by calling the URL directly and change the values I store in the property-bag of the list . The aspx-Site seems to inherite the permissions from the root but I need it to have the exect same permissions I have for the list-setting page . Does anyone know how to do that Thanks in advance .. . Answer : I found a solution myself . I check the permissions in the code-behind : .. . .. . And I added this to the Elements.xml : .. . .. . Now the user isn t able to see the page unless he has the ManageList permission . Maybe this will help somebody else later . Thanks", "Question : I m trying to figure out what is the best way to manage model access permissions with Django . I have a table of items which belong to the users created them . All the items a managed via a RESTful API . When using this API I want to limit access to the items created by a given user . Do I have to create several tables or is it possible to achieve the same with just one table If I have to use multiple tables how do I correlate API requests with a particular table .. . Answer : if you want generic object-level permissions then you can use a permission backend like django-guardian https : github.com lukaszb django-guardian here http : django-rest-framework.org api-guide permissions djangomodelpermissions is examples for integrating with django-restframework", "Question : I have a wordpress website with several different authors and two admins of which I am one . I have attempted to promote one of my authors to an editor and then an admin so she can edit other authors posts . But it isn t working . She can edit her own posts but when she goes to edit somebody else s post she can t change anything preview button is disabled . I and the other admin are able to edit others posts with no problems . What do I need to do to allow my new editor to edit posts from other authors Edit : I should mention that I tried the User Role Editor plugin to see if that would improve things but it says my editor user should have the right permissions to preview save and publish other people s posts . Edit : Another thing I should have mentioned is that I installed the Hide My WP plugin to block hackers -- and that appears to be the source of my problems . I put details into my answer below . .. . Answer : Wordpress summary of roles : .. . .. . Super Admin somebody with access to the site network administration features and all other features . See the Create a Network article . Administrator somebody who has access to all the administration features within a single site . Editor somebody who can publish and manage posts including the posts of other users . Author somebody who can publish and manage their own posts . Contributor somebody who can write and manage their own posts but cannot publish them . Subscriber somebody who can only manage their profile . Adding special role . First make sure you are using a child theme . In your function.php file put this piece of code . Note : If permission aren t working It s maybe because the codes that handle permissions are modified . To make it easier and solve the problem look for a plugin like User Role Editor and install it . Comment : I actually have tried User Role Editor but it didn t help at all . Is there any other reason the permission doesn t work right Comment : Are you using an updated version Comment : There a bunch of plugin available you may also try to use wordpress.org plugins role-scoper https : wordpress.org plugins role-scoper Comment : I just downloaded it so I assume it is updated I ll give the role-scoper a try as well .", "Question : Currently when I change the camera permissions for my app in Settings then navigate back to my app the app will force a refresh and I will lose my place in the app . I follow these steps exactly : .. . .. . 1 . Open an app that uses the camera permission . 2 . Navigate to some screen within the app so you can visibly see the refresh later .. . 3 . Go to the Settings app navigate to the app s settings and toggle the camera permission .. . 4 . Double click home and go back to the app . After a few seconds it will refresh bringing you back to the first screen .. . .. . Note : I m using an iPhone 6 running iOS 8.4 .. . .. . I ve noticed this behavior on all apps that have the camera permission . My question is : Is there some way to prevent the app from refreshing restarting on resume after changing the camera permission It doesn t seem to happen when you toggle location services for example and from a usability perspective this is horrible . User scenario : If a user navigates deep into your app then needs to change the camera permission because say they accidentally clicked no last time they will be forced to navigate back to that screen when they return . This is especially harmful for an app trying to sell you something or sign you up for a new account . They might try to introduce a new feature where you can use the camera to take a profile-picture or scan your credit-card . Because the user didn t know about this feature they might have previously denied camera access but now want to enable it . After trying to reenable they come back to your app to find they have to spend 5+ minutes signing up making a purchase again After that even I would probably give up . .. . Answer : The accepted answer is correct however the workaround does not appear to work in the current version of iOS 9.2 - the application seems to terminate before UIApplicationWillTerminateNotification is fired . However by listening to UIApplicationDidEnterBackgroundNotification the same can be achieved . e.g in Swift put this in viewDidLoad .. . .. . and have a function like this : Comment : that s helpful . could you put the saving restoring state code in that answer too", "Question : I have been given the task to make the source files of a Rails application non-readable without providing a password root user s password so the client won t be able to peek inside the application which will run on a machine which will be kept in a server-room at the client s . I tried changing the ownership of all the application folder and files and subfolders etc . to root and set permissions to execute-only for other users.. . But to no avail : I achieved the non-readability of the files for the non-root user but it was also impossible to run the app . Running sudo rails .. . didn t work either with these permissions . The machine is running Ubuntu 14.04 . The app is based on Rails 4.2 and Ruby v2.2.1p85 and actually runs behind nginx and is using unicorn + thin as integrated web server .. . If that ever makes a difference . The machine is set to start and automatically login the only non-root user say company without asking for a password and to immediately launch unicorn . One thing I still haven t tried because I think it might be too invasive of an operation is creating a new user account say client and have the machine autologin this new account . While leaving company as the owner of the app files and folders I would set Ubuntu to run unicorn as a different user from the logged in one i.e . company vs . client and it would be impossible to open the file in a reader . How can I achieve my goal if it is even possible .. . Answer : Following your first approach by changing permissions of all files why don t you try to set the set-user-ID-on-execution bit : .. . .. . This will prevent other users from reading and will allow them to execute but while executing they will gain the privileges of the owner which is the interest of set-user-ID . P.S . I don t know if this would work for you but it worths trying . Comment : Could be an acceptable idea but I cannot even start the application when i unicorn rails -c config unicorn.conf.rb . Any way to set the application folder owner to a different user www-data rails whatever works.. . and then launch the application as that user while still logging in company at boot" ] }
[ "yes-answer-long", "yes-answer-short" ]
user-permissions
UNK_RELATION
mobilefirst-cli@interface@107
mobilefirst-cli -- the ibm mobilefirst platform foundation formerly ibm worklight foundation command-line @placeholder cli tool allows to easily create and manage both native and hybrid apps .
{ "confidence": [ 78.02906799316406, 76.66716003417969, 73.66053771972656, 72.708984375, 66.96983337402344, 66.23947143554688, 64.92982482910156, 64.40158081054688, 62.730098724365234, 60.868431091308594, 60.60002517700195, 59.9588737487793, 59.861053466796875, 57.30220031738281, 56.75355529785156, 56.65591049194336, 55.477203369140625, 54.641357421875, 54.41493225097656, 53.999237060546875, 53.6517219543457, 53.57862854003906, 52.82137680053711, 52.45161056518555, 52.12723159790039, 51.11007308959961, 50.949256896972656, 50.84620666503906, 49.58744812011719, 49.14864730834961, 49.14864730834961, 48.85826873779297, 48.82426834106445, 48.38347625732422, 48.294349670410156, 48.097129821777344, 47.02643966674805, 46.66339874267578, 46.5302848815918, 45.803955078125, 45.20209503173828, 45.0498046875, 44.50777816772461, 44.230533599853516, 42.752830505371094, 42.61493682861328, 42.61493682861328, 42.61493682861328, 42.010032653808594, 41.92506790161133, 41.08777618408203, 39.73348617553711, 39.709808349609375, 39.709808349609375, 39.16731643676758, 38.86150360107422, 38.707069396972656, 38.707069396972656, 38.61616516113281, 38.42060852050781, 37.92083740234375, 37.69712829589844, 37.37220764160156, 37.25050735473633, 37.25050735473633, 36.804691314697266, 36.7151985168457, 36.59689712524414, 36.59689712524414, 36.59689712524414, 36.594871520996094, 36.36183166503906, 36.09813690185547, 35.40753936767578, 35.09454345703125, 35.08425521850586, 35.01785659790039, 34.82270431518555, 34.301170349121094, 34.28264617919922, 34.28264617919922, 34.28264617919922, 34.137393951416016, 33.649845123291016, 33.6270866394043, 33.582672119140625, 33.35527420043945, 32.77190399169922, 32.77190399169922, 32.495750427246094, 31.620437622070312, 31.545629501342773, 31.51095962524414, 31.296588897705078, 31.269554138183594, 31.181734085083008, 31.139957427978516, 30.97968101501465 ], "content": [ "0815f84119921c04 - Samsung RIL v3.0 .. . .. . Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 75 throw e TypeError : Cannot read property length of null at ScreenManager.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib utils screen-manager.js : 64 : 52 at Prompt.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 103 : 15 at Prompt.onSubmit Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 116 : 8 at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1535 : 12 at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1469 : 31 at AnonymousObserver.tryCatcher Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 63 : 31 at AutoDetachObserverPrototype.nextohbocxxg5415yfv : kmf cordova hannade", "Ricardos-MBP : LoyaltyReadyApp olivieri .. . .. . mfp bd Error : BUILD FAILED Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 135 : The following error occurred while executing this line : Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 167 : The following error occurred while executing this line : Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 185 : Build of the adapter LoyaltyUserAdapter failed .", "cordova-plugin-mfp-jsonstore 7.1.0 IBM MobileFirst Platform Foundation - JSONStore", "I m getting this error when I try to run on android .. . .. . mobilefirst-cli verb cli process.argv Applications IBM MobileFirst-CLI IBMnode bin node Applications IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js cordova run -d mobilefirst-cli verb cli opts debug : true argv : remain : cordova run cooked : cordova run --debug original : cordova run -d mobilefirst-cli verb cli mobilefirst@7.1.0.00.20151130-1653 mobilefirst-cli verb cli node@v0.10.36 mobilefirst-cli sill mfp cordova cmds running cordova command : run with args : -d", "mobilefirst-cli sill build-deploy-war Error : mobilefirst-cli sill build-deploy-war BUILD FAILED mobilefirst-cli sill build-deploy-war Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT mobilefirst-cli sill build-deploy-war Details : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details .", "mobilefirst-cli verb ant variables -Dworklight.server.install.dir C : Users johan.ibm mobilefirst 7.1.0.00.20160401-2103 server .. . mobilefirst-cli verb ant variables -Dworklight.port 10080 .. . mobilefirst-cli verb ant variables -Dbasedir C : Users johan Documents Workspaces MobileFirst SampleHybridApp mobilefirst-cli verb ant variables -Dworklight.jars.dir C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib .. . mobilefirst-cli verb ant variables -Dworklight.ant.tools.dir C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server ant-tools .. . mobilefirst-cli verb ant variables -Dworklight.hostname 192.168.1.33 .. . mobilefirst-cli verb ant variables -file C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml .. . mobilefirst-cli verb ant task build-WAR .. . Buildfile : C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml .. . .. . build-WAR : .. . echo Building worklight WAR for project SampleHybridApp .. . war-builder Copied 5 empty directories to 4 empty directories under C : Users johan Documents Workspaces MobileFirst SampleHybridApp bin classes .. . war-builder Compiling 2 source files to C : Users johan Documents Workspaces MobileFirst SampleHybridApp bin classes .. . Error : build-WAR Failed Error : .. . BUILD FAILED .. . C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 153 : Could not compile java classes .", "Error : BUILD FAILED Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT Details : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details .", "JDK 1.8.0 92 is installed and the JAVA HOME env variable has been setup accordingly .. . .. . Below is the error I get when trying the mfp start : .. . .. . C : Users johan Documents Workspaces MobileFirst SampleHybridApp mfp start -d .. . mobilefirst-cli verb cli process.argv C : Program Files IBM MobileFirst-CLI IBMnode node.exe C : Program Files IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js start -d .. . mobilefirst-cli verb cli opts debug : true argv : remain : start cooked : start --debug original : start -d .. . mobilefirst-cli verb cli mobilefirst@7.1.0.00.20160401-2108 .. . mobilefirst-cli verb cli node@v0.10.36 .. . Initializing MobileFirst Console .", "yes its part of the IBM mobilefirst platform", "We are working on a project with MobileFirst Platform 7.1 we are using mobilefirst-cli with cordova to create a project : mfp cordova create .", "mobilefirst-cli verb cli finish with mobilefirst start .. . mobilefirst-cli verb code 1 .. . .. . Other MFP CLI command seems to be working since I was able to add a WindowsPhone environment to my Hybrid app project.. . .. . .. . Could someone please provide some help", "I recently installed IBM MobileFirst CLI on my Mac but I don t seem to be able to start the Server .", "Currently i m using eclipse with MobileFirst Studio for developing mobilefirst platform foundation projects .", "I am using MobileFirst CLI 7.1 .", "It is not possible to upgrade the Cordova version provided by MobileFirst in the MobileFirst CLI .", "mfp server remove - Remove the MFP server using the MFP CLI .. . rm -R .ibm mobilefirst 7.1 .", "I obviously have installed mobilefirst-cli using npm-install -g path-to-cli-.tgz-file .. . .. . How can I check verify if mobilefirst-cli is successfully installed on Mac", "This must be done using either MobileFirst Studio or MobileFirst CLI .", "i am try with this link Integrating IBM MobileFirst Platform Foundation SDK in Cordova applications https : mobilefirstplatform.ibmcloud.com tutorials en foundation 7.1 hello-world integrating-mfpf-sdk-in-cordova-applications but unfortunately this error occur .", "This is required as some functions of the MobileFirst CLI require Ant .", "I am using MobileFirst 7.1 CLI mfp push to build and deploy to remote Azure VM MobileFirst Development Server .", "After doing 1 also uninstall the CLI Applications IBM MobileFirst-CLI Uninstaller and download the latest available iFix from IBM Fix Central which contains several bug fixes for the CLI including a potential fix for the server mentioned in the question .", "Enter a path to an app template to be added : cordova-hello-world-mfp .. . Embedded Cordova Command : cordova create myapp com.ibm.myapp myapp --copy-from Applications IBM MobileFirst-CLI mobilefirst-cli node-modules cordovacmd cordova templates cordova-hello-world-mfp Adding ios project.. .", "I want to deploy my MobileFirst CLI application to an android device .", "MobileFirst Platform Foundation does not support Java 8 - you may only use Java 6 or 7 .", "I m working with an IBM MobileFirst Platform 7.1 server supported by the Command-Line interface however my server isn t starting and stopping correctly .", "I want to deploy my MobileFirst CLI application to an IOS device .", "I m developing a new MFP MobileFirst Platform Application based on Cordova CLI provided IBM throughout this Tuto Integrating IBM MobileFirst Platform Foundation SDK in Cordova applications https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications But apparently It doesn t support adding blackberry10 and windowsPhone8 platforms .", "I m getting the following Error while starting MobileFirst 7.1 Cli Server with command mfp start .. . .. . I uninstalled the MobileFirst 7.1 CLI and installed it again but getting the same error while starting the server .", "I am now using MobileFirst CLI : 7.1.0.00.20150913-2352 .", "Turns out there is an issue with the current latest release of MobileFirst CLI 20151130-1653 .", "can you check this link developer.ibm.com mobilefirstplatform 2015 08 14 https : developer.ibm.com mobilefirstplatform 2015 08 14 ibm-mobilefirst-platform-foundation-7-1-is-here", "The version of Cordova-Android in MobileFirst Platform Foundation 7.1 is 3.6.4 so will not be able to parse that tag .", "You already asked the second question : How to deploy MobileFirst CLI application to an android device http : stackoverflow.com questions 35505335 how-to-deploy-mobilefirst-cli-application-to-an-android-device .", "I m getting an error when I try to push my runtime to the MFP CLI server .. . .. . version 7.1.0.00.20151219-1541 .. . .. . install-WAR : configureapplicationserver Logging output of task to file Users hannade .mobilefirst platform server configuration-logs configureApplicationServer 2015 12 24 09 39 49.log configureapplicationserver WARNING : The Reports database is deprecated in IBM MobileFirst Platform Foundation since V7.0.0 .", "Users imaya .ibm mobilefirst 6.3.0 server wlp bin server : line 744 : 18563 Abort trap : 6 JAVA CMD @ JAVA CMD LOG 2 1 Error : The MobileFirst server failed to start .", "This chain of commands forcibly kills your MobileFirst server then deletes it and recreates it from scratch : .. . .. . kill -9 cat .ibm mobilefirst 7.1 .", "I want to use the live reload automatic war re-deploy to server when files change but when using the mobilefirst platform CLI .", "flowing this link https : mobilefirstplatform.ibmcloud.com tutorials en foundation 7.0 advanced-client-side-development using-cli-create-build-manage-project-artifacts for installation MFP CLI .. . .. . downlaod install successfully... .", "Installed Mobile first CLI 7.0.0.0 .. . .. . When I try to open mfp cli it is giving the following error .. . .. . broken cli but I guess any fixes available in IBM Fix central I tried to search but not able to find a fix for this .. . .. . module.js : 340 throw err Error : Cannot find module Applications IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js at Function.Module . resolveFilename module.js : 338 : 15 at Function.Module . load module.js : 280 : 25 at Function.Module.runMain module.js : 497 : 10 at startup node.js : 119 : 16 at node.js : 906 : 3", "you can be get idea from this tutorial he also configure windows and Mac He use CLI for Current installed Liberty Core with MobileFirst server .. . .. . Task : Create MobileFirst Platform Server configuration install runtime environment and verify installation on Ubuntu Server using test application .. . .. . Description : Using Server Configuration Tool create MobileFirst Platform Server configuration and then setup runtime environment .", "Navigate into a MobileFirst project and run the command mfp start .", "I m trying to register iOS native apps to a Bluemix Mobile Foundation server https : console.ng.bluemix.net catalog services mobile-foundation using mfpdev CLI in an unattended way .", "when i try to deploy my project using MFP CLI it gives the following error .. . .. . mfp info .. . .. . xxxx-Macmini : Nauth user-x mfp info .. . OS : darwin x64 Release : 11.4.2 System Memory : 128 MB free out of 4096 MB Node : v0.10.30 MobileFirst CLI : 7.0.0.00.20150610-1400 Current directory : Volumes Development wlsamples NAuth2 apps Nauth .. . .. . Current project : Volumes Development wlsamples NAuth2 .. . .. . Adapter : SqlAuth Volumes Development wlsamples NAuth2 adapters SqlAuth SqlAuth.xml Description : SqlAuth Type : sql Procedures : readuser submitAuthentication getBalance .. . .. . Application : Nauth Volumes Development wlsamples NAuth2 apps Nauth application-descriptor.xml Description : Nauth Type : hybrid application Features : Environments : iphone Skins : .. . .. . Server location : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server Server binary : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server wlp bin server MobileFirst instance : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server wlp usr servers worklight objc 26232 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.8.0 45.jdk Contents Home jre bin java and Library Java JavaVirtualMachines jdk1.8.0 45.jdk Contents Home jre lib libinstrument.dylib .", "I recently installed Liberty Core server created a new Profile installed MobileFirst Platform Server and deployed a MobileFirst runtime environment with the Server Configuration Tool in MacBook .", "I am using mobilefirst 7.1 CLI and have my services running on tomcat .", "I am using MobileFirst CLI 7.1 Java 1.8.0 65 on Mac OS X 10.9.5 if it matters .", "I am using the MobileFirst CLI to start stop a development server and push code to it .", "I faced same problem .. . when you download CLI Zip from IBM site .", "Total time : 1 second .. . .. . mobilefirst-cli sill jse shortmsg : Error deploying WAR file to server . nError : nBUILD FAILED n Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT nDetails : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . n nTotal time : 1 second n jse summary : Error deploying WAR file to server . nError : nBUILD FAILED n Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT nDetails : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . n nTotal time : 1 second n message : Error deploying WAR file to server . nError : nBUILD FAILED n Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT nDetails : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . n nTotal time : 1 second n mobilefirst-cli sill could not determine status of the following deployablable : platform : Common platformId : hybridCommonLegacy platformDirectory : Users hannade Developer KMF kmf apps test type : application environment : common applicationDirectory : Users hannade Developer KMF kmf mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin technology : hybrid structure : Legacy status : APP SOURCE FOUND debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters JSDataAdapter mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters deposit mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositHistory mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositsToReview mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters history mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters review mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters test mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly Error : Push has failed mobilefirst-cli verb cli finish with mobilefirst push mobilefirst-cli verb code 0 macsupports-MacBook-Pro-8 : kmf hannade", "This is a known problem in some versions of the CLI and the Foundation team just delivered a fix which is now available on Fix Central http : www-933.ibm.com support fixcentral swg selectFixes parent ibm Other 2Bsoftware product ibm Other 20software IBM 20MobileFirst 20Platform 20Foundation release 7.1.0.0 platform All function all .", "entitlements-Release.plist and entitlements-debug.plist edits are alright so more clarification check out this link mobilefirst native ios keychain wrapper issue http : stackoverflow.com questions 28255161 mobilefirst-native-ios-keychain-wrapper-issue", "Initializing MobileFirst Console .", "without mobilefirst and it worked .", "Running command : Users add to body class : platform-android .. . .. . Running IBM Worklight Hook : cordova-plugin-mfp wlclient.properties is missing .", "If you are using MobileFirst 8.0 https : mobilefirstplatform.ibmcloud.com downloads then the executable will be mfpdev", "We faced this issue before on WL 6.2 and IBM had to provide iFix for our CLI to compile the project with High resolution .", "is this link you gave the latest mfp cli how do I get to IBM fix central to make sure", "configureapplicationserver See http : ibm.biz knowctr SSHS8R 7.1.0 com.ibm.worklight.monitor.doc monitor c op analytics overview.html mobilefirst-cli sill build-deploy-war Error deploying WAR file to server .", "The CLI does not have a command to remove an environment .", "mfp console Opens the MobileFirst Console in your default web browser .. . .. . more details .. . .. . https : developer.ibm.com mobilefirstplatform documentation getting-started-6-3 advanced-client-side-development using-cli-create-build-manage-project-artifacts", "I have an error with MobileFirst Foundation 7.1 when i want to run my application on my device with command : mfp cordova run -p android : .. . .. . I don t understand what the problem is with gradle", "In a Hybrid app one of the benefits of Worklight was that we own the native and web portion .", "supplement the MobileFirst files with the plugin information from the Cordova project as like below link and copy the staged and modified files to MobileFirst .", "I didn t start any other MobileFirst Servers even the Eclipse s MobileFirst Server .", "cordova : .. . .. . create a Cordova project .. . .. . add the cordova-plugin-mauron85-background-geolocation .. . .. . Mobilefirst : .. . .. . create a MobileFirst project .. . .. . copy the plugin files from both projects to a staging area so we can easily identify them .. . .. . merge the config.xml and cordova plugin.js files i.e .", "i am trying to use mobilefirst-cli 7.1 to build a cordova app using mfp cordova create Everything worked fine and got my app working and tested using mfp preview .", "Server Commands .. . .. . Navigate into a MobileFirst project .. . .. . mfp start Starts the server .", "Imayas-MBP : EmployeeDirectory imaya mfp start Initializing MobileFirst Console .", "The problem here is the second error : .. . .. . The MobileFirst server failed to start .", "i faced same problem .. . when you download CLI Zip from IBM site .", "I m working with a client who s considering migrating their existing MobileFirst Platform 7.1 hybrid app https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world your-first-hybrid-application to the Cordova app type https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications .", "you have to flowing below step to work with mobilefirst .", "This feature does not exist in the CLI .", "The above does not happen automatically like it happens when using MobileFirst Studio .", "yes it was MobileFirst 8.0 and I could run mfpdev executable but in all docs it is mentioned as mfp .", "Using the CLI create a new project and application and try to start the server .", "As for creating an Ionic-based app using MFP Cordova I suggest that you will follow this : https : www.raymondcamden.com 2015 03 23 working-with-ibm-mobilefirst-and-the-ionic-framework", "I can suggest you to upgrade to the latest available CLI from IBM Fix Central you can check for the version you are currently using by running the command mfp -v .", "There are CLI commands to stop and start the server .", "The CLI is not supposed to deploy the .war file .", "The CLI only handles the project artifacts .", "@VivinK I already install mobilefirst plugin 7.1 java-7 CLI android sdk 22.so do i need ANT installed in my system .", "Run the command mfp push to push an adapter to your locally running MobileFirst Server .", "using MobileFirst Platform CLI version 7.1.0.00.20151227-1730 I have suddenly the following error when trying to push an update I made to an adapter : .. . .. . I have tried to cleanup the project remove what was already deployed revert my changes to what I had when I succeeded to deploy re-install mfp cli but I still have the issue .", "waiting for IBM to chime in", "mobilefirst-cli sill build-deploy-war mobilefirst-cli sill build-deploy-war Total time : 1 second mobilefirst-cli sill build-deploy-war mobilefirst-cli sill mfp push-main project not valid : cmdInfo : debugLevel : silly cwd : Users hannade Developer KMF kmf rawArgs : remain : cooked : --dd original : --dd deployables : platform : Common platformId : hybridCommonLegacy platformDirectory : Users hannade Developer KMF kmf apps test type : application environment : common applicationDirectory : Users hannade Developer KMF kmf mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin technology : hybrid structure : Legacy status : APP SOURCE FOUND debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters JSDataAdapter mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters deposit mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositHistory mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositsToReview mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters history mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters review mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters test mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly projectType : MFP LEGACY PROJECT projectPath : Users hannade Developer KMF kmf backendRuntime : path : Users hannade Developer KMF kmf localServerInfo : local : true protocol : http host : localhost port : 10080 login : admin password : YWRtaW4 wlpInstallDir : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server wlpServerName : worklight jarDir : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server WorklightServer version : 7.1.0.00.20151219-1535 serversDirectory : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server name : kmf mobileFirstPath : Users hannade Developer KMF kmf mobilefirst Error : Error deploying WAR file to server .", "Have you tried with a newer CLI build", "Is the MFP CLI 7.1 supported on Windows 10", "I am trying to build my MFP cordova Ionic based hybrid application created using CLI .", "You asked this same question in the comments of the tutorial : https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation advanced-client-side-development updated-using-cli-to-create-build-and-manage-mobilefirst-project-artifacts comment-33161 .. . .. . The answer is the same : .. . .. . MFP Cordova-baed applications do not support the BlackBerry 10 and Windows Phone 8 platforms .", "is it possible to create an MFP cordova CLI based project add iOS and Android platform .", "I have enabled the basic app authenticity for the mobilefirst based hydrid android app as per the instruction in enter link description here https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation authentication-security application-authenticity-protection .. . .. . But when i run it on the android phone the app crashes .", "Download the latest CLI build available from IBM Fix Central or this one http : public.dhe.ibm.com ibmdl export pub software products en MobileFirstPlatform mobilefirst-cli installer 7.1.0.zip from November 14th .", "Building an apk is not related to MFP or CLI or Cordova .", "I am using mobilefirst push-notification service in my application .", "The errors we get when using the CLI right away for building and deploying mfp bd after a fresh pull from Git are the following : .. . .. . mfp info OS : darwin x64 Release : 14.3.0 System Memory : 2845 MB free out of 16384 MB Node : v0.10.30 MobileFirst CLI : 7.0.0.00.20150430-1604 Current directory : Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp .. . .. . Current project : Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp .. . .. . Adapter : LoyaltyPushAdapter Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp adapters LoyaltyPushAdapter LoyaltyPushAdapter.xml Description : LoyaltyPushAdapter Type : http Procedures : submitNotification .. . .. . Adapter : LoyaltyUserAdapter Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp adapters LoyaltyUserAdapter LoyaltyUserAdapter.xml Description : LoyaltyUserAdapter Type : java Procedures : Unavailable for Java adapters .. . .. . Application : Loyalty Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp apps Loyalty application-descriptor.xml Description : Loyalty Type : native ios .. . .. . Server location : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server Server binary : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server wlp bin server MobileFirst instance : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server wlp usr servers worklight objc 4021 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre bin java and Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre lib libinstrument.dylib .", "Use MFP CLI to push to the server ." ] }
{ "confidence": [ 112.27949523925781, 109.90435791015625, 105.84367370605469, 104.6087417602539, 103.2968521118164, 97.49310302734375, 96.53965759277344, 96.23970794677734, 95.58526611328125, 94.89834594726562, 92.54190063476562, 90.16934204101562, 88.33592987060547, 85.520751953125, 85.04368591308594, 83.02613830566406, 78.39262390136719, 78.04988861083984, 76.48414611816406, 75.61925506591797 ], "content": [ "Question : I ve just installed the version 7.1 of the MFP CLI on a Windows 10 VMware . JDK 1.8.0 92 is installed and the JAVA HOME env variable has been setup accordingly .. . .. . Below is the error I get when trying the mfp start : .. . .. . C : Users johan Documents Workspaces MobileFirst SampleHybridApp mfp start -d .. . mobilefirst-cli verb cli process.argv C : Program Files IBM MobileFirst-CLI IBMnode node.exe C : Program Files IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js start -d .. . mobilefirst-cli verb cli opts debug : true argv : remain : start cooked : start --debug original : start -d .. . mobilefirst-cli verb cli mobilefirst@7.1.0.00.20160401-2108 .. . mobilefirst-cli verb cli node@v0.10.36 .. . Initializing MobileFirst Console . mobilefirst-cli verb ant variables -Dworklight.server.install.dir C : Users johan.ibm mobilefirst 7.1.0.00.20160401-2103 server .. . mobilefirst-cli verb ant variables -Dworklight.port 10080 .. . mobilefirst-cli verb ant variables -Dbasedir C : Users johan Documents Workspaces MobileFirst SampleHybridApp mobilefirst-cli verb ant variables -Dworklight.jars.dir C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib .. . mobilefirst-cli verb ant variables -Dworklight.ant.tools.dir C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server ant-tools .. . mobilefirst-cli verb ant variables -Dworklight.hostname 192.168.1.33 .. . mobilefirst-cli verb ant variables -file C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml .. . mobilefirst-cli verb ant task build-WAR .. . Buildfile : C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml .. . .. . build-WAR : .. . echo Building worklight WAR for project SampleHybridApp .. . war-builder Copied 5 empty directories to 4 empty directories under C : Users johan Documents Workspaces MobileFirst SampleHybridApp bin classes .. . war-builder Compiling 2 source files to C : Users johan Documents Workspaces MobileFirst SampleHybridApp bin classes .. . Error : build-WAR Failed Error : .. . BUILD FAILED .. . C : Program Files IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 153 : Could not compile java classes . Make sure JAVA HOME points to the JDK and the classpath is correctly set . Total time : 1 second .. . Error : The server start-up process failed . mobilefirst-cli verb cli finish with mobilefirst start .. . mobilefirst-cli verb code 1 .. . .. . Other MFP CLI command seems to be working since I was able to add a WindowsPhone environment to my Hybrid app project.. . .. . .. . Could someone please provide some help Is the MFP CLI 7.1 supported on Windows 10 Thanks .. . .. . Environment variables http : i.stack.imgur.com jKejF.png Comment : 1 . Provide your JAVA HOME and your PATH to make sure JAVA HOME is really there 2 . try with Java 1.7 Comment : @Johan did it work Comment : @DoraC No it did not Comment : @IdanAdar I downgraded to Java7 and updated the env variables please see the screenshot above . Still the same issue Comment : Can you try mfp stop create a new hybrid app and see if the issue still occurs .. . Answer : In MFP 7.1 JDK 1.8 is not supported . Please use JDK 1.7 . Run mfp stop and try creating a new hybrid app to see if the issue is still occurring . You can also remove the .war file and start the server again and it will rebuild the war file .", "Question : I m getting an error when I try to push my runtime to the MFP CLI server .. . .. . version 7.1.0.00.20151219-1541 .. . .. . install-WAR : configureapplicationserver Logging output of task to file Users hannade .mobilefirst platform server configuration-logs configureApplicationServer 2015 12 24 09 39 49.log configureapplicationserver WARNING : The Reports database is deprecated in IBM MobileFirst Platform Foundation since V7.0.0 . configureapplicationserver Use Operational Analytics instead . configureapplicationserver See http : ibm.biz knowctr SSHS8R 7.1.0 com.ibm.worklight.monitor.doc monitor c op analytics overview.html mobilefirst-cli sill build-deploy-war Error deploying WAR file to server . mobilefirst-cli sill build-deploy-war Error : mobilefirst-cli sill build-deploy-war BUILD FAILED mobilefirst-cli sill build-deploy-war Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT mobilefirst-cli sill build-deploy-war Details : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . mobilefirst-cli sill build-deploy-war mobilefirst-cli sill build-deploy-war Total time : 1 second mobilefirst-cli sill build-deploy-war mobilefirst-cli sill mfp push-main project not valid : cmdInfo : debugLevel : silly cwd : Users hannade Developer KMF kmf rawArgs : remain : cooked : --dd original : --dd deployables : platform : Common platformId : hybridCommonLegacy platformDirectory : Users hannade Developer KMF kmf apps test type : application environment : common applicationDirectory : Users hannade Developer KMF kmf mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin technology : hybrid structure : Legacy status : APP SOURCE FOUND debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters JSDataAdapter mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters deposit mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositHistory mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositsToReview mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters history mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters review mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters test mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly projectType : MFP LEGACY PROJECT projectPath : Users hannade Developer KMF kmf backendRuntime : path : Users hannade Developer KMF kmf localServerInfo : local : true protocol : http host : localhost port : 10080 login : admin password : YWRtaW4 wlpInstallDir : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server wlpServerName : worklight jarDir : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server WorklightServer version : 7.1.0.00.20151219-1535 serversDirectory : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server name : kmf mobileFirstPath : Users hannade Developer KMF kmf mobilefirst Error : Error deploying WAR file to server . Error : BUILD FAILED Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT Details : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . Total time : 1 second .. . .. . mobilefirst-cli sill jse shortmsg : Error deploying WAR file to server . nError : nBUILD FAILED n Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT nDetails : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . n nTotal time : 1 second n jse summary : Error deploying WAR file to server . nError : nBUILD FAILED n Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT nDetails : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . n nTotal time : 1 second n message : Error deploying WAR file to server . nError : nBUILD FAILED n Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 413 : Element inside inside : Cannot access database jdbc : derby : Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT nDetails : java.sql.SQLException : Failed to start database Users hannade .ibm mobilefirst 7.1.0.00.20151219-1535 server derby kmf WRKLGHT with class loader AntClassLoader Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib worklight-ant-deployer.jar see the next exception for details . n nTotal time : 1 second n mobilefirst-cli sill could not determine status of the following deployablable : platform : Common platformId : hybridCommonLegacy platformDirectory : Users hannade Developer KMF kmf apps test type : application environment : common applicationDirectory : Users hannade Developer KMF kmf mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin technology : hybrid structure : Legacy status : APP SOURCE FOUND debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters JSDataAdapter mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters deposit mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositHistory mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters depositsToReview mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters history mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters review mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly mobilefirst-cli sill could not determine status of the following deployablable : applicationDirectory : Users hannade Developer KMF kmf platformDirectory : Users hannade Developer KMF kmf adapters test mfpConfigDirectory : Users hannade Developer KMF kmf archiveDirectory : Users hannade Developer KMF kmf bin type : adapter status : APP SOURCE FOUND technology : hybrid platform : Adapter structure : Legacy platformId : hybridAdapterLegacy debugLevel : silly Error : Push has failed mobilefirst-cli verb cli finish with mobilefirst push mobilefirst-cli verb code 0 macsupports-MacBook-Pro-8 : kmf hannade Comment : once I hopped off my proxy network at work it worked fine why is this do i need to set proxies for mfp cli Comment : updated the error using the debug flag this is still a problem for me .. . Answer : Difficult to tell from the exception . You can try again with the debug flag as it may tell more . Alternatively you can open a PMR to have the development team further investigate it . As it it the workaround it not connect to the proxy at the same time . Sounds like a potential bug.. .", "Question : I m getting this error when I try to run on android .. . .. . mobilefirst-cli verb cli process.argv Applications IBM MobileFirst-CLI IBMnode bin node Applications IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js cordova run -d mobilefirst-cli verb cli opts debug : true argv : remain : cordova run cooked : cordova run --debug original : cordova run -d mobilefirst-cli verb cli mobilefirst@7.1.0.00.20151130-1653 mobilefirst-cli verb cli node@v0.10.36 mobilefirst-cli sill mfp cordova cmds running cordova command : run with args : -d What platforms do you want to run on android Searching for list of Devices.. . Which device id do you want to target 0815f84119921c04 - Samsung RIL v3.0 .. . .. . Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 75 throw e TypeError : Cannot read property length of null at ScreenManager.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib utils screen-manager.js : 64 : 52 at Prompt.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 103 : 15 at Prompt.onSubmit Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 116 : 8 at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1535 : 12 at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1469 : 31 at AnonymousObserver.tryCatcher Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 63 : 31 at AutoDetachObserverPrototype.nextohbocxxg5415yfv : kmf cordova hannade .. . Answer : This is a known problem in some versions of the CLI and the Foundation team just delivered a fix which is now available on Fix Central http : www-933.ibm.com support fixcentral swg selectFixes parent ibm Other 2Bsoftware product ibm Other 20software IBM 20MobileFirst 20Platform 20Foundation release 7.1.0.0 platform All function all . Look for interim fix 7.1.0.0-MFPF-IF201602291240 or later and APAR number PI56876 . Please give it a look and let me know if it resolves this problem .", "Question : when i try to deploy my project using MFP CLI it gives the following error .. . .. . mfp info .. . .. . xxxx-Macmini : Nauth user-x mfp info .. . OS : darwin x64 Release : 11.4.2 System Memory : 128 MB free out of 4096 MB Node : v0.10.30 MobileFirst CLI : 7.0.0.00.20150610-1400 Current directory : Volumes Development wlsamples NAuth2 apps Nauth .. . .. . Current project : Volumes Development wlsamples NAuth2 .. . .. . Adapter : SqlAuth Volumes Development wlsamples NAuth2 adapters SqlAuth SqlAuth.xml Description : SqlAuth Type : sql Procedures : readuser submitAuthentication getBalance .. . .. . Application : Nauth Volumes Development wlsamples NAuth2 apps Nauth application-descriptor.xml Description : Nauth Type : hybrid application Features : Environments : iphone Skins : .. . .. . Server location : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server Server binary : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server wlp bin server MobileFirst instance : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server wlp usr servers worklight objc 26232 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.8.0 45.jdk Contents Home jre bin java and Library Java JavaVirtualMachines jdk1.8.0 45.jdk Contents Home jre lib libinstrument.dylib . One of the two will be used . Which one is undefined . WebSphere Application Server 8.5.5.4 1.0.7.cl50420141121-1414 on Java HotSpot TM 64-Bit Server VM version 1.8.0 45-b14 en US .. . .. . Environment variables : TERM PROGRAM : Apple Terminal rvm bin path : Users user-x .rvm bin TERM : xterm-256color SHELL : bin bash TMPDIR : var folders 0m ftx97h0n1rbcdwb3b3sv18lm0000gn T Apple PubSub Socket Render : tmp launch-pbGaeh Render TERM PROGRAM VERSION : 303.2 TERM SESSION ID : 8CB82941-523E-4034-BCA0-470F186ED261 USER : user-x COMMAND MODE : unix2003 system type : Darwin rvm path : Users user-x .rvm SSH AUTH SOCK : tmp launch-n9tSIx Listeners CF USER TEXT ENCODING : 0x1F5 : 0 : 0 Apple Ubiquity Message : tmp launch-bCTtmF Apple Ubiquity Message WEBWORKS HOME : Applications BB10 WebWorks SDK 2.2.0.15 rvm prefix : Users user-x PATH : Applications BB10 WebWorks SDK 2.2.0.15 : Applications BB10 WebWorks SDK 2.2.0.15 cordova-blackberry bin dependencies bb-tools bin : opt local bin : opt local sbin : usr local bin : usr bin : bin : usr sbin : sbin : usr local bin : usr X11 bin : usr local git bin : Applications IBM MobileFirst-CLI : Users user-x .rvm bin PWD : Volumes Development wlsamples NAuth2 apps Nauth JAVA HOME : Library Java JavaVirtualMachines jdk1.8.0 45.jdk Contents Home system arch : i386 system version : 10.7 rvm version : 1.26.11 latest SHLVL : 2 HOME : Users user-x LOGNAME : user-x LC CTYPE : UTF-8 DISPLAY : tmp launch-BI7HzF org.x : 0 system name : OSX : Applications IBM MobileFirst-CLI IBMnode bin node WLP USER DIR : Users user-x .ibm mobilefirst 7.0.0.00.20150610-1353 server wlp usr .. . .. . Java home is set properly .. . xxxx-Macmini : Nauth user-x echo JAVA HOME .. . Library Java JavaVirtualMachines jdk1.8.0 45.jdk Contents Home Comment : If my answer helped you please mark as Answered . .. . Answer : 1 . MobileFirst Platform Foundation does not support Java 8 - you may only use Java 6 or 7 . 2 . After doing 1 also uninstall the CLI Applications IBM MobileFirst-CLI Uninstaller and download the latest available iFix from IBM Fix Central which contains several bug fixes for the CLI including a potential fix for the server mentioned in the question .", "Question : I m developing a new MFP MobileFirst Platform Application based on Cordova CLI provided IBM throughout this Tuto Integrating IBM MobileFirst Platform Foundation SDK in Cordova applications https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications But apparently It doesn t support adding blackberry10 and windowsPhone8 platforms . Is there a way to add those platforms in an MFP Cordova based projects so I can built artifacts .wlapp and have the same behavior for android and ios . .. . Answer : You asked this same question in the comments of the tutorial : https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation advanced-client-side-development updated-using-cli-to-create-build-and-manage-mobilefirst-project-artifacts comment-33161 .. . .. . The answer is the same : .. . .. . MFP Cordova-baed applications do not support the BlackBerry 10 and Windows Phone 8 platforms . Comment : is it possible to create an MFP cordova CLI based project add iOS and Android platform . Then add the blackberry10 and WP8 platforms in the backend MFP project So I can build iOS and Android with cordova but once it comes to BB10 and WP8 I build them with only MFP . Comment : Your server can serve both MFP Cordova and regular Hybrid apps . You could have 2 projects - one for the Cordova apps and one for the BB WP8 apps those 2 projects will be served by the same server .", "Question : I recently installed IBM MobileFirst CLI on my Mac but I don t seem to be able to start the Server . See error below . I searched the internet and found that there is a bug in JDK which causes the JavaLaunchHelper error . I downloaded the beta version that supposedly fixes the issue from here - JDK Download Link https : jdk7.java.net download.html . But this doesn t help either . Any other help is appreciated . Imayas-MBP : EmployeeDirectory imaya mfp start Initializing MobileFirst Console . objc 18564 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.7.0 80.jdk Contents Home bin java and Library Java JavaVirtualMachines jdk1.7.0 80.jdk Contents Home jre lib libinstrument.dylib . One of the two will be used . Which one is undefined . Starting server worklight . Server worklight start failed . Check server logs for details . Users imaya .ibm mobilefirst 6.3.0 server wlp bin server : line 744 : 18563 Abort trap : 6 JAVA CMD @ JAVA CMD LOG 2 1 Error : The MobileFirst server failed to start . The port may be in use by another instance of a running server or the server may not exist . .. . Answer : The JavaLaunchHelper error is not the problem here Anyone using Java 7 will experience it but things will work regardless . The problem here is the second error : .. . .. . The MobileFirst server failed to start . The port may be in use by another instance of a running server or the server may not exist . Verify you do not have an already running server that was started either by the CLI or by MFP Studio in an Eclipse installation . 1 . In the command-line run mfp stop .. . 2 . In Eclipse well quit it .. . 3 . Make sure the Java process is not running .. . .. . Then start over . Using the CLI create a new project and application and try to start the server . For example : .. . .. . 1 . cd Users idanadar Desktop .. . 2 . mfp create testProject .. . 3 . cd testProject .. . 4 . mfp add hybrid testApp .. . 5 . mfp start .. . 6 . mfp build .. . 7 . mfp deploy .. . 8 . mfp console Comment : Thanks . I had the Java process running which was causing the problem . I killed it and executed the start command and now everything seems OK .", "Question : I m getting this error when I try to run on android .. . .. . mobilefirst-cli verb cli process.argv Applications IBM MobileFirst-CLI IBMnode bin node Applications IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js cordova run -d mobilefirst-cli verb cli opts debug : true argv : remain : cordova run cooked : cordova run --debug original : cordova run -d mobilefirst-cli verb cli mobilefirst@7.1.0.00.20151130-1653 mobilefirst-cli verb cli node@v0.10.36 mobilefirst-cli sill mfp cordova cmds running cordova command : run with args : -d What platforms do you want to run on android Searching for list of Devices.. . Which device id do you want to target 0815f84119921c04 - Samsung RIL v3.0 .. . .. . Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 75 throw e TypeError : Cannot read property length of null at ScreenManager.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib utils screen-manager.js : 64 : 52 at Prompt.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 103 : 15 at Prompt.onSubmit Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 116 : 8 at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1535 : 12 at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1469 : 31 at AnonymousObserver.tryCatcher Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 63 : 31 at AutoDetachObserverPrototype.nextohbocxxg5415yfv : kmf cordova hannade .. . Answer : I have the MFP CLI build version 7.1.0.00.20151227-1730 and command .. . .. . runs alright for an emulator device however for a physical device I get the same error .. . .. . This appears to be an issue specific to using physical devices to run the cordova application .", "Question : I m working with a client who s considering migrating their existing MobileFirst Platform 7.1 hybrid app https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world your-first-hybrid-application to the Cordova app type https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications . They are trying to understand if this app type would still give them access to MobileFirst APIs such as WL.App.sendActionToNative http : www-01.ibm.com support knowledgecenter SSHS8R 7.1.0 com.ibm.worklight.dev.doc devref c action sender.html lang en to easily bridge the native and JS layers . The list of supported and unsupported features https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications supportedMFPFeatures doesn t mention those APIs are they supported in Cordova-type apps Comment : can you check this link developer.ibm.com mobilefirstplatform 2015 08 14 https : developer.ibm.com mobilefirstplatform 2015 08 14 ibm-mobilefirst-platform-foundation-7-1-is-here Comment : Hi - thanks I ve seen that . I don t think it answers the question directly . Comment : developer.ibm.com mobilefirstplatform documentation https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications supportedMFPFeatures Comment : Nazmul thanks . That link is in my question : It doesn t answer the question . .. . Answer : Well.. . In a Hybrid app one of the benefits of Worklight was that we own the native and web portion . You could create a Cordova plug-in based on the tutorials if you wanted but with SendActionToNative - because we own both sides - helped here by bridging the two ends negating the need for a Cordova plug-in . This feature is a Cordova plug-in in itself internally . In a pure Cordova apps we don t own both ends . Only the web end.. . The MFP SDK is now a Cordova plug-in . Anyway yes you could enter the platform folder where the native-code is and use those APIs and it should work but in a Cordova world that does not make much sense - you re not supposed to touch any native code.. . you re supposed to use Cordova plug-ins in order to interactive with the native later.. .", "Question : I m getting this error when I try to run on android .. . .. . mobilefirst-cli verb cli process.argv Applications IBM MobileFirst-CLI IBMnode bin node Applications IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js cordova run -d mobilefirst-cli verb cli opts debug : true argv : remain : cordova run cooked : cordova run --debug original : cordova run -d mobilefirst-cli verb cli mobilefirst@7.1.0.00.20151130-1653 mobilefirst-cli verb cli node@v0.10.36 mobilefirst-cli sill mfp cordova cmds running cordova command : run with args : -d What platforms do you want to run on android Searching for list of Devices.. . Which device id do you want to target 0815f84119921c04 - Samsung RIL v3.0 .. . .. . Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 75 throw e TypeError : Cannot read property length of null at ScreenManager.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib utils screen-manager.js : 64 : 52 at Prompt.render Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 103 : 15 at Prompt.onSubmit Applications IBM MobileFirst-CLI mobilefirst-cli node-modules mfp cordova cmds node-modules inquirer lib prompts list.js : 116 : 8 at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.next Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1535 : 12 at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onNext Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 1469 : 31 at AnonymousObserver.tryCatcher Applications IBM MobileFirst-CLI mobilefirst-cli node-modules rx-lite rx.lite.js : 63 : 31 at AutoDetachObserverPrototype.nextohbocxxg5415yfv : kmf cordova hannade .. . Answer : Have you tried with a newer CLI build I see the following is available : http : public.dhe.ibm.com ibmdl export pub software products en MobileFirstPlatform mobilefirst-cli installer 7.1.0.zip .. . .. . I have a slightly older build installed 7.1.0.00.20151023-1449 and after creating a MFP Cordova app with the Android environment I was able to successfully run it in the Android Emulator . I suggest that you will try with the above newer build .", "Question : I recently installed Liberty Core server created a new Profile installed MobileFirst Platform Server and deployed a MobileFirst runtime environment with the Server Configuration Tool in MacBook . Instead of installing in default directory Application ibm I choose to install under custom directory Users username LibertyCore . I started the server manually installed adapters and .wlapp from worklight-console . Instead of doing this manual deployment I want to do it from command-line My understanding is I have to use MFP command-line utility . I installed MFP CLI utility then parsed to the App Project folder to build and deploy to currently installed Liberty Core server I see issue with MFP PUSH it says server is not started though server is running . So when I do MFP Info I found that CLI is pointing to completely different set up . How can I make CLI to point to currently installed Liberty Server . Comment : Did you try first mfp start inside the project folder from command-line .. . Answer : you can be get idea from this tutorial he also configure windows and Mac He use CLI for Current installed Liberty Core with MobileFirst server .. . .. . Task : Create MobileFirst Platform Server configuration install runtime environment and verify installation on Ubuntu Server using test application .. . .. . Description : Using Server Configuration Tool create MobileFirst Platform Server configuration and then setup runtime environment . Deploy test application and adapter verify server installation using test application .. . .. . https : www.youtube.com watch v UT6PDQc1mwA list PLjwX5wNxSyMfkzMTJihK40cWgB63FGkLP index 5 https : www.youtube.com watch v UT6PDQc1mwA list PLjwX5wNxSyMfkzMTJihK40cWgB63FGkLP index 5 .. . .. . http : i.stack.imgur.com HJB7o.png", "Question : Problem Context : We initially created a MFP project native API for iOS using MFP Studio plugin v7.0 for Eclipse . We have this project under source control Git on DevOps . Problem : After pulling down the MFP project code from Git fresh pull if Studio is first used to Deploy Native API and to Deploy Mobile First Adapters everything is compiled built and deployed just fine . We can then invoke the adapters from Studio just fine without any problems . After doing so we can then also switch to the MFP CLI for building and deploying artifacts and the CLI commands work just fine . Now if after pulling down the code from Git fresh pull instead of using Studio we start using right away the MFP CLI for building and deploying artifacts errors occur . It seems that the MFP CLI is missing steps that Studio knows how to do . The errors we get when using the CLI right away for building and deploying mfp bd after a fresh pull from Git are the following : .. . .. . mfp info OS : darwin x64 Release : 14.3.0 System Memory : 2845 MB free out of 16384 MB Node : v0.10.30 MobileFirst CLI : 7.0.0.00.20150430-1604 Current directory : Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp .. . .. . Current project : Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp .. . .. . Adapter : LoyaltyPushAdapter Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp adapters LoyaltyPushAdapter LoyaltyPushAdapter.xml Description : LoyaltyPushAdapter Type : http Procedures : submitNotification .. . .. . Adapter : LoyaltyUserAdapter Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp adapters LoyaltyUserAdapter LoyaltyUserAdapter.xml Description : LoyaltyUserAdapter Type : java Procedures : Unavailable for Java adapters .. . .. . Application : Loyalty Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp apps Loyalty application-descriptor.xml Description : Loyalty Type : native ios .. . .. . Server location : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server Server binary : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server wlp bin server MobileFirst instance : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server wlp usr servers worklight objc 4021 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre bin java and Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre lib libinstrument.dylib . One of the two will be used . Which one is undefined . WebSphere Application Server 8.5.5.4 1.0.7.cl50420141121-1414 on Java HotSpot TM 64-Bit Server VM version 1.7.0 75-b13 en US .. . .. . Environment variables : TERM PROGRAM : Apple Terminal ANDROID HOME : Users olivieri android-sdks TERM : xterm-256color SHELL : bin bash TMPDIR : var folders c9 gf f0 sd60q1mm9kxwgvlxsr0000gn T Apple PubSub Socket Render : private tmp com.apple.launchd.QL5sT9RU2F Render TERM PROGRAM VERSION : 343.7 TERM SESSION ID : 6798439A-3592-4D5C-ABFE-7A2E2D5D80BA ANT HOME : Users olivieri Development apache-ant-1.9.4 USER : olivieri SSH AUTH SOCK : private tmp com.apple.launchd.E1N6IPACu1 Listeners CF USER TEXT ENCODING : 0x1F5 : 0x0 : 0x0 PATH : Users olivieri Development apache-ant-1.9.4 bin : Users olivieri Development checker-276 : usr local bin : usr bin : bin : usr sbin : sbin : opt X11 bin : Applications IBM MobileFirst-CLI : Applications IBM MobileFirst-CLI : Users olivieri Development gradle-2.3 bin : Users olivieri android-sdks tools : Users olivieri android-sdks platform-tools PWD : Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp JAVA HOME : Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home LANG : en US.UTF-8 XPC FLAGS : 0x0 XPC SERVICE NAME : 0 HOME : Users olivieri SHLVL : 2 LOGNAME : olivieri DISPLAY : private tmp com.apple.launchd.qHj5hi31Kp org.macosforge.xquartz : 0 : Applications IBM MobileFirst-CLI IBMnode bin node WLP USER DIR : Users olivieri .ibm mobilefirst 7.0.0.00.20150430-1556 server wlp usr .. . .. . mfp restart objc 4345 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre bin java and Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre lib libinstrument.dylib . One of the two will be used . Which one is undefined . Stopping server worklight . Server worklight stopped . Initializing MobileFirst Console . objc 4386 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre bin java and Library Java JavaVirtualMachines jdk1.7.0 75.jdk Contents Home jre lib libinstrument.dylib . One of the two will be used . Which one is undefined . Starting server worklight . Server worklight started with process ID 4385 . Ricardos-MBP : LoyaltyReadyApp olivieri .. . .. . mfp bd Error : BUILD FAILED Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 135 : The following error occurred while executing this line : Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 167 : The following error occurred while executing this line : Applications IBM MobileFirst-CLI mobilefirst-cli node-modules generator-worklight-server lib build.xml : 185 : Build of the adapter LoyaltyUserAdapter failed . The failure message is : Users olivieri git Ready.App.5.Loyalty LoyaltyReadyApp adapters LoyaltyUserAdapter lib does not exist . . The failure may have been caused due to incorrect Java code incompatible JDK level JAVA HOME not pointing to the location of a valid JDK or missing dependencies . Note that the worklight-jee-library.jar must be in the classpath when building Java adapters . Total time : 2 seconds Error : Sorry an error has occurred . Please check the stack above for details . Our JAVA HOME is set correctly and we are using a compatible JDK level . Any ideas on what could be the possible cause for this error .. . Answer : Did you make sure to place a .gitkeep file in the java-adapter-folder lib folder The folder by default is empty and GIT does not preserve empty folders http : stackoverflow.com questions 25376342 does-git-delete-empty-folders and so when downloading this project from GIT the folder will be missing but it may be required for the build-process . Try adding the missing folder and see if this helps . Based on the results we ll have an action item out of it . Comment : Thanks Idan We added the lib folder and then we could build and deploy the code mfp bd . It is still interesting that MFP Studio can build deploy the adapter even if this lib folder is missing . Comment : Yes the CLI build should be able to tolerate this . Thanks for the report .", "Question : We are working on a project with MobileFirst Platform 7.1 we are using mobilefirst-cli with cordova to create a project : mfp cordova create . After we add android platform with : mfp cordova platform add android .. . .. . Then we add this plugin : https : github.com mauron85 cordova-plugin-background-geolocation .. . .. . With this command : mfp cordova plugin add cordova-plugin-mauron85-background-geolocation .. . .. . We have this message : .. . .. . Adding cordova-plugin-mauron85-background-geolocation .. . .. . Plugin cordova-plugin-mauron85-background-geolocation added successfully .. . .. . But when I build my project my plugins is not added in platforms android-assets www plugins .. . .. . We used this plugin in a P.O.C . without mobilefirst and it worked . If someone know this issue Thank you in advance . .. . Answer : at this moment it will be work for the a Cordova application using the CLI . you have to flowing below step to work with mobilefirst . cordova : .. . .. . create a Cordova project .. . .. . add the cordova-plugin-mauron85-background-geolocation .. . .. . Mobilefirst : .. . .. . create a MobileFirst project .. . .. . copy the plugin files from both projects to a staging area so we can easily identify them .. . .. . merge the config.xml and cordova plugin.js files i.e . supplement the MobileFirst files with the plugin information from the Cordova project as like below link and copy the staged and modified files to MobileFirst . note : IBM do not support advise modifying the cordova plugin.js file . more check this link https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications .. . .. . https : developer.ibm.com mobilefirstplatform 2015 08 03 integrating-3rd-party-cordova-plug-ins", "Question : I m working with an IBM MobileFirst Platform 7.1 server supported by the Command-Line interface however my server isn t starting and stopping correctly . How can I recreate it easily from scratch in one command .. . Answer : This chain of commands forcibly kills your MobileFirst server then deletes it and recreates it from scratch : .. . .. . kill -9 cat .ibm mobilefirst 7.1 . server wlp usr servers .pid worklight.pid - Forcibly kill your MobileFirst server using its process ID . sudo lsof -i tcp : 10080 awk NR 1 print 2 xargs kill -9 - In case that missed it in the rare case where it hasn t persisted its process ID correctly kill any process listening on TCP port 10080 . Be careful . This assumes that MobileFirst is the only server which ever listens on TCP port 10080 on your system . If this is not the case you may inadvertently kill another server . mfp server remove - Remove the MFP server using the MFP CLI .. . rm -R .ibm mobilefirst 7.1 . - Clean up any remaining logs and other junk . rm -R TMPDIR wlBuildResources - Remove the wlBuildResources directory which the CLI uses to build projects . rm -R TMPDIR wlPreview - Remove the wlPreview directory which the CLI uses to preview projects . mfp server create mfp start - Create a new server and start it . On my system I have this entire chain set up as a shell alias https : en.wikipedia.org wiki Alias command to easily recreate my MFP server when needed . The mfpx project https : github.com kfbishop mfpx also does something similar with the mfpx kill command .", "Question : I recently installed Liberty Core server created a new Profile installed MobileFirst Platform Server and deployed a MobileFirst runtime environment with the Server Configuration Tool in MacBook . Instead of installing in default directory Application ibm I choose to install under custom directory Users username LibertyCore . I started the server manually installed adapters and .wlapp from worklight-console . Instead of doing this manual deployment I want to do it from command-line My understanding is I have to use MFP command-line utility . I installed MFP CLI utility then parsed to the App Project folder to build and deploy to currently installed Liberty Core server I see issue with MFP PUSH it says server is not started though server is running . So when I do MFP Info I found that CLI is pointing to completely different set up . How can I make CLI to point to currently installed Liberty Server . Comment : Did you try first mfp start inside the project folder from command-line .. . Answer : Note that you can run mfp help to see all available CLI commands . There is the command mfp server . Using this command you can add additional server definitions : mfp server add . Run the command and follow the on-screen instructions to add a server definition for your remote server.. . .. . .. . Once you ve added it you can use mfp push your-remote-server-name to push the artifacts to the remote-server . Comment : I tried this hit another issue . Comment : Enter the new value for url : 10.146.17.130 : 9080 http : 10.146.17.130 : 9080 Edit another server setting Yes Select value to change : context root worklightadmin Enter the new value for context root : worklightadmin Edit another server setting No Verifying Server Configuration.. . Couldn t connect to server worklight at 10.146.17.130 : 9080 http : 10.146.17.130 : 9080 . failed to retrieve runtime information : Unexpected token : HTTP 404 - Not Found", "Question : Currently i m using eclipse with MobileFirst Studio for developing mobilefirst platform foundation projects . I want to use the live reload automatic war re-deploy to server when files change but when using the mobilefirst platform CLI . Is this possible .. . Answer : The MFP CLI does not provide an auto-reload of the .war file after a change made to files that typically reside in the server folder of the MFPF project . A manual mfp stop start is required .", "Question : I am using the jsonStore plugin with the mfp cli . I have confirmed that the plugin is installed is installed . Calling any other WL . api works in my project .. . .. . but when i run this code I get an error that says : .. . .. . PERSISTANT STORE NOT OPEN Comment : What plug-in Is this a Hybrid app or a Cordova app Comment : cordova-plugin-mfp-jsonstore 7.1.0 IBM MobileFirst Platform Foundation - JSONStore Comment : i ve tried this in the browser simulator and device same error Comment : Where are you putting this code in your app wlCommonInit What is your build number of MFPF 7.1 Can you provide a sample app What are you previewing - iOS Android Comment : I ve added the entire app.js of my ionic project I m previewing on iOS .. . Answer : JSONStore is asynchronous .. . .. . Since you have : .. . .. . You cannot guarantee that your JSONStore will be initialized before you try to perform a findAll on the objects inside your JSONStore .", "Question : i am trying to use mobilefirst-cli 7.1 to build a cordova app using mfp cordova create Everything worked fine and got my app working and tested using mfp preview . But when i added android platform using mfp cordova platform add i have noticed that there are few missing files namely wlclient.properties checksum.js etc . it suggest to do mfp push to create those files but it did not create those files even after doing mfp push . Because of that i could not get my app to run on the android device as it could not find these files . Below are the log messages that indicate there are missing files when android platform is built . Project successfully created . filelist is missing please run MFP Push . checksum.js is missing please run MFP Push . Running command : Users add to body class : platform-android .. . .. . Running IBM Worklight Hook : cordova-plugin-mfp wlclient.properties is missing . Please run MFP Push to create the file . Installing com.ionic.keyboard for android .. . .. . Plugin cordova-plugin-mfp added successfully . .. . Answer : In addition to Idan s answer to your query you can find more information in the following links : .. . .. . a MFP Cordova CLI https : developer.ibm.com mobilefirstplatform documentation getting-started-7-1 foundation hello-world integrating-mfpf-sdk-in-cordova-applications .. . .. . b MFP CLI http : www-01.ibm.com support knowledgecenter SSHS8R 7.1.0 com.ibm.worklight.dev.doc dev t gs cli.html lang en", "Question : I recently installed IBM MobileFirst CLI on my Mac but I don t seem to be able to start the Server . See error below . I searched the internet and found that there is a bug in JDK which causes the JavaLaunchHelper error . I downloaded the beta version that supposedly fixes the issue from here - JDK Download Link https : jdk7.java.net download.html . But this doesn t help either . Any other help is appreciated . Imayas-MBP : EmployeeDirectory imaya mfp start Initializing MobileFirst Console . objc 18564 : Class JavaLaunchHelper is implemented in both Library Java JavaVirtualMachines jdk1.7.0 80.jdk Contents Home bin java and Library Java JavaVirtualMachines jdk1.7.0 80.jdk Contents Home jre lib libinstrument.dylib . One of the two will be used . Which one is undefined . Starting server worklight . Server worklight start failed . Check server logs for details . Users imaya .ibm mobilefirst 6.3.0 server wlp bin server : line 744 : 18563 Abort trap : 6 JAVA CMD @ JAVA CMD LOG 2 1 Error : The MobileFirst server failed to start . The port may be in use by another instance of a running server or the server may not exist . .. . Answer : On OSX you can locate and kill a process holding open a port using the following : .. . .. . Run assumes port 10080 : .. . .. . lsof -i : 10080 .. . .. . Then if a process is shown run the following using the shown Process ID : .. . .. . kill -9 PID", "Question : Installed Mobile first CLI 7.0.0.0 .. . .. . When I try to open mfp cli it is giving the following error .. . .. . broken cli but I guess any fixes available in IBM Fix central I tried to search but not able to find a fix for this .. . .. . module.js : 340 throw err Error : Cannot find module Applications IBM MobileFirst-CLI mobilefirst-cli bin mobilefirst-cli.js at Function.Module . resolveFilename module.js : 338 : 15 at Function.Module . load module.js : 280 : 25 at Function.Module.runMain module.js : 497 : 10 at startup node.js : 119 : 16 at node.js : 906 : 3 Comment : What is the exact build number of the CLI that you ve downloaded Comment : Where did you download it from Comment : downloaded from IBM site itself .. . Answer : i faced same problem .. . when you download CLI Zip from IBM site . first of all you need to Extract all not Run .. . .. . like this picture .. . .. . enter image description here http : i.stack.imgur.com iS2KI.png", "Question : I m using MFP 7.1 CLI with cordova when i add a plugin to my project with : .. . .. . I can see this line in the log : .. . .. . MFP CORDOVA PATH has not been set . using internal cordova-cli .. . .. . I tried to set this MFP CORDOVA PATH but then i have this error : .. . .. . Implementation for this cordova subcommand has failed or not been provided : plugin .. . .. . I d like to upgrade the version of cordova CLI used by MFP if someone know how to do it Thank you in advance . .. . Answer : It is not possible to upgrade the Cordova version provided by MobileFirst in the MobileFirst CLI . However the supplied Cordova version can be patched by IBM with any fixes that may be required this is done on a per-case basis for example in order to fix vulnerabilities . I can suggest you to upgrade to the latest available CLI from IBM Fix Central you can check for the version you are currently using by running the command mfp -v . Perhaps this issue is fixed there . If not then I suggest to open a PMR support ticket in order for the development team to investigate and possibly provide an iFix a build with a fix for the problem ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
gnat-gps@open-source@56
gnat-gps -- the gnat programming studio gnat-gps is an @placeholder integrated development-environment .
{ "confidence": [ 86.57359313964844, 80.00163269042969, 77.04402160644531, 76.81451416015625, 74.77236938476562, 74.37532043457031, 73.37887573242188, 70.0651626586914, 70.0651626586914, 70.0651626586914, 70.0651626586914, 70.0651626586914, 70.0651626586914, 67.68917083740234, 67.23777770996094, 67.23777770996094, 65.94195556640625, 65.38748168945312, 64.98255157470703, 63.23542022705078, 63.23542022705078, 62.21784973144531, 61.117454528808594, 61.117454528808594, 60.97382354736328, 60.97382354736328, 60.97382354736328, 60.97382354736328, 60.97382354736328, 60.816078186035156, 60.71841812133789, 60.71841812133789, 59.8265380859375, 59.789161682128906, 59.78639221191406, 59.17823791503906, 59.17823791503906, 59.17823791503906, 59.17823791503906, 58.968326568603516, 58.968326568603516, 58.965396881103516, 57.72084045410156, 57.1727409362793, 57.11992263793945, 57.026180267333984, 55.32859802246094, 55.02068328857422, 54.755252838134766, 53.614139556884766, 53.172279357910156, 52.82722091674805, 52.621978759765625, 52.621978759765625, 51.53139877319336, 51.15412521362305, 50.24272918701172, 49.177738189697266, 49.177738189697266, 48.67433547973633, 48.67433547973633, 47.38215255737305, 46.563270568847656, 46.563270568847656, 46.12532043457031, 44.76768493652344, 44.76768493652344, 42.61562728881836, 42.61562728881836, 42.41168212890625, 41.322242736816406, 40.36760711669922, 39.13001251220703, 39.13001251220703, 39.13001251220703, 38.90756607055664, 38.90756607055664, 38.90756607055664, 38.90756607055664, 38.46404266357422, 38.39311218261719, 38.00124740600586, 37.46791076660156, 37.46791076660156, 37.46791076660156, 37.46791076660156, 37.207576751708984, 37.207576751708984, 36.906463623046875, 36.59752655029297, 36.42078399658203, 35.890079498291016, 35.672325134277344, 35.672325134277344, 35.411991119384766, 35.21650695800781, 35.21650695800781, 35.21650695800781, 35.21650695800781, 35.21650695800781 ], "content": [ "gnat-gps http : stackoverflow.com questions tagged gnat-gps created .", "Yep that was it works in GNAT GPS 2013 .", "Adacore GPS 2012 is an Integrated Development Environment IDE for ADA development .", "Which GNAT GPS version are you using", "GPS from GNAT GPL 2012 might support GNAT 3.15p although the officially stated support only goes back as far as GNAT Pro 3.16a1 .", "I m working on a custom GNAT GPS plugin for GPS 6.1.2 .", "I d suggest downloading Gnat-GPS 2015 or the FSF Gnat compiler from getadanow.com http : getadanow.com", "I m trying to find the name of the executable to run GNAT GPS .", "For Debian squeeze at any rate there s just usr bin gnat-gps .", "I was using GPS IDE with another version of the GNAT Ada compiler .", "Also what are people s general opinions on GNAT Workbench compared to GPS", "My question is are there known compatibility issues with Win7 and GPS-GNAT 2006", "However with GPS-GNAT 2006 the project runs but I get the aforementioned issues .", "Is there a way to create a link-to a web page in code comments in Gnat Programming Studio", "That tutorial I am referring to can be accessed through Help- GPS- GNAT Programming Studio Tutorial .", "I am trying to run my application after compiling it with AdaCores GPS Gnat Programming Studio .", "I tried to initialize the debugger in Gnat GPS Studio as well using the Edit- Key Shortcuts dialog .", "I m looking in to a way to improve the autocomplete for GPS ADA Version : GPS 6.0.1 with GNAT Pro 6.4.2 .", "I m using GNAT Programming Studio to update some ada files .", "I m doing a python plug-in http : docs.adacore.com gps-docs users guide build html extending.html to GNAT GPS IDE .", "I ve installed GPS GPS 6.1.1 20150118 hosted on i686-pc-mingw32 GNAT GPL 2015 20150428-49 .", "darkestkhan the GNAT library description in the FSF version of the GNAT RM https : gcc.gnu.org onlinedocs gnat rm The-GNAT-Library.html is very sparse the documentation is in the source files", "Which GNAT compiler bundle", "I m still on GNAT 2012.. .", "In GPS tool chains configuration provided the compiler path as D : GNAT bin and unchecked the options for multiple tool chains .", "In GPS GNAT PRO right-click on the subprogram you are interested in a press Find references .", "In the GPS GNAT Libre version you don t have a menu when right clicking in your code .", "I may have to modify to many other more parts by updating GPS-GNAT .", "And I say that with confidence because I did install GPS-GNAT 2008 and the project immediately crashed on execution .", "I changed this to C : GNAT 2012 and it was installed under there I see your equivalent would be C : GNAT - your compiler binaries are at C : GNAT bin mine are at C : GNAT 2012 bin including a win32ada.gpr in the place where GNAT expects to find it .", "Normally installing GNAT on Windows will set up the PATH properly if you already have a later GNAT+GPS installed installing 3.15p should put itself first on the PATH .", "You are mixing two things here : the GNAT compiler itself for which you might be stuck with an older version indeed and the GPS IDE which you can upgrade independently of GNAT .", "I ve installed the gnat gpl using the install script .", "I m just getting started with Ada and GtkAda development using GNAT GPS Gnat Programming Studio and there is something that is frustrating me : autocompletion ie : intellisense or whatever you want to call it only works for my code but not for the GtkAda library .", "For GNAT GPL on Linux and Mac OS X there s a script gps which sets up environment-variables as required by the actual executable gps exe and then calls it .", "Can someone with a higher rep than me set up the tag gps-gnat for example", "I have Cygwin installed on Windows XP with GPS from GNAT GPL 2012 .", "GPS knows better than that and insists on treating myfirstprogram.gpr as a GNAT Project file which of course it isn t .", "The simplest approach to creating a GNAT project file in GPS is to go to the Project menu and select New .", "If you re not using GNAT Pro I m assuming you re using GNAT GPL 2009 which was released at the end of May 2009 .", "I am using gnat-gpl-2015-x86 64-darwin GNAT GPL 2015 20150428-49 on El Capitan 10.11.2 .", "and that no guaranties are provided for GNAT GPL .", "I am working on a project developed in ADA on windows-xp using GPS-GNAT 2006 and must port it to windows-7 however when trying to upgrade to a newer version of GPS-GNAT 2008+ the ada code throws exceptions but on the 2006 version it runs but GPS-GNAT 2006 has issues with hitting breakpoints opening the IDE the open project button etc .", "Ok seems that the problem was with GNAT 2012 I updated to GNAT 2013 and autocomplete works perfectly .", "Is there any IDE available for the GNAT 3.15p compiler", "It references the program sdc which comes in the GNAT 2012 share examples gps tutorial directory .", "Removing your install usr gnat and reinstalling might fix the issue .", "GNAT does its best but if your other code includes with Tmp GNAT will look for tmp.ads .", "Setting stack size for the environment task is not directly possible within Gnat .", "I am not an Ada wiz but I remember that I tried to install Gnat GPS with Cygwin as well and had all sorts of problems .", "Historically the Gnat RTS was not always so encumbered .", "I m trying to set up Gnat Programming Studio IDE to do some Python dev .", "I am using the GNAT 3.15p Ada compiler which is suggested for RTRT .", "This works very well for using a newer GNAT toolset with an older compiler .", "Is there a way to set Gnat studio in the debugger mode by using any from of keystroke only combination", "Step 9 of the GPS tutorial http : docs.adacore.com gps-docs tutorial build html run.html states .. . .. . In actuality doing this produces an error : .. . .. . gprbuild : c : gnat 2015 share examples gps tutorial obj sdc is not a source of any project . .. . .. . What is the syntax for passing command-line arguments for the built executable", "implementation defined subprograms have to be documented in user guide or reference in case of gnat they are documented gnat pro user guide or reference don t remember now which one", "See http : docs.adacore.com gps-docs users guide build html compilation.html working-with-two-compilers .. . .. . If you use gpr files you will probably have to restrict yourself to project file features that were available in GNAT 3.15p .", "When using the GNAT GPS debugger on a gpr file when I try to display a value in the debugger data window it never shows the value just the variable name .", "My main aim is to port the application to the GNAT Ada compiler .", "GNAT GPL effectively requires that you distribute applications with the GPL i.e .", "I m trying to install GNAT Compiler for Ada programing but when I launch it I get the following error : Cannot create config directory C : users @ @ @ .gps Exiting.. . .", "The cross-reference information XREF is also used for refactoring GNAT PRO specific functionality .", "Interaction with C++ is certainly improved from my first contact with Gnat which was probably around 2008 .", "doesn t show the tags http : i.stack.imgur.com jmxBt.png .. . .. . Question 1 .. . .. . In the first image you can see that GNAT Programming Studio is showing tags package pragma subprogram etc .", "Select x86-windows as the platform and download and install the file gnat-gpl-2013-i686-pc-mingw32-bin.exe .", "I set up a little example on Mac OS X GNAT GPL 2014 .", "gcc is really too low-level a tool to use easily instead use gnatmake and GNAT project files .", "you can compile gcc including Gnat from source to meet your needs .", "Using GNAT GPS as compiler and have the following folder structure : .. . .. . test.adb .. . test.gpr .. . bin .. . obj .. . libglfw3.a .. . lib .. . libglfw3.a .. . .. . test.gpr .. . .. . test.adb .. . .. . Compiling with gprbuild -P test.gpr and outputs : .. . .. . So I was thinking when gdi32 winmm opengl32 is found is because they are already installed on my PC .", "This will log all communications between GPS and gdb in USERPROFILE .gps log .", "Which version of GPS", "GPS itself does not do the debugging .", "This made GPS to take GNAT3.15p compiler .", "Code snippets in GPS are also useful .", "I then ensured I linked with the GNAT port but I also upgraded in the meantime and now I can t get the linker to work at all .", "Adacore FAQ page states that A license guaranteeing that executables generated with GNAT Pro can be distributed under customer-specific terms and conditions .", "I tend to understand this as GNAT is suitable for building closed-source executables just like gcc in general but you are doing it on your own risk .", "You are correct my answer should have pointed out that Gnat Pro licensing is different in this respect providing the permission you need .", "However in case you d prefer to edit your project properties in GPS via the Project Properties dialog : .. . .. . 1 . go to the Switches tab on the left hand side .. . .. . 2 . go to the Binder tab at the top .. . .. . 3 . tick the Shared GNAT run time checkbox .", "GPS saves its information in USERPROFILE .gps so you could remove that directory .", "So...you can move to GNAT Pro wait for GNAT GPL 2010 I ve not heard anything about that yet but I d like to think it ll be out in a couple months wait for someone else here who has an actual answer via scripting or something or have one of your interns or minions do the clicking--unless you are a minion in which case you re SOL .", "Looks like IT installed a version without GPS .", "I m using GPS IDE for Ada 95 coding .", "The latest GPS you can find e.g .", "Look in the newer GPS manual for the multiple toolchains feature .", "I m trying to create a simple project in GPS environment and compile it against the ORBExpress packages .", "The toolchain that is set in the GPS environment is gnatmake 6.1.1 I think the version does not matter though .", "You ll find life with GNAT much easier if you stick with its file naming-conventions : .ads for a spec .adb for a body and the file name needs to be the unit name in lower case .", "gps refers to the Global Positioning System - I tried to get our GPS added as an alternative meaning but failed .", "You could try running GPS with --traceon GVD.OUT or alternatively and often simpler on Windows change the USERPROFILE .gps traces.cfg file and add GVD.OUT yes .", "If I have HOME set to C : cygwin users USERNAME and start GPS for the first time GPS says that it created the configuration directory C : cygwin users simon .gps .", "GPS doesn t seem to be able to create intermediate directories .", "Does anyone know of a GPS plugin that does this", "Note that GPS isn t aware of Cygwin it s a Windows application and uses your Windows environment-variables .", "So that s my guess as to why you re not seeing that option in GPS .", "Can I use GPS IDE itself if so how to change the compiler", "I believe that GPS will use the first gcc and gnatmake that it finds on the PATH .", "I installed GPS IDE in C drive and GANT3.15p compiler in D drive .", "I am a beginner with using both the ada language as well as using GPS ." ] }
{ "confidence": [ 98.57014465332031, 95.80052947998047, 94.40458679199219, 92.15960693359375, 92.09748077392578, 91.35269165039062, 91.25800323486328, 90.80760192871094, 84.25293731689453, 83.09417724609375, 77.66104888916016, 75.80050659179688, 74.98048400878906, 74.59439086914062, 74.59439086914062, 73.97803497314453, 72.79780578613281, 72.22416687011719, 70.8884506225586, 69.84722137451172 ], "content": [ "Question : I m just getting started with Ada and GtkAda development using GNAT GPS Gnat Programming Studio and there is something that is frustrating me : autocompletion ie : intellisense or whatever you want to call it only works for my code but not for the GtkAda library . This makes things quite slow and boring since I have to check every API call on the GtkAda documentation every time . So my question is simple : is there a way to enable auto completion for GtkAda on GPS Comment : I just tried and it works for me . Do you have a GPR file for your project which calls up GtkAda s GPR I m using GPS 2013 GPL on Mac OS X ML . Comment : I m still on GNAT 2012.. . I ll update now see if it fixes it . Comment : Yep that was it works in GNAT GPS 2013 . Thanks . .. . Answer : Ok seems that the problem was with GNAT 2012 I updated to GNAT 2013 and autocomplete works perfectly . Thanks Simon Wright for the hint .", "Question : IT just installed this on my machine . I m trying to find the name of the executable to run GNAT GPS . Thanks . .. . Answer : For GNAT GPL on Linux and Mac OS X there s a script gps which sets up environment-variables as required by the actual executable gps exe and then calls it . For Debian squeeze at any rate there s just usr bin gnat-gps . Comment : thanks man . Looks like IT installed a version without GPS .", "Question : I am working on a project developed in ADA on windows-xp using GPS-GNAT 2006 and must port it to windows-7 however when trying to upgrade to a newer version of GPS-GNAT 2008+ the ada code throws exceptions but on the 2006 version it runs but GPS-GNAT 2006 has issues with hitting breakpoints opening the IDE the open project button etc . My question is are there known compatibility issues with Win7 and GPS-GNAT 2006 And what should be the best course of action to get this old code running on windows-7 Thanks Comment : It s 2016 . I d suggest downloading Gnat-GPS 2015 or the FSF Gnat compiler from getadanow.com http : getadanow.com Comment : @BrianDrummond Yes I have considered a newer version however this project is very old legacy code that also interacts with a C++ UI and Access database . I want to take the path of least resistance to getting it functional on windows-7 . I may have to modify to many other more parts by updating GPS-GNAT . And I say that with confidence because I did install GPS-GNAT 2008 and the project immediately crashed on execution . However with GPS-GNAT 2006 the project runs but I get the aforementioned issues . Comment : I suspect you will find newer versions are less fragile than you have now . Interaction with C++ is certainly improved from my first contact with Gnat which was probably around 2008 . .. . Answer : You are mixing two things here : the GNAT compiler itself for which you might be stuck with an older version indeed and the GPS IDE which you can upgrade independently of GNAT . As others have suggested please upgrade to GPL 2015 for GPS and keep the old compiler .", "Question : I recently installed the Adacore GPS 2012 for Lego Mindstorms on my Windows 7 machine . When I try to build the example project I get the error message : .. . .. . Could not locate executable on path : gnatmake .. . .. . I ve tried looking for other people with this problem but the majority of these cases are on Linux . If someone could help me figure out the problem or point me in the right direction it would be greatly appreciated . Comment : have you only installed the Mindstorms toolset or is there a native compiler too I suspect the Mindstorms toolset would include arm-eabi-gnatmake or some such to distinguish it from the native compiler . Sorry I don t know GPS well enough to point closer to the answer . Comment : It sounds like your Ada installation path is not listed in the PATH environment variable . Try echo PATH to see if this is the case which can be easily solved . Check this first . .. . Answer : Adacore GPS 2012 is an Integrated Development Environment IDE for ADA development . You also need the ADA compiler . You can find one at adacore.com http : libre.adacore.com download configurations . Select x86-windows as the platform and download and install the file gnat-gpl-2013-i686-pc-mingw32-bin.exe . Enjoy :", "Question : I am using the GNAT 3.15p Ada compiler which is suggested for RTRT . I was using GPS IDE with another version of the GNAT Ada compiler . Is there any IDE available for the GNAT 3.15p compiler Can I use GPS IDE itself if so how to change the compiler Thanks Padmapriya Comment : Is this on Windows What is RTRT Comment : I m assuming some class but questioners would do better to assume we aren t all familiar with the jargon used around their campus . .. . Answer : The latest GPS you can find e.g . GPS from GNAT GPL 2012 might support GNAT 3.15p although the officially stated support only goes back as far as GNAT Pro 3.16a1 . Look in the newer GPS manual for the multiple toolchains feature . This works very well for using a newer GNAT toolset with an older compiler . The multiple toolchains settings will override the OS path variable settings . See http : docs.adacore.com gps-docs users guide build html compilation.html working-with-two-compilers .. . .. . If you use gpr files you will probably have to restrict yourself to project file features that were available in GNAT 3.15p . You might also have some luck with either GNATbench on Eclipse or AdaGIDE as alternate IDEs . Comment : Thanks a lot . I tried the combination both the answers and it works fine . I installed GPS IDE in C drive and GANT3.15p compiler in D drive . In GPS tool chains configuration provided the compiler path as D : GNAT bin and unchecked the options for multiple tool chains . This made GPS to take GNAT3.15p compiler .", "Question : I am using the GNAT 3.15p Ada compiler which is suggested for RTRT . I was using GPS IDE with another version of the GNAT Ada compiler . Is there any IDE available for the GNAT 3.15p compiler Can I use GPS IDE itself if so how to change the compiler Thanks Padmapriya Comment : Is this on Windows What is RTRT Comment : I m assuming some class but questioners would do better to assume we aren t all familiar with the jargon used around their campus . .. . Answer : I believe that GPS will use the first gcc and gnatmake that it finds on the PATH . Normally installing GNAT on Windows will set up the PATH properly if you already have a later GNAT+GPS installed installing 3.15p should put itself first on the PATH .", "Question : I m trying to install GNAT Compiler for Ada programing but when I launch it I get the following error : Cannot create config directory C : users @ @ @ .gps Exiting.. . . Somebody knows the solution I try all kind of things nothing helped . Thanks Comment : What kind of things have you tried I installed the compiler in win7 and it works like a charm Comment : Which Windows Which GNAT compiler bundle Comment : Can someone with a higher rep than me set up the tag gps-gnat for example gps refers to the Global Positioning System - I tried to get our GPS added as an alternative meaning but failed . Comment : gnat-gps http : stackoverflow.com questions tagged gnat-gps created . Comment : What s the name of your Windows user Does it have any special-characters in it It seems like your user name is substituted with @ @ @ for some reason . .. . Answer : I am not an Ada wiz but I remember that I tried to install Gnat GPS with Cygwin as well and had all sorts of problems . One of the biggest was the 64 32-bit incompatibility since Gnat on Windows is only available in the 32-bit version and Cygwin is probably in the 64 bit version on your machine .. . .. . In the end my solution was to remove Cygwin completely and install Mingw32 which is the system Ada uses .", "Question : I m trying to install GNAT Compiler for Ada programing but when I launch it I get the following error : Cannot create config directory C : users @ @ @ .gps Exiting.. . . Somebody knows the solution I try all kind of things nothing helped . Thanks Comment : What kind of things have you tried I installed the compiler in win7 and it works like a charm Comment : Which Windows Which GNAT compiler bundle Comment : Can someone with a higher rep than me set up the tag gps-gnat for example gps refers to the Global Positioning System - I tried to get our GPS added as an alternative meaning but failed . Comment : gnat-gps http : stackoverflow.com questions tagged gnat-gps created . Comment : What s the name of your Windows user Does it have any special-characters in it It seems like your user name is substituted with @ @ @ for some reason . .. . Answer : I have Cygwin installed on Windows XP with GPS from GNAT GPL 2012 . If I have HOME set to C : cygwin users USERNAME and start GPS for the first time GPS says that it created the configuration directory C : cygwin users simon .gps . If I don t set HOME GPS creates the configuration directory C : Documents and Settings Simon which appears to be HOMEPATH . Note that GPS isn t aware of Cygwin it s a Windows application and uses your Windows environment-variables . I wonder whether you have HOME or perhaps HOMEPATH set to a nonexistent directory GPS doesn t seem to be able to create intermediate directories .", "Question : I m using GNAT Programming Studio to update some ada files . I have a style check which for these old files produces literally thousands of warnings . Helpfully GPS has a little auto fix wrench icon in the locations view that s great but I don t want to go through and click the wrench ten thousand times . Is there a way to have it correct these errors automatically without me having to click each wrench They are all right so I want to be changed automatically . I saw some documentation saying you could do it : http : www.adacore.com wp-content files auto update gps-docs Code-Fixing.html .. . .. . But I don t get the auto fix option when I right-click . Maybe you need the pro version I ve tried everything I can think of . This would save hours of work so it s really appreciated if someone could help on this . Thanks .. . Answer : This isn t an answer just an observation : - .. . .. . According to an AdaCore Developer Center posting http : www.adacore.com 2009 02 24 NF-44-F327-008-gps An auto fix is now offered for messages like suggested replacement automatically applying the replacement suggested by the compiler . That notice was posted 24 Feb 2009 . If you re not using GNAT Pro I m assuming you re using GNAT GPL 2009 which was released at the end of May 2009 . Now there s two months between those dates but generally AdaCore seems to and understandably upgrades their Pro version before migrating the upgrades into their GPL version . So that s my guess as to why you re not seeing that option in GPS . So...you can move to GNAT Pro wait for GNAT GPL 2010 I ve not heard anything about that yet but I d like to think it ll be out in a couple months wait for someone else here who has an actual answer via scripting or something or have one of your interns or minions do the clicking--unless you are a minion in which case you re SOL . Comment : Thanks for the reply yeah looks like I ll have to wait for the next free version or shell out for the pro version .", "Question : I ve started using GPS for coding Ada at work - does anyone have any tips for getting the best out of the IDE or any plugins I should be aware of For example is there a way to enable on the fly syntax type checking - of the sorts you get in eclipse visual-studio where errors are underlined as you go Also what are people s general opinions on GNAT Workbench compared to GPS thanks .. . .. . Matt .. . Answer : The GPS does not have a from of background syntax checking and that is by design . The idea behind GPS is that it is the compiler who decides what code is correct and what code is not correct . It means that if you want to know if your code is correct or not you have to compile it . On a Windows computer the short cut key for that is SHIFT+F4 and will only compile the specification or body file you are currently editing . Pressing F4 will compile your whole project . You will save time by using SHIFT+F4 . Another interesting feature is that the GPS uses cross-reference XREF information when navigation through the code . For example let s say you would like to find all the places in your code where a specific subprogram is called . In GPS GNAT PRO right-click on the subprogram you are interested in a press Find references . In the GPS GNAT Libre version you don t have a menu when right clicking in your code . In this case go to the Navigate menu and click on Find references there . If the GPS does not find any references and you know that the subprogram is used in the application it means that the XREF information needs to be updated . You may compile the whole application by F4 since the XREF information will be generated along with the binary that is produced . If you go to Edit and click on Key shortcuts you can set up a short cut key to generate the XREF information only . You may also find several interesting features there that you can set up a short cut key for . The cross-reference information XREF is also used for refactoring GNAT PRO specific functionality . It often works well for changing variable and subprogram names . Just make sure the cross-reference information is up to-date Code snippets in GPS are also useful . You use them by writing a keyword followed by CTRL+O not zero O as in Orwell . To see the code-snippets you can choose between go to Edit and click on Aliases . You can also create your own Aliases and code-snippets to become a more productive Ada Software Engineer . Good luck", "Question : null .. . Answer : I m trying to set up Gnat Programming Studio IDE to do some Python dev . I have Python 3.5 on my machine and I have started a new project in GPS and selected Python as the language but when I tried a simple Hello World I got the following message . Any idea how to fix I m assuming I need to link the Python interpreter to GPS but I don t know how Any help much appreciated . Comment : Is there a way to set the project interpreter", "Question : I m writing .. . .. . which is exactly how it is written here : http : docs.adacore.com gps-docs users guide build html GPS.html GPS.Action.create .. . .. . but I m getting the error : Action object has no attribute button .. . .. . Anyone knows how to fix this Thank you .. . Answer : Which GNAT GPS version are you using Previous versions 2013 for example does not have this method .", "Question : Please have a look at the following code .. . .. . When I click build all in GPS IDE I get this error .. . .. . I am very new to Ada as you can see this is my first program . Please help . Comment : with Ada.text io use Ada.text io -- the I O packages are children of the Ada package . and this should be saved as .adb Ada program Body not .gpr which is a replacement for a Makefile . Comment : Actually Brian with Text IO is legal Ada it s an obsolescent renaming http : www.ada-auth.org standards 12rm html RM-J-1.html p6 of Ada.Text IO . Comment : @Yohan : Your program runs correctly from the command-line using gnatmake hello and . hello . Comment : okay I stand corrected on Text IO . Sounds like some confusion between source and project files then . Comment : @trashgod : Thanks for the reply but then why not using GSP .. . Answer : On the command-line gnatmake will happily compile a file which contains Ada code but has the extension .gpr . GPS knows better than that and insists on treating myfirstprogram.gpr as a GNAT Project file which of course it isn t . You ll find life with GNAT much easier if you stick with its file naming-conventions : .ads for a spec .adb for a body and the file name needs to be the unit name in lower case . In your case the file should have been called hello.adb . The simplest approach to creating a GNAT project file in GPS is to go to the Project menu and select New . The only places where you must enter data are on the Naming the project page you might choose firstproject and the Main files page where you d click on the blue + to add hello.adb you can Forward through the others . After adding the main file you can click Apply to install the new project file now you can Build all and Run . You may find the GPS tutorial helpful Help menu GPS .. . Comment : Awesome Thank you", "Question : I am a beginner with using both the ada language as well as using GPS . I can t seem to find any solid tutorials to help learn ada or GPS but that s not my question . I have tried various simple programs like this one : .. . .. . I have tried others that are of similar simplicity and found other more complicated ones on the web and I have really only gotten one to work . Anyways I get this error when I try to build : .. . .. . I figure it is simple but I can t seem to figure it out . I also sometimes get this when I try to compile after I change something for the first time : Comment : Does a plain old Hello World http : en.wikipedia.org wiki Ada 28programming language 29 .22Hello.2C world.21.22 in Ada program compile and link It kinda looks like a problem with the installing of the Win32 bindings . Comment : yeah it does i have gotten only one or two working programs the hello world and then a hello world with get x and a while-loop to have the person guess that is all i have managed to get working though Comment : Get one of the older Ada 95 books used from Amazon you get them for 5 including shipping . For an indepth study you will need the book by Barnes about Ada 2005 no way around it . .. . Answer : What does your sqrt.gpr say I just tried this and the gnatlink step said .. . .. . which is quite different from yours .. . and worked . My sqrt.gpr said Comment : mine looks the same just without the first with line i tried just adding it in there but it says win32ada is an unknown project file Comment : I m using Windows XP . When I installed win32ada which I got from the Libre web site http : libre.adacore.com it said that it couldn t find a working Ada compiler and asked me to browse to one s location offering me C : GNATPRO . I changed this to C : GNAT 2012 and it was installed under there I see your equivalent would be C : GNAT - your compiler binaries are at C : GNAT bin mine are at C : GNAT 2012 bin including a win32ada.gpr in the place where GNAT expects to find it . There s no trace of a Bindings Win32Ada directory I wonder how yours got there", "Question : I am a huge fan of source code comments but the comments in the Ada standard-library are spartan at best . It is my understanding that the interface of the library is defined with the language definition but the implementation is left to the compiler manufacturer . I often wondered how they do it since the pure function names parameters and other definitions as I see them in the manual often don t explain what exactly the respective subprograms do and leave much to interpretation . I would expect some documentation along the line of the QT library . Why is it there no definition of the library with extensive comments for every function Comment : Almost all subprograms from Standard Library are very well documented together with exceptions and return values for example Ada.Strings.Fixed.Index returns 0 if Substring is not present in String . As such I don t see what is the problem . implementation defined subprograms have to be documented in user guide or reference in case of gnat they are documented gnat pro user guide or reference don t remember now which one Comment : Can you give an example of a language-defined subprogram where you ve found the RM s description to be inadequate I m asking because maybe the description really is there and you ve just had trouble finding it there are some places where the description s location isn t in the obvious place such as some I O operations . Comment : darkestkhan the GNAT library description in the FSF version of the GNAT RM https : gcc.gnu.org onlinedocs gnat rm The-GNAT-Library.html is very sparse the documentation is in the source files as Herr Doktor wants Comment : Just one example is the ADS file Ada.Containers.Doubly Linked Lists . there is no comment in there just the definitions for types subprograms etc . Looks to me like the designers assume that everybody has the same understanding for every identifier there but what if not and people assume different behaviour . Compare it for instance with Ada.Containers.Hashed Maps which at least contains some comments that explains functionality . To me as a newcomer this leaves much to guesswork .. . Answer : For an example the ARM section A.18.5 http : www.ada-auth.org standards 12rm html RM-A-18-5.html for Ada.Containers.Hashed Maps says in paragraph 1 - which would normally be referred to as A.18.5 1 - .. . .. . The generic library package Containers.Hashed Maps has the following declaration : .. . .. . so I guess that implementors have read this as an instruction . In the case of Hashed Maps you ll see at A.18.5 46 http : www.ada-auth.org standards 12rm html RM-A-18-5.html p46 a link-to A.18.4 which describes the common semantics of Maps and Length for example is at 25 http : www.ada-auth.org standards 12rm html RM-A-18-4.html p25 . GPS GPL from AdaCore Help GNAT has links to a local copy of the ARM GPS GPL 2014 only goes up to ARM2005 I don t know what the Debian version does . This is how it is that s not to deny you have a point about how it might be better", "Question : I ve installed GPS GPS 6.1.1 20150118 hosted on i686-pc-mingw32 GNAT GPL 2015 20150428-49 . It successfully compiles Hello World but even release executable is huge since it includes statically compiled not-optimized runtime and what is more important as far as I understand ada runtime is licensed under GPL and can not be statically linked into closed-source executable . How can I configure GPS gcc to link runtime dynamically Comment : The problem with GNAT vs GPL is that when you build against a particular RTS your involvement with the RTS is a your code may require instantiations of RTS code which effectively sucks the RTS into your application and b the interface between GCC and the RTS may have changed which makes it hard to replace one RTS with another at runtime i.e . by swapping dynamic libraries . .. . Answer : I will let someone else answer the specific question which is IMO a good one . Also good are related questions of minimising the runtime size where the full featured runtime is not necessary as for Hello World . Comparing the executable size with the memory installed on your platform one might conclude this is a case of premature-optimization . But for bare-bones executables e.g . on embedded microcontrollers it is certainly worth asking . However there is another implicit question : .. . .. . How do I divorce my executable from a GPL-encumbered runtime and I will answer this . Historically the Gnat RTS was not always so encumbered . At one time it featured the Gnat Modified GPL GMGPL https : en.wikipedia.org wiki GNAT Modified General Public License in which the runtime files contained additional permission above the GPL rights allowing you to link those components of the RTS with an executable without burdening your executable with the GPL - effectively allowing you to release such an executable under a closed-source license . Provided none of its other components were pure GPL . The Gnat GPL compiler comes with a pure GPL runtime completely legally to distinguish it from commercial offerings from the same authors - who have the right to put food on their own table and their commercial products http : www.adacore.com gnatpro have an excellent reputation and first class support . However there is another fork of the older Gnat compiler offered by the FSF as part of mainstream GCC https : gcc.gnu.org which is kept up to-date with modern Ada developments including Ada-2012 . In some respects it is ahead of Gnat GPL - in the underlying gcc version for example while in some respects it is behind as newer Ada features take longer to make it into the FSF branch . But the point here is that it inherited the GMGPL license and then the very similar Runtime Exception in GPLv3 . http : www.gnu.org licenses gcc-exception-3.1.en.html The linked Rationale and FAQ should let you determine if this satisfies your needs . If so . you can compile gcc including Gnat from source to meet your needs . This is not a trivial project however So for most common platforms you can find pre-built binaries of the FSF Gnat compiler from the imaginatively named getadanow.com http : getadanow.com .. . .. . Disclaimer : I am only pointing out this option . As always with licensing issues don t take the word of random guy on the internet but study the actual licenses of the compiler and RTS you are using and take appropriate legal advice . Comment : Licensing questions are always a major source of frustration . Adacore FAQ page states that A license guaranteeing that executables generated with GNAT Pro can be distributed under customer-specific terms and conditions . and that no guaranties are provided for GNAT GPL . I tend to understand this as GNAT is suitable for building closed-source executables just like gcc in general but you are doing it on your own risk . Another problem is that as an individual I can not take their commercial offers anyway minimum pack is 5 yearly licenses for a company . Comment : You are correct my answer should have pointed out that Gnat Pro licensing is different in this respect providing the permission you need . I use the FSF compiler when I cannot GPL my software . Comment : GNAT GPL effectively requires that you distribute applications with the GPL i.e . with your source . FSF GCC which has the GCC Runtime Library Exception as Brian notes allows you to distribute your applications on whatever terms you choose . Comment : Use pragma License https : gcc.gnu.org onlinedocs gnat rm Pragma-License.html to aid compliance .", "Question : I ve installed GPS GPS 6.1.1 20150118 hosted on i686-pc-mingw32 GNAT GPL 2015 20150428-49 . It successfully compiles Hello World but even release executable is huge since it includes statically compiled not-optimized runtime and what is more important as far as I understand ada runtime is licensed under GPL and can not be statically linked into closed-source executable . How can I configure GPS gcc to link runtime dynamically Comment : The problem with GNAT vs GPL is that when you build against a particular RTS your involvement with the RTS is a your code may require instantiations of RTS code which effectively sucks the RTS into your application and b the interface between GCC and the RTS may have changed which makes it hard to replace one RTS with another at runtime i.e . by swapping dynamic libraries . .. . Answer : This is very close to this question http : stackoverflow.com q 26167386 40851 and the same answer http : stackoverflow.com a 26175136 40851 applies . However in case you d prefer to edit your project properties in GPS via the Project Properties dialog : .. . .. . 1 . go to the Switches tab on the left hand side .. . .. . 2 . go to the Binder tab at the top .. . .. . 3 . tick the Shared GNAT run time checkbox . While you re there tick the Store call stack in exceptions checkbox too this can help debugging an unhandled-exception the binder switch is -E . Comment : Ok my problem was the lack of Binder Compiler and Linker packages in .gpr project file why did compilation work . After adding them manually all the required options became available on Switches page . I guess I should ve created new project using Simple project template .", "Question : null .. . Answer : Is there a way to create a link-to a web page in code comments in Gnat Programming Studio I don t want the link-to be in the Help section - I want it to be in the comments of the source code .", "Question : null .. . Answer : show tags http : i.stack.imgur.com twbUI.png doesn t show the tags http : i.stack.imgur.com jmxBt.png .. . .. . Question 1 .. . .. . In the first image you can see that GNAT Programming Studio is showing tags package pragma subprogram etc . for the file wasabee-caches.adb .. . .. . In the second image however GPS won t let me expand directory . the current directory highlighted in blue is this by design or I misconfigured something Question 2 .. . .. . In the second project Wasabee GWindows when I try to gnatpp Menubar : Edit Pretty Print a source file GPS told me gnat : aggregate library projects are not supported my question is how do I pretty print a source file in Wasabee GWindows The AWS is aggregate Wasabee GWindows s gpr file has with aws but Wasabee GWindows s gpr file itself doesn t have something like aggregate library-project Wasabee GWindows in it . The project compiles OK . Comment : If you can t expand a directory it s because there are no source files in that directory . Comment : @egilhh It has source files in it several .adb and .ads files . Comment : Then it could depend on your naming scheme or whether Ada is listed as a language in the project file for Languages use Ada Comment : No just checked no luck . Comment : Can you post the project file", "Question : I am attempting to debug my project in GNAT s GPS IDE . Every time I chose Debug- Initialize- program name the gui of GPS switches to that of the debug GUI and then an error pops up with could not initialize the debugger . The two possible solutions I have found are that gdb.exe may be out of date and it suggests running it outside of GPS which it does run fine . The other possible solution is to make sure the -g tags are applied when building the project as those are necessary for gnatlink and gcc for debugging . It also states that the -g tag is applied to a new project by default unless you have specifically removed it . I doubt I have but I am not sure where I would check that to make sure it is still included . The other odd thing is that the tutorial that comes with GPS that runs through how to build and debug your code works perfectly fine when I initialize debugging on it . That tutorial I am referring to can be accessed through Help- GPS- GNAT Programming Studio Tutorial . It references the program sdc which comes in the GNAT 2012 share examples gps tutorial directory . Any ideas on what I am doing incorrectly since the error isnt very helpful Thanks Comment : Make sure you have set a Main in the project file : for Main use foo.adb .. . Answer : At first it sorta sounds like a path problem but if you re able to run a debugger tutorial that s probably not the case . The behavior you re seeing if the program isn t compiled with the debug -g flag doesn t quite match my experience but let s go ahead and check set the debug flag anyway . Select Project Edit Project Properties .. . .. . Click the Switches tab . Click the Gnatmake tab . Check Debug information . Note that a -g now shows up in the text box at the bottom of the tab page . Click OK on the dialog . Recompile your code so that it uses the changed option . Select Build Clean Clean All and OK any dialog that pops up . Then do your build you can just press F4 . Comment : Unfortunately the issue still exists . It still exists if I check the Debug Information checkbox for the Ada Linker tab in switches as well ." ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
atg@web@35
atg -- atg s art technology group @placeholder commerce platform .
{ "confidence": [ 51.12813949584961, 50.86485290527344, 50.86485290527344, 47.3955192565918, 47.08333969116211, 46.62982940673828, 44.656280517578125, 44.3685188293457, 43.64129638671875, 43.50218200683594, 43.50218200683594, 43.50218200683594, 43.3748893737793, 43.23451614379883, 42.85010528564453, 42.559478759765625, 42.26046371459961, 42.12712097167969, 42.03596496582031, 41.85417175292969, 41.85417175292969, 41.85417175292969, 41.836814880371094, 41.682273864746094, 41.33135986328125, 41.0097541809082, 41.0097541809082, 40.94130325317383, 40.87289810180664, 40.87289810180664, 40.70100021362305, 40.60961151123047, 40.56820297241211, 40.47332000732422, 40.06013870239258, 40.06013870239258, 40.06013870239258, 39.94331359863281, 39.930870056152344, 39.930870056152344, 39.930870056152344, 39.692996978759766, 39.692996978759766, 39.64087677001953, 39.64087677001953, 39.64087677001953, 39.64087677001953, 39.64087677001953, 39.64087677001953, 39.64087677001953, 39.64087677001953, 39.46897888183594, 39.377593994140625, 39.377593994140625, 39.1738166809082, 39.05259704589844, 39.01569366455078, 38.84857940673828, 38.84857940673828, 38.41212844848633, 38.41212844848633, 38.41212844848633, 38.41212844848633, 38.007545471191406, 37.97550964355469, 37.72510528564453, 37.71757888793945, 37.71757888793945, 37.57017135620117, 37.567710876464844, 37.567710876464844, 37.56742858886719, 37.479705810546875, 37.43684005737305, 37.43085479736328, 37.40458679199219, 37.33361053466797, 36.98997497558594, 36.945587158203125, 36.642845153808594, 36.642845153808594, 36.642845153808594, 36.642845153808594, 36.642845153808594, 36.642845153808594, 36.56016540527344, 36.56016540527344, 36.470947265625, 36.470947265625, 36.470947265625, 36.43634033203125, 36.37956237792969, 36.37956237792969, 36.37956237792969, 36.37956237792969, 36.32319259643555, 36.19883346557617, 36.19883346557617, 36.19883346557617, 36.19883346557617 ], "content": [ "I tried to clear the current commerce item in ATG .", "is it possible to use AngularJs for Oracle ATG web commerce", "Are you using the ATG Commerce Reference Store", "It is still incorrect in ATG 10.2 ATG 11 documentation", "ATG packages a number of admin servlets with the platform .", "Newbie in ATG", "Within ATG there is a way to counter this and it is called the RepeatingRequestMonitor https : docs.oracle.com cd E22630 01 Platform.1002 apidoc atg commerce util RepeatingRequestMonitor.html .", "I m kinda new in the Oracle Commerce ATG technology and don t understand many of its concepts yet .", "ATG platform is having good future in eCommerce business", "I am new to ATG .", "Why ATG Dust", "2 . Or this call is within the ATG", "The relative-path should be atg commerce endeca index ProductCatalogSimpleIndexingAdmin .", "For Detail You can read ATG Platform Programming Guide", "Try ATG home servers your server name localconfig atg-dynamo service jdbc .", "I m newbee with atg .", "There is no such document for ATG .", "I the components atg commerce textsearch OrderOutputConfig and atg userprofiling textsearch ProfileOutputConfig and I found them indexing perfectly in the tables SRCH ORDER TOKENS and SRCH PROFILE TOKENS respectively .", "Just locate the ATG-Patch-Version ATG-Version and ATG-Version-Full for these files and it will tell you .", "I am working on an ATG project .", "I am working in an ATG application .", "I am new to ATG Framework .", "Can we disable this in atg", "There is a DropletInvoker class from ATG DUST .", "Initially I have installed ATG and CommerceReferenceStore and configured it using ATG CIM .", "where orderManager is the variable that holds a reference to the atg commerce order OrderManager Nucleus component .", "I am working on ATG Web-commerce REST Full API addItemToOrder is not working .", "atg.service.collections.filter.droplet.CollectionFilter is the class for the component atg commerce collections filter droplet GiftlistSiteFilterDroplet .. . .. . Just invoke the getFilter method in the class .. . .. . Refer : - https : docs.oracle.com cd E23095 01 Platform.93 apidoc atg service collections filter droplet CollectionFilter.html .. . .. . https : docs.oracle.com cd E26180 01 Platform.94 ATGCommStoreGuide html s1712collectionfilter01.html .. . .. . Thanks", "I would recommend that you look at the ATG CSC known as CSR in older versions of ATG .", "You can start off by interrogating the Response Headers and look for the X-ATG-Version .. . .. . That normally indicates that a site is running ATG .", "I am new to ATG and I managed to install ATG 11.2 framework and CRS Store .", "I am working on ATG portal using REST API all ATG API s are tested using PostMan .", "What about a configured ATG-Data folder", "Create testRepository.properties at same path as - .. . .. . class atg.adapter.gsa.GSARepository scope global XMLToolsFactory atg-dynamo service xml XMLToolsFactory dataSource atg-dynamo service jdbc SwitchingDataSource definitionFiles com myproject content testRepository.xml groupContainerPath atg registry RepositoryGroups idGenerator atg-dynamo service IdGenerator lockManager atg-dynamo service ClientLockManager repositoryName Test Repository transactionManager atg-dynamo transaction TransactionManager .. . .. . 3 .", "What version of ATG", "@radimpe ATG Search .", "I m using ATG 10.0.2", "Thanks for the response my config atg Initial.properties has only 4 services atg siebel configurator spu StructuredProductUIRepository atg siebel configurator spu StructuredProductUITools atg siebel configurator spu generation BlockGenerationService atg siebel order submit SiebelOrderSourceSink", "Which instance of ATG is Siebel connecting to", "Inside my ATG DAS6.3.0 home .", "for details please follow atg doc .", "the ones ATG uses to call Siebel .", "Is ATG Dust outdated or still in use", "Is there any way to know that whether a site is running in ATG or not", "How to add short description for component property in ATG .", "In atg what is default caching for order repository .", "Do we have to anything for ATG 11", "I ve installed and configured ATG on my system .", "I have created a sample ATG project in eclipse .", "startDynamoOnJBOSS is no longer available in the ATG 10.2 bin .", "startDynamoOnJBOSS is no longer exists in ATG version 10 .", "Install Eclipse Indigo and install ATG plugin for it .", "Created the ATG project in the Eclipse and deployed to the JBOSS .", "Is the following steps are correct for starting the ATG as a Beginner", "I was able to create an ATG project under Eclipse using the wizard New ATG Application Moduke but now I am not being able to run it on browser .", "This is the case in ATG 9.x .. . .. .", "The basic usage for the ATG scheduler added as a property in your ATG properties file : .. . .. . The docs for this are here http : docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html s0905schedulesettings01.html s0905calendarschedule01 .", "PS : I have around 4 years of experience in ATG Commerce but haven t encountered its usage anywhere .", "I am new to ATg commerce world and was wondering if someone can help me with an issue .", "What version of ATG are you using", "Is Endeca installed on the same box as ATG", "ATG stores passwords in encrypted format .", "I am using ATG 10.0.3 .", "And I find another useful link which make much easier to try the atg with eclipse : asknsay.com creating-new-atg-project-in-eclipse.html http : www.asknsay.com creating-new-atg-project-in-eclipse.html", "Is the login page itself rendered by your ATG app", "Thanks for replying I am using ATG web-commerce and I have enabled REST API in that not sure where to write Pipeline servlet Hoping ATG will be having the same feature some where .", "Here s the code I m using : .. . .. . Will this work in the sense of ATG", "In ATG you dont have action URLs .", "In ATG can i map an itemdescriptor to a view instead of a table", "Our e-commerce application built on ATG has provision whereby multiple users can update the same Order .", "This should be adequate for most situations on a commerce site since session stickiness will confine updates to the same order to the same ATG instance .", "Below is an extract from the Oracle ATG documentation : .. . .. . Note : Commerce Service Center does not support Commerce B2B features within orders .", ".. . .. . ATG maintains your session in two ways : .. . .. . 1 .", "From the ATG documentation : .. . .. . A multi-server application might require locked caching where only one Oracle ATG Web Commerce instance at a time has write access to the cached data of a given item type .", "How do I invoke an ATG form handler using ATG REST Client and pass parameters to it", "@chairbender we are using ATG+Endeca .", "I am working with the ATG platform and cannot figure out how to hide or remove the section of the response header X-ATG-Version : xxxxxxx .", "Can anyone please explain how to add bundle sku to cart in ATG", "But I have looked another atg documentation http : docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html s0807customizingarequesthandlingpipel01.html and found out that session scoped neclues like atg userprofiling Profile is not available if it does not go through atg DAF pipelining .", "I need to write a ATG Dust project to test my application .", "Who knows I think only ATG starters could ask :", "This seems to have crept into the documentation somewhere between 2007 and ATG 9 .", "I am creating a component in ATG which has one Date property .", "In ATG once used coupon not getting disassociated after the completion of the order .", "If you didn t find the startDynamoOnJBOSS then there is some problem with your installation of jboss or atg .", "I m working in an environment that runs ATG Oracle Commerce 11.1 on Weblogic 12c and connects to an Endeca instance .", "Is there any other option which is used by other frameworks like ATG Broadleaf IBM Websphere commerce etc .", "I know how to invoke an ATG droplet from a jsp page .", "ATG Dust http : atgdust.sourceforge.net is a framework for building JUnit tests .", "You don t need to be running ATG modules to perform your tests .", "As advised from the question : ATG Rest full API addItemToOrder is not working http : stackoverflow.com questions 38183721 atg-rest-full-api-additemtoorder-is-not-working .. . .. . I have created an organization and added the user in it null-pointer exeption got cleared but Now new error started coming up below are the server error .. . .. . Work Flow .. . .. . Add To cart POST method .. . .. . Content-type : application json .. . .. . http : IP : PORT rest model atg commerce order purchase CartModifierActor addItemToOrder .. . .. . Server Log .. . .. . Add To cart POST method .. . .. . Content-type : text xml .. . .. . http : IP : PORT rest model atg commerce order purchase CartModifierActor addItemToOrder .. . .. . Server Log", "How to deploy an Html content to BCC server in Oracle ATG", "please give me a good suggestion or the task to learn the ATG from scratch .", "First is using ATG Sitebuilder plugin delivered by a company called Spindrift .", "Please help any Experts from ATG and Angular background .", "Again for me the target is to replace ATG Dust with Mockito completely because ATG Dust take lot of time in running tests due to huge dependencies .", "Is the below ATG instance startup sequence correct", "Add the following to atg rest security restSecurityConfiguration.xml", "It will be in the atg web viewmapping ViewMappingRepository of the BCC instance .", "I encountered this problem with ATG 10.2.0.3 and Endeca 3.1.2 ." ] }
{ "confidence": [ 62.76983642578125, 59.523963928222656, 59.365135192871094, 57.68231964111328, 56.4681282043457, 56.31494903564453, 56.04334259033203, 53.65242385864258, 53.638675689697266, 53.638675689697266, 53.385459899902344, 53.21012496948242, 53.07270812988281, 52.4085578918457, 52.20822525024414, 52.05516052246094, 51.92314910888672, 51.92093276977539, 51.898338317871094, 51.756629943847656 ], "content": [ "Question : I am Very beginner in ATG and Spring I have done UI in AngularJs . is it possible to use AngularJs for Oracle ATG web commerce And how can I use spring in between to give http-request to AngularJs and is there any guide for these . I was not able to work from local host as my work location is in Local system and ATG installed in server .. . .. . From where can I get complete spring supported ATG .Jar files for web functionality development Please give a clear picture about ATG and available codes with good references . Please Advise . Comment : Welcome to SO . Please do some research before posting so you can ask better questions . Comment : docs.oracle.com cd E26180 01 Platform.94 ATGProgGuide html https : docs.oracle.com cd E26180 01 Platform.94 ATGProgGuide html s0212nucleusresolverutil01.html go through .. . Answer : You don t need to use Spring in order to have AngularJS read the HttpRequests from ATG . In fact it will probably complicate things if you try to do so . What you should do is enable the ATG Web Services Framework https : docs.oracle.com cd E24152 01 Platform.10-1 ATGWSFrameGuide html s0101particreatingandusingwebservices01.html . This will allow you to expose all the important functions in ATG as RESTful Services https : docs.oracle.com cd E24152 01 Platform.10-1 ATGWSFrameGuide html s1301usingrestwebservices01.html . Once you ve done that you can use AngularJS to interact with ATG https : docs.angularjs.org tutorial step 11 . Comment : Thanks : I have starting problem with the same . ATG already has all the functionality eg : login registeration cartItem etc. . and I can easly send and receive data from my angularjs Is that what you mean Comment : Correct . ATG already exposes functionality via RESTful services you just need to enable it as described in the documentation . Once you ve enabled the services you can use AngularJS to interact with these services . Comment : As I am very beginner I am facing difficulty Can you please guide me through some documents where I can get good Idea I have gone through the Oracle documentation but its too confusing and could not get a solution . Comment : FYI : I have Installed Fresh ATG and I have all the angularjs UI build For it . Comment : Are you using the ATG Commerce Reference Store Its setup process is documented . Once you ve configured that you need to enable the RESTful APIs using the documentation links provided above .", "Question : I want to pass dsp : iframe tag to the src jsp . As per ATG documentation I can use dsp : param tags to pass params and then use their value in the src of iframe . Can someone provide me with an example how this can be done Newbie in ATG .. . Answer : Below is some sample code : .. . .. . The parameter is passed as any parameter is passed in ATG and can be retrieved in the same way any parameter http : stackoverflow.com questions 25510040 how-to-generate-a-dynamic-url-using-dspa-in-oracle-commerceatg 25518007 25518007 is retrieved assuming your iframe reference another JSP in your application . If the references an external page the parameter should be retrieved from the query-string . Not sure you have done any research as this is clearly defined in the oracle-commerce help http : docs.oracle.com cd E52191 02 Platform.11-1 ATGPageDevGuide html s0210passingpageparameters01.html .", "Question : I know how to invoke an ATG droplet from a jsp page . Below code snippet calls the GiftListSiteFilterDroplet . Above code will invoke the GiftlistSiteFilterDroplet . However I m trying to findout how to invoke the same droplet from a java class . There is a DropletInvoker class from ATG DUST . Example code is as below for calling Switch component . However GiftListSiteFilterDroplet has a bean parameter . I would like to know if we can pass this bean parameter using this DropletInvoker . I would also like to know if there is anyway we can call droplet without using ATG DUST component . Is there any generic way of calling any droplet and pass the input parameters to it Comment : What are you trying to achieve ATG Dust http : atgdust.sourceforge.net is a framework for building JUnit tests . Are you calling this for testing purposes or are you wanting to call the Droplet from another piece of code for a different reason Comment : It is for the purpose of testing . We are building a droplet of similar functionality I m trying to figure out various ways of testing this new component without creating jsp pages . Comment : You can try using Mockito https : code.google.com p mockito instead of ATG Dust . There is an example of using this for a Droplet available here http : stackoverflow.com questions 17523741 using-mockito-for-writing-atg-test-case Comment : I agree with radimpe Mockito is better than Dust it is faster more thoroughly TDD-oriented follow-up to EasyMock . You don t need to be running ATG modules to perform your tests . .. . Answer : atg.service.collections.filter.droplet.CollectionFilter is the class for the component atg commerce collections filter droplet GiftlistSiteFilterDroplet .. . .. . Just invoke the getFilter method in the class .. . .. . Refer : - https : docs.oracle.com cd E23095 01 Platform.93 apidoc atg service collections filter droplet CollectionFilter.html .. . .. . https : docs.oracle.com cd E26180 01 Platform.94 ATGCommStoreGuide html s1712collectionfilter01.html .. . .. . Thanks", "Question : I searched for the indexing component ProductCatalogSimpleIndexingAdmin in the dyn admin dynamo administrator . I m not able to locate it . Even I tried to access it directly by typing it s URL path . I m getting an error saying Nucleus Service atg endeca index commerce ProductCatalogSimpleIndexingAdmin not found error snapshot http : i.stack.imgur.com CNOOP.png .. . .. . The DB is in remote place and so is the Endeca . What could be the problem I tried searching for this issue . I didn t find anything . Any help would be appreciated . Platform Details : ATG version : 11.1 Java version : 1.7.0 79 Server : Weblogic 12c .. . Answer : In my machine the browser URL is like the one below : .. . .. . http : commerceserver.example.com : 8080 dyn admin nucleus atg commerce endeca index ProductCatalogSimpleIndexingAdmin Comment : Blatant copy of my answer Comment : @bated - I just gave my answer and I included complete nucleus path I guess stackoverflow is for that purpose", "Question : I am doing siebel atg reference integration . Here I need to do compilation installation on siebelBuild.xml . In this step 2 targets are there . one is all another is all-with-ws . But my requirement is only getting importFromSiebel and getJobStatus Webservices . Is there way to make web-services alone Please suggest. . .. . Answer : The Oracle Commerce and Siebel Reference application is in the standard OC module format with the source code include . As far as I see it you have two options : .. . .. . 1 . Figure out all the code dependencies and delete and code and configurations which we won t be using not recommended .. . 2 . Use the module as is and disable the web-services you are not going to use . recommended approach .. . .. . The reason i recommend option 2 is because : .. . .. . It does not invalidate support from Oracle .. . If in future you want to use other web-services all you have to do is enable them .. . Upgrades to the Oracle Commerce will be easier .. . .. . Extract from Oracle Support Statement : .. . .. . Oracle will not provide support for changes customizations or extensions made to the Oracle Commerce Siebel Reference Integration Pack code or for any implementation issues that arise from such changes . Below is the config atg Initial.properties from the Oracle Commerce and Siebel Integration reference application for version 11.1.1 : .. . .. . You can simply remove the web-services that you do not need from the this file or alternatively override it with your own property file assuming there are no dependencies between the respective web-services .. . .. . If you are using a different version of the reference application your file might look different but the approach is the same . Comment : As an aside did you know that you can in your own config layer do for example initialServices- atg siebel integration webservices QuotingWebService It will remove the specified value from the list . - is essentially the opposite of + Comment : @Vihung or alternatively override it with your own property file Comment : Thanks for the response my config atg Initial.properties has only 4 services atg siebel configurator spu StructuredProductUIRepository atg siebel configurator spu StructuredProductUITools atg siebel configurator spu generation BlockGenerationService atg siebel order submit SiebelOrderSourceSink", "Question : I am working on ATG Web-commerce REST Full API addItemToOrder is not working . This is the Error : .. . .. . http : IP : Port rest model atg commerce order purchase CartModifierActor addItemToOrder .. . .. . I have checked the server log file Null pointer exception is showing . there are more lines of error Unable to post here Would it be because of product sync issue or sku s issue. . Please help Comment : Care to add the NPE in your question Otherwise the answer to your problem is you get an error due to an NPE . Comment : what do you mean by NPE I tried tagging to ATG web-commerce REST Full API I couldn t find out in the list Please advise Comment : I am seriously stuck on this issue any hope Comment : NPE is short for NullPointerException . Please add the Exception to your question because there isn t enough info here for us to help you . Comment : You need to add at least the first 10 lines of the error in order for it to be useful . .. . Answer : Still a bit difficult to work out exactly where the error is but considering that you are calling the updateQuoteWithProfileDetails Quote RepositoryItem method and in the calling method there is a null-check on the RepositoryItem profile and Quote is new then the only line that could end up with a NullPointerException in the calling code is : .. . .. . Which means that the ProfileParentOrganisation value on the profile RepositoryItem is null . The rest of the code in that method according to the source provided by ATG in the reference application all provide null checks . Comment : I am using ATG Restful API Bit confused as I am new the domain . AddtoCart method is not related to CRM right so I dont need to check CRM log . Hoping addtoCart doesnot need to communicate to CRM . Comment : I am calling addItemToOrder API not aware of inner methods . Please Advise . Comment : As I said in my answer your ProfileParentOrganisation of the profile you are trying to use is null . Check your data . Comment : hi there was no progress As I am new to ATG I am feeling difficulty and tried multiple ways to understand the answer . I have some query about the same 1 . Is this addItemToOrder is calling any Siebel web-services 2 . Or this call is within the ATG 3 . If its calling Siebel service Please explain about the web service Comment : I ve never worked with the Siebel integration but what I can say is that your problem is in your data in the ATG instance . You probably only need to setup a ProfileParentOrganisation on the user you are trying to use for the query . This is likely done via the BCC .", "Question : As advised from the question : ATG Rest full API addItemToOrder is not working http : stackoverflow.com questions 38183721 atg-rest-full-api-additemtoorder-is-not-working .. . .. . I have created an organization and added the user in it null-pointer exeption got cleared but Now new error started coming up below are the server error .. . .. . Work Flow .. . .. . Add To cart POST method .. . .. . Content-type : application json .. . .. . http : IP : PORT rest model atg commerce order purchase CartModifierActor addItemToOrder .. . .. . Server Log .. . .. . Add To cart POST method .. . .. . Content-type : text xml .. . .. . http : IP : PORT rest model atg commerce order purchase CartModifierActor addItemToOrder .. . .. . Server Log .. . Answer : The error that you are getting is not because your request is using the incorrect Content-Type but rather that the response you are getting back from the endpoint of your SOAP call is returning an HTML response most likely a 404 error response . You will need to confirm that the endpoint you are trying to connect to is actually valid using some tool like SOAPUI and passing the SoapEnvelope you generated in the debug statement to the endpoint and confirm the response . Comment : I somewhat agree with your assessment to me it looks like whatever SOAP client that atg.siebel.catalog.SiebelCatalogTools is using that it is not sending the correct Content-Type header . It is hard to diagnose without knowing more about how the SOAP client was generated .", "Question : Our e-commerce application built on ATG has provision whereby multiple users can update the same Order . Since the cache mode for Order is Simple - this has resulted in large number of ConcurrentUpdateException and InvalidVersionException . We were considering locked cache mode however are skeptical about using locked caching as the Orders are being updated very frequently and locking might result in deadlocks and have its own performance implications . Is there a way we can continue using simple cache mode and minimize the occurances of ConcurrentUpdateException and InvalidVersionException .. . Answer : My experience has been that you have to use locked caching with orders on any medium to high volume ATG websites. . Also remember that the end-user experience is bad when this happens as they either get an error message if the error-handling is good or they get something like an internal server error error . The reason I believe you need to use locked caching for order is : .. . .. . 1 . You can t guarantee that a user has not got multiple sessions open at the same time which are updating the shopping cart which is just an incomplete Order . I have also seen examples where customers share their logins with family members etc and then wonder why all these items keep magically appearing in their shopping cart . 2 . There are a number of processes which update the order including things like scenarios and customer service agents using the CSC module . 3 . You could have code which updates orders in a non-safe way . Some things which might help include : .. . .. . Always use the OrderManager to load update an order . Sounds obvious but I have seen a lot of updating orders via the repository . Make sure that any updates are inside a transaction block . Try to consolidate any background processes which might update orders to run on a small subset of your ATG instances this will help reduce concurrency .. . .. . The ATG help http : docs.oracle.com cd E35319 01 Platform.10-2 ATGRepositoryGuide html s1005lockedcaching01.html has this to say about it : .. . .. . A multi-server application might require locked caching where only one Oracle ATG Web Commerce instance at a time has write access to the cached data of a given item type . You can use locked caching to prevent multiple servers from trying to update the same item simultaneously for example Commerce order items which can be updated by customers on an external-facing server and by customer service agents on an internal-facing server . By restricting write access locked caching ensures a consistent view of cached data among all Oracle ATG Web Commerce instances . That said converting to locked caching will most certainly require performance-testing and tuning of the order repository caches . It can and does result in deadlocks seen that many times but if configured correctly the deadlocks are infrequent . Not sure what version of ATG you are using but for 10.2 there is a good explanation here http : docs.oracle.com cd E35319 01 Platform.10-2 ATGRepositoryGuide html s0709maintainingitemconcurrencywithth01.html of how you can get everything in sync .", "Question : I have installed Oracle ATG v11 with the commerce reference store when I startup the production server and go to the url domain crs storeus I see the blank white page and have the following error in the console : .. . .. . I am assuming this error is related to endeca I have downloaded CAS Tools And Frameworks with experience-manager and MDX and Platform Services . Do I need to start these or have I missed a part of the endeca install Comment : You have to start the services . Check that you have both Endeca HTTP service and Endeca Tools Service running . Comment : I have run the following commands to start the services : source oracle atg endeca PlatformServices workspace setup installer sh.ini source oracle atg endeca Workbench workspace setup installer sh.ini source oracle atg endeca MDEX 6.5.1 mdex setup sh.ini ENDECA ROOT tools server bin startup.sh ENDECA TOOLS ROOT server bin startup.sh Comment : what does ps -ef tell you Do you have your services running What about netstat -a grep 15000 Do you have anything listening on port 15000 Is Endeca installed on the same box as ATG .. . Answer : Your DGraph is not yet started . .. . .. . Hit this URL in your browser and verify : http : localhost : 15000 graph node 0 profiles sitegroup.siteGroupUS NoPriceRange site.storeSiteUS offset 0 nbins 0 irversion 640 format xml .. . .. . Possible reasons are : .. . .. . .. . 1 . You did not run baseline update from ATG from ProductCatalogSimpleIndexingAdmin dyn admin component . 2 . You did not run promote content from your Endeca App s control folder . 3 . Your Services are not working properly or not started at all . Check that Platform Services and Tools And Frameworks are started .", "Question : On creation of new external user from ATG BCC I need to include some logic like encrypting password and sending email to user . Achieved this functionality by extending GSAPropertyDescriptor class and overriding its getPropertyValue RepositoryItemImpl pItem Object pValue method . Problem is this method is getting called only when we click on create button from General tab present in users section but not on click of same create button from other tabs like Commerce Orgs Roles User Segments and Advanced . Please suggest .. . Answer : It is not a good idea to override getPropertyValue of an item for this implementation . The right way to do this is to work with the formhandler that is responsible for saving the user . It is a bit tricky to find this formhandler . It will be in the atg web viewmapping ViewMappingRepository of the BCC instance . In this repository there will be lots of formhandlers configured for different purposes . You have to pick the one relevant for the user edit . Here is an example of what you might find there : .. . .. . With this you go to appropriate Formhanlder like atg web assetmanager editor profile UserFormHandler mentioned here . And override that component in your module with your own implementation . Once that is done you ll have the control of the action . You can do your work and pass on the control to super class the original implementation . Regards Jags Comment : Thanks Krishnamurthy.I tried this solution.But facing some issue while extending UserFormHandler . java com beacm personalization BEAUserFormHandler.java : 12 : cannot access atg.web.assetmanager.editor.TreeAssetRepositoryFormHandler class file for atg.web.assetmanager.editor.TreeAssetRepositoryFormHandler not found public class BEAUserFormHandler extends UserFormHandler Getting above error on server start up.There is no TreeAssetRepositoryFormHandler component in dyn admin in path atg web assetmanager editor TreeAssetRepositoryFormHandler also in DPS-UI module in ATG 10.2 folder Comment : Did you get this problem resolved This seems like a regular java error with classpath issues than ATG specific issue . Ensure the AssetUI and other related modules exist . Please look at this link - docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html http : docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html s2301appendixeatgmodules01.html", "Question : I searched for the indexing component ProductCatalogSimpleIndexingAdmin in the dyn admin dynamo administrator . I m not able to locate it . Even I tried to access it directly by typing it s URL path . I m getting an error saying Nucleus Service atg endeca index commerce ProductCatalogSimpleIndexingAdmin not found error snapshot http : i.stack.imgur.com CNOOP.png .. . .. . The DB is in remote place and so is the Endeca . What could be the problem I tried searching for this issue . I didn t find anything . Any help would be appreciated . Platform Details : ATG version : 11.1 Java version : 1.7.0 79 Server : Weblogic 12c .. . Answer : The path you are using is incorrect . The relative-path should be atg commerce endeca index ProductCatalogSimpleIndexingAdmin . or .. . .. . http : yourhost : port dyn admin nucleus atg commerce endeca index ProductCatalogSimpleIndexingAdmin .. . .. . The dyn admin component browser has a search feature which allows you to locate components when you are not sure of the path . You can access this as follows : .. . .. . 1 . From the dyn admin homepage select component browser .. . 2 . Click the link near the top of the page in the component browser Search .. . 3 . Type in the name or part of the name of the component you are looking for Comment : Hi I ve also tried the URL you suggested . That s also not working . The problem is the search leads to the exception . when search all option 2nd radio-button is used . Comment : What is the exception", "Question : null .. . Answer : we are working on ATG migration from 10.2 to 11.0 we are getting below exception during the migration . We have the springtonucleus.jar inside the webapplication lib folder . Do we have to anything for ATG 11 Caused by : java.lang.NullPointerException at atg.nucleus.spring.NucleusPublisher SpringNameContext.insertIntoNucleus NucleusPublisher.java : 471 springtonucleus.jar : at atg.nucleus.spring.NucleusPublisher.afterPropertiesSet NucleusPublisher.java : 205 springtonucleus.jar : at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods AbstractAutowireCapableBeanFactory.java : 1460 spring-beans-3.0.1.RELEASE.jar : 3.0.1.RELEASE at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean AbstractAutowireCapableBeanFactory.java : 1400 spring-beans-3.0.1.RELEASE.jar : 3.0.1.RELEASE .. . 23 more Comment : Try posting this to the Oracle Forums as well . community.oracle.com community oracle-applications https : community.oracle.com community oracle-applications oracle-commerce technical", "Question : I am implementing a 3rd party Payment gateway using URL redirection . After the Payment I will automatically get redirected to my page by the PG . When I redirect the user to the payment-gateway page as an user I can open cart in another browser and edit the products because the order is still in order incomplete state . If I want to hold the order in waiting for payment state it fails in a scenario where there is no response from payment-gateway . How to change the order back . I want to implement a time out schedule for this waiting state but I cannot say how many minutes it will take for an order payment to get processed . Please help me with this design.If there is any better solution please suggest . Thanks Pradeep Shankar . .. . Answer : I would suggest you investigate using locked caching with isolation-level of serializable for the order repository item and sub items . This would mean that that the thread trying to authorize payment would acquire a write lock preventing other updates to the order . From the ATG documentation : .. . .. . A multi-server application might require locked caching where only one Oracle ATG Web Commerce instance at a time has write access to the cached data of a given item type . You can use locked caching to prevent multiple servers from trying to update the same item simultaneously for example Commerce order items which can be updated by customers on an external-facing server and by customer service agents on an internal-facing server . By restricting write access locked caching ensures a consistent view of cached data among all Oracle ATG Web Commerce instances . Setting up locked caching : .. . .. . 1 . Correctly configured lock servers and client lock managers on all instances of ATG .. . 2 . Changes to the repository definition .. . 3 . Substantial performance-testing .. . .. . This is typically a fairly big change to make as it has potential implications on performance and stability . More info can be found here http : docs.oracle.com cd E35319 01 Platform.10-2 ATGRepositoryGuide html s1005lockedcaching01.html .", "Question : null .. . Answer : ATG platform is having good future in eCommerce business who will be next leader in current Java eCommerce market suggest which technology having good package and durability", "Question : I have installed Oracle ATG v11 with the commerce reference store when I startup the production server and go to the url domain crs storeus I see the blank white page and have the following error in the console : .. . .. . I am assuming this error is related to endeca I have downloaded CAS Tools And Frameworks with experience-manager and MDX and Platform Services . Do I need to start these or have I missed a part of the endeca install Comment : You have to start the services . Check that you have both Endeca HTTP service and Endeca Tools Service running . Comment : I have run the following commands to start the services : source oracle atg endeca PlatformServices workspace setup installer sh.ini source oracle atg endeca Workbench workspace setup installer sh.ini source oracle atg endeca MDEX 6.5.1 mdex setup sh.ini ENDECA ROOT tools server bin startup.sh ENDECA TOOLS ROOT server bin startup.sh Comment : what does ps -ef tell you Do you have your services running What about netstat -a grep 15000 Do you have anything listening on port 15000 Is Endeca installed on the same box as ATG .. . Answer : The value of the configurationPath attribute in the DefaultFileStoreFactory.properties located at localconfig atg endeca assembler cartridge manager may be incorrect . In OOTB CRS we normally provide the following value for configurationPath attribute : ToolsAndFrameworks 11.1.0 server workspace state repository CRS .. . .. . Could you please verify the .zip is present at path provided in DefaultFileStoreFactory.properties .", "Question : I have been struggling to see ATG profile in a Spring controller . At the begining I thought it was possible to get atg profile from spring controller by reading this document http : docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html s0212nucleusresolverutil01.html by defining like this . But I have looked another atg documentation http : docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html s0807customizingarequesthandlingpipel01.html and found out that session scoped neclues like atg userprofiling Profile is not available if it does not go through atg DAF pipelining . Note : When you add your own servlets to the servlet pipeline bear in mind that you cannot access the session object until the SessionServlet locates or creates it . So if you add a servlet to the pipeline that needs to access the session object make sure that your servlet appears in the pipeline after the SessionServlet . Thus I tried to set PageFilter for spring servlets like the following . However it failed . The reason is that spring Controller is not a Servlet so that it cannot be at the end of ATG daf pipelininng . If I use a simple HttpServlet or DynamoServlet I can access user-profile . However I really need to use Spring Framework because my company wants to use it . Another reason is we are at servlet2.3 and I really want to use Spring annotations . Questions are .. . .. . 1 . Is there a way to get atg session scoped necleus from Spring controller without going through DAF pipelining 2 . Like a JSP page is there a way to set a spring controller at the end of ATG daf pipelining Comment : Have you considered accessing or exposing the profile via the out of the box web-services I have seen many attempts to implement so called true MVC in ATG and all of them have resulted in a world of pain and made upgrades of ATG almost impossible . The DAF pipeline is fundamental to ATG so bypassing is risky e.g . it has XSS filtering etc etc . I would really recommend that you reconsider your strategy . .. . Answer : Here I post the solution that I have found .. . .. . 1 . Is there a way to get atg session scoped necleus from Spring controller without going through DAF pipelining NO . we need to go through ATG DAF pipelining to get session scoped nucleus . 2 . Like a JSP page is there a way to set a spring controller at the end of ATG daf pipelining YES we can let Spring DispatcherServlet at the end of ATG DAF pipeline instead of direct servlet mapping in addition to the existing PageFilter Mapping . The following is my web.xml .. . .. . It might not be the ideal answer but at least it works .", "Question : I have created a sample ATG project in eclipse . This is the way I followed . File- New- Project- ...atg wizards- New ATG Module .. . .. . Next- put project name as MyFirstATGApp and select ed root diretory as C : ATG ATG10.1.2 Next- Default atg adaptive senario engine is selected . Next- Next- changed Default output folder value as MyFirstATGApp classes Next- set J2EE application Name MyFirstATGApp-j2ee Web application name MyFirstATGApp-web Context-root MyFirstATGApp and selected Target Applicaton Server Jboss Then Finish . From command-prompt from C : ATG ATG10.1.2 home bin I tried executing startDynamoOnJBOSS -f MyFirstATGApp .. . I am getting following error.Also I didn t find a startDynamoOnJBOSS inside the bin . Why is this happening enter image description here http : i.stack.imgur.com jpQFl.jpg .. . .. . I am new to ATG.Can I have any link with step-by-step ATG-Jboss-Eclipse project available Comment : Have you checked the ATG HOME bin folder You will probably find a startDynamoOnTomcat.bat file there instead . Comment : @radimpe : startDynamoOnTomcat is there.I am looking for startDynamoOnJBOSS . I have configured JBoss server . Comment : Does your project exist in ATG HOME servers MyProject1 Does it have a startDynamoOnJBOSS.bat file in there I ve created the CRS project and I have the startDynamoOnJBOSS.bat file in my ATG HOME servers ATGProduction folder . Never been a big fan of the plugin . I d much rather unpack the ATGProduction folder into a project and work from there . Comment : NO. . for your questions . But I had configured JBoss successfully . : .. . Answer : If you didn t find the startDynamoOnJBOSS then there is some problem with your installation of jboss or atg . but still you can run your project you just need to create ear of your project and paste it in your server deploy folder and start jboss . For Detail You can read ATG Platform Programming Guide", "Question : The basic usage for the ATG scheduler added as a property in your ATG properties file : .. . .. . The docs for this are here http : docs.oracle.com cd E23095 01 Platform.93 ATGProgGuide html s0905schedulesettings01.html s0905calendarschedule01 . The description for the month mos is extremely baffling to me : .. . .. . Is there any valid reason for this bizarre break from normal month representation ie 1-12 I am at a loss to understand why they did this . It doesn t even line up with the way java.util.Calendar behaves : Link http : stackoverflow.com questions 344380 why-is-january-month-0-in-java-calendar .. . .. . Is there some logical explanation as to why they did this Comment : So this question is about why they decide to select this value for December Who knows I think only ATG starters could ask : .. . Answer : That is a typing error . In the older docs for ATG 2007 http : docs.oracle.com cd E23507 01 Platform.20073 ATGProgGuide html s0905configuringaschedulablecomponent01.html it correctly refers to January as 0 and December as 11 . Additionally the rest of the content on that page indicates that May is 4 and August is 7 only true if January is 0 . This seems to have crept into the documentation somewhere between 2007 and ATG 9 . It is still incorrect in ATG 10.2 ATG 11 documentation Comment : Bizarre that something THAT obvious could be changed and no one would catch it.. . Comment : Maybe when they started using Joda Time for a few of their date time functions they got confused and decided to let the rest of us feel the same .", "Question : null .. . Answer : Is ATG Dust outdated or still in use If YES then where is the proper documentation I did not find it on the Oracle site . If NO then what are the best alternatives How can we implement them to start up the Nucleus initialize components PS : I have around 4 years of experience in ATG Commerce but haven t encountered its usage anywhere . We are currently working in ATG 10.x but still do not have an idea of how are we gonna unit test our applixation . Thanks Comment : ATGDust is just a framework for injecting Nucleus components into your tests . You can achieve the same thing with other off-the-shelve mocking frameworks as well . It is not the tool you use but the quality of the test that is important . Comment : Thanks @radimpe I am still curious about the fact that what drives the preference for deciding the tool framework to be used for these Unit Testing practices .", "Question : I am trying to perform order and profile search operations on CSC but they return no results . I the components atg commerce textsearch OrderOutputConfig and atg userprofiling textsearch ProfileOutputConfig and I found them indexing perfectly in the tables SRCH ORDER TOKENS and SRCH PROFILE TOKENS respectively . After enabling loggingDebug in both components I found that the search query has additional condition seems that it s related to multisite pfrmZeroRealmsAccessible however I found that all tokens stored in DB for orders and customers have this value pfrmdft . Below is the query extracted from logs : .. . .. . Note : My application has only one single site not multisite however I found some configuration-files created by CIM related to multisite which I can t remove . Please help me answering the following question : .. . .. . 1 . Is this issue really related to multisite configuration and how can I fix this problem in orders and customers search 2 . In Oracle commerce 11.1 how can I disable working with multisite Thanks .. . Answer : If you have not configured multi site then you need change the property siteAccessControlOn to false in the below component atg commerce custsvc environment CSREnvironmentTools .. . .. . for more details you can get back to the below oracle docs link .. . .. . http : docs.oracle.com cd E52191 01 Service.11-1 ATGCommerceServiceCenterInstall html s1203controllingsiteaccess01.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
xhtmlrenderer@itext@154
xhtmlrenderer -- xhtmlrenderer also calledflying saucer takes xml or xhtml and applies css 2.1-compliant stylesheets to it in order to render to pdf via @placeholder images and on-screen using swing or swt .
{ "confidence": [ 66.95237731933594, 62.919593811035156, 59.55016326904297, 59.55016326904297, 52.583091735839844, 49.84052276611328, 48.54076385498047, 47.45753479003906, 47.365692138671875, 44.23616027832031, 42.97166442871094, 42.64617156982422, 42.03904724121094, 41.50083541870117, 40.99258041381836, 40.99258041381836, 40.98150634765625, 40.12812042236328, 39.998836517333984, 39.80213928222656, 37.96966552734375, 37.92168426513672, 37.5906982421875, 37.268367767333984, 36.18072509765625, 34.24592971801758, 34.183197021484375, 34.1075439453125, 34.056400299072266, 33.93640899658203, 33.93640899658203, 33.717384338378906, 33.50972366333008, 33.26826095581055, 33.23895263671875, 33.21112823486328, 33.10059356689453, 32.734832763671875, 32.37982177734375, 31.949792861938477, 31.727880477905273, 31.585844039916992, 31.256038665771484, 30.701345443725586, 30.26306915283203, 29.4459171295166, 28.576492309570312, 27.990528106689453, 27.5821590423584, 27.475318908691406, 27.244659423828125, 27.157955169677734, 26.687068939208984, 26.675535202026367, 26.429059982299805, 26.169742584228516, 25.899829864501953, 25.60446548461914, 25.56902503967285, 25.519393920898438, 25.44190216064453, 25.0604190826416, 24.482540130615234, 24.23175048828125, 24.008913040161133, 23.692737579345703, 23.14535903930664, 23.13705062866211, 22.89925765991211, 22.884340286254883, 22.637134552001953, 22.637134552001953, 22.599220275878906, 22.53384780883789, 22.376798629760742, 22.28421401977539, 21.93854522705078, 21.888824462890625, 21.668243408203125, 21.585878372192383, 21.490863800048828, 21.490863800048828, 21.45860481262207, 21.351104736328125, 21.327152252197266, 21.327152252197266, 21.327152252197266, 21.296842575073242, 21.287973403930664, 21.264419555664062, 21.056568145751953, 21.00041961669922, 20.977535247802734, 20.9114990234375, 20.86204719543457, 20.767751693725586, 20.27846336364746, 20.185104370117188, 20.18181610107422 ], "content": [ "I m using flying-saucer xhtmlrenderer to generate pdf from xhtml .", "It is a bug in the Flying Saucer xhtmlrenderer .", "I m using a custom truetype font in a pdf generated by flying-saucer xhtmlrenderer .", "I m using flying-saucer xhtmlrenderer for building pdf documents .", "I m using xhtmlrenderer Also known as Flying Saucer with iText to convert HTML to PDF .", "I was wondering what steps were needed to render Asian characters using the java based xhtmlrenderer flying-saucer library", "I ve been introduced to this wonderful project xhtmlrenderer the flying-saucer project http : code.google.com p flying-saucer .", "Now I am using xhtmlrenderer to covert html to PDF .", "Xhtmlrenderer is rendering Arabic text in reverse order .", "What are some situations that you would use XHTMLRenderer flying-saucer over JTextPane with a HTMLDocument and vice versa", "The fix is present in docx4java.org docx4j xhtmlrenderer-nightly-20130903.jar http : www.docx4java.org docx4j xhtmlrenderer-nightly-20130903.jar", "That makes me believe its xhtmlrenderer that is behaving strangely .", "I m trying to print labels using xhtmlrenderer and java printing .", "can xhtmlrenderer capture the elements created with javascript", "The easyest way to aviod that if you are using the Flying Saucer xhtmlrenderer is to create the document this way : .. . .. . Note that you can use XMLResource.load with a Reader too .", "I tried using flying-saucer xhtmlrenderer to capture the image of the graph but it doesn t seem to help me as the graphs being created by javascript .", "I read in this bugfix description http : java.net jira browse XHTMLRENDERER-168 that xhtmlrenderer should support the orphans and widows properties of CSS3 since Version R5 .", "I ve just downloaded xhtmlrenderer and iText jar files .", "I am getting a bug with Flying Saucer xhtmlrenderer where a word at the end of a line gets split across two lines eg .", "The issues i m facing with it is that xhtmlrenderer is taking too much time to generate pdf when css files are large or there is too much css .", "For xhtmlrenderer to work the CSS must read : .. . .. . font-family : Verdana .. . .. . instead of .. . .. . font-family : verdana .. . .. . It s case-sensitive .", "Hi Jason I cant find that copy of the xhtmlrenderer jar .", "I am wanting to render the following : .. . .. . Without any font settings being added to the HTML this renders fine in normal browsers but I can t find anyway to render this to PDF using the iTextRenderer portion of xhtmlrenderer .", "Difference between print from Mac Preview and java print api http : i.stack.imgur.com uzTio.jpg .. . .. . Update : Using xhtmlrenderer to create pdf and then printing through pdf-renderer http : java.net projects pdf-renderer did the trick .", "I need an editor that outputs clean HTML and preferably strict XHTML with CSS as I am going to display the resulting pages as help pages in a java application using xhmtlrenderer http : code.google.com p flying-saucer Flying Saucer which apparently very much prefers XHTML with CSS 2.1 .", "I try to set dpi both on xhtmlrenderer source and printer target but nothing seem to make any impact .", "I m using xhtmlrenderer + iText in Java to generate PDFs for some pages in my application .", "You could apply this recent upstream patch https : github.com flyingsaucerproject flyingsaucer commit 25a28383cb8fdedd727cd260362d0aff3af2c457 flying-saucer-core src main java org xhtmlrenderer util ImageUtil.java", "Now i know this should work because i have a similar legacy project which uses the same font and plain old itext ie no xhtmlrenderer and it does produce pdfs with bold text via : .. . .. . can anyone explain why i can t use bold with xhtmlrenderer and maybe a way to overcome this issue", "I m using Flying Saucer to create a pdf from xhtml hosted on a tomcat server .", "I m trying to generate a PDF file from XHTML by using the Flying Saucer 9.0.7 library .", "If you re using the iTextRenderer there is an ITextUserAgent https : github.com flyingsaucerproject flyingsaucer blob master src java org xhtmlrenderer pdf ITextUserAgent.java class which you can extend for your own custom UserAgent .", "I convert HTML files to PDF format using The Flying Saucer Project http : code.google.com p flying-saucer .", "In contrast Flying Saucer https : xhtmlrenderer.dev.java.net feature-list.html is an external dependency but it includes Strong support for the CSS 2.1 specification .", "I m generating pdf using flying-saucer lib .", "The appropriate methods in ITextRenderer http : jarvana.com jarvana view org xhtmlrenderer core-renderer R8pre2 core-renderer-R8pre2-sources.jar org xhtmlrenderer pdf ITextRenderer.java seem to be : .. . .. . As you can see my existing code just gives the uri and ITextRenderer does the work of creating the Document for me .", "I ve read somewhere on internet maybe on their own site that xhtmlrenderer does not support bidi rtl .", "This answer http : stackoverflow.com questions 8263416 generating-header-footer-with-flying-saucer-xhtmlrenderer-and-itext may be the same thing but my eyes glaze over because it s in a Java string and not in a html template .", "Flying saucer parses only valid xhtml .", "I m using flyingsaucer to render an xhtml document to pdf through a servlet which returns the generated pdf document .", "I tried to optimize my code but since xhtmlrenderer is external lib i can t do much to optimize it .", "Also you can try and follow the source code http : grepcode.com file repo1.maven.org maven2 org.xhtmlrenderer core-renderer R8pre2 org xhtmlrenderer pdf ITextRenderer.java ITextRenderer.setDocument 28java.lang.String 29 to see it it tells you anything .", "flying-saucer uses itext to generate the pdf .", "However I ve stopped trying to use and have started using : .. . .. . That is your ampersand that will work with xhtml and it will work with Flying saucer to get the ampersand into the PDF .", "I m using Flying Saucer to generate PDF from HTML so I m using ITextRenderer if that matters .", "Thanks - I m discovering this as well have since found even more example flying-saucer code showing the browser component displaying the glyffs on screen but which still fail to render on PDF using iText .", "See http : today.java.net pub a today 2006 10 31 combine-facelets-and-flying-saucer-renderer.html xhtml-to-image-conversion", "You want to extend UserAgentCallback https : github.com flyingsaucerproject flyingsaucer blob master src java org xhtmlrenderer extend UserAgentCallback.java with your own custom user-agent functionality .", "FlyingSaucer xhtmlrenderer R8pre2 uses iText 2.0.8 .. . docx4j 2.8.0 uses iText 2.1.7 .. . .. . I can only use one iText library but whichever one I use I end up with compatibility issues for either flying-saucer or docx4j .", "I get the error below when converting to PDF with flying-saucer .", "The project pulls the related content including images and stylesheets all I need to do is get the url to library and it gives me an outputstream with a pdf in it", "However I m now generating the xhtml and want to render it directly to a PDF without saving a file .", "I tried using the flying-saucer fork used by docx4j but unfortunately the pdf files produced seemed to be corrupted", "I have tried something like this http : stackoverflow.com questions 1747554 is-it-possible-to-resolve-css-as-a-classpath-resource-using-flying-saucer-xhtml but there is no easy way to set the UAC on the ITextRenderer and it complained every time i tried .", "in my xhtml i have the following : .. . .. . and I render like so : .. . .. . the resulting PDF is as expected however I notice that the image which is included only once in the xhtml and renders only once is being requested 4 times .", "There is a feature request to make data-url for images work directly in Flying Saucer : code.google.com p flying-saucer issues detail id 202 https : code.google.com p flying-saucer issues detail id 202", "You are probably also right in your inference that flying-saucer is not totally scalable .", "I m trying to use flying-saucer to create a very large PDF and it seems to be running out-of-memory .", "I ve been using Flying Saucer http : code.google.com p flying-saucer for a while now with awesome results .", "I have an xhtml document that I m turning into a PDF using flyingsaucer .", "server convert url http : server convert url valid xhtml-1.0-strict document valid xhtml-1.0-strict document .pdf", "Does Flying saucer have a way of specifying resource packages on the classpath to resolve items and images", "Is it possible with flying-saucer and iText", "But when Flying Saucer renders the pdf it doesn t include the protected image because it doesn t know anything about the session .", "I m just passing a url which points to a valid xhtml strict document in turn that service will return a pdf document on demand .", "I ve tried this approach : .. . .. . http : sdtidbits.blogspot.com 2008 11 flying-saucer-xhtml-rendering-and-local.html .. . .. . but without any success .. . .. . My code look like this : .. . .. . where pdf is the name of new pdf to create and url is .. . .. . my html file look like this .. . .. . Everything works fine beside those entities .", "does flying-saucer support putting images in CSS3 margin-boxes http : www.w3.org TR css3-page margin-boxes", "You may be able to use the bold variant in Flying Saucer if you specify the exact name of the bold variant in your CSS stylesheet .", "I m currently using the code below to render the xhtml document : .. . .. . I need to either maintain the user s session when the image servlet is requested or provide the renderer with the image to use for that specific xhtml element .", "I tried to generate pdf with and without css .", "A good means of diagnosing this for sure would be to switch which font you re using in Flying Saucer but keep the same document .", "Finally I m able to print arabic text in rtl ltr using flying-saucer .", "I am using PDFSharp to generate PDF from html source .", "xhtml renderer solve most of my problem except it taking substantial amout of time for pdf-generation so i am satisfy with respect to its results but not with its performance.I have to convert complex webpage having lots of stylesheets at server-side to pdf .", "Prince and Sphinx will do a nice job of transforming XHTML to PDF and the CGI can be something really exciting like a three line shell script .", "I tried to use flying-saucer as you did but it didn t work for me .", "Using the DocumentBuilder.parse this way will try to resolve the DTD referenced in the XHTML page .", "The xhtml has several tags that have a base64 encoded images inline .", "But I my case I want to render from code and I don t want to save a temporary XML file .", "I d prefer to use the existing Flying Saucer libs without having to import another XML parsing jar just for the sake of consistent bugs and functionality .", "This should work will with your existing XHTML- PDF conversion without requiring any code changes .", "I have a project where I want to be able to format xhtml documents into both PDF format and Docx format .", "if someone is interesting in topic here is link for google group on this : groups.google.com group flying-saucer-users browse thread http : groups.google.com group flying-saucer-users browse thread thread 9f409fb987e943a2", "Disclosure : I work on the docx4j project .. . .. . docx4j 2.8.0 only uses iText because it is required by our fork of Flying Saucer https : github.com plutext flyingsaucer which does the XHTML import .", "I ve created an issue http : code.google.com p flying-saucer issues detail id 118 in the issue tracker .", "I found http : code.google.com p flying-saucer which should be the most suitable solution for my project .", "Has anyone else who has used Flying Saucer encountered a similar issue", "Html to pdf-conversion is working fine but following error is coming : .. . .. . Core-renderer.jar i am using here.Background image on header is set through css .", "Texts and tables are rendered as expected but images PNGs are not shown in the final PDF .", "I m trying to print some text using my flying-saucer https : xhtmlrenderer.dev.java.net .", "Also since you meantioned creating the pdf in memory are you using JSF JSP or servlets", "however i need to implement an expire on use image cache for dynamic images and this is becoming a real headache.. . .. . .. . why does flying-saucer need to make 4 requests for the image if it only renders it once", "In my xhtml document i have : .. . .. . I m using a div element instead of img as the factory is only used for block level elements .. . .. . I render my document using : .. . .. . And i have my own ReplacedElementFactory as below :", "Flying Saucer throws this exception because there s a -- somewhere in a comment block .", "Flying-Saucer supports the data : protocol natively .", "I m using verdana in my page and the pdf is rendered using default font .", "I expect that it creates and uses in-memory representations of the complete input XML and the complete target PDF file .", "An alternative to XHTML Renderer", "I m no expert but if your font doesn t have a bold variant then Flying Saucer may simply not make it bold ." ] }
{ "confidence": [ 84.76419830322266, 84.17769622802734, 83.0450668334961, 72.42170715332031, 72.18814086914062, 72.17730712890625, 67.7807388305664, 66.50399017333984, 65.67756652832031, 65.12712097167969, 63.855438232421875, 62.19347381591797, 61.78070068359375, 59.7076530456543, 58.27392578125, 57.85967254638672, 57.83900451660156, 56.671905517578125, 55.07685852050781, 54.500450134277344 ], "content": [ "Question : null .. . Answer : I m using flying-saucer xhtmlrenderer to generate pdf from xhtml . The issues i m facing with it is that xhtmlrenderer is taking too much time to generate pdf when css files are large or there is too much css . I tried to generate pdf with and without css . And the results were as expected . It took nearly 3 sec without css and 50 secounds with css . Can anybody tell me some way to reduce generationn time . I tried to optimize my code but since xhtmlrenderer is external lib i can t do much to optimize it . Any help is appreciated Comment : Not sure what you re after . An alternative to XHTML Renderer A way to reduce your CSS Comment : xhtml renderer solve most of my problem except it taking substantial amout of time for pdf-generation so i am satisfy with respect to its results but not with its performance.I have to convert complex webpage having lots of stylesheets at server-side to pdf . Thus if you know some other alternative which can do better than XHTML renderer than please share . I can t reduce my css as it is part of UI . I tried some of css compression technique but its not that worthy . Hopefully now you understands details of my problem .", "Question : I ve been using Flying Saucer http : code.google.com p flying-saucer for a while now with awesome results . I can set a document via uri like so .. . .. . Which is nice as it will resolve all relative css resources etc relative to the given URI . However I m now generating the xhtml and want to render it directly to a PDF without saving a file . The appropriate methods in ITextRenderer http : jarvana.com jarvana view org xhtmlrenderer core-renderer R8pre2 core-renderer-R8pre2-sources.jar org xhtmlrenderer pdf ITextRenderer.java seem to be : .. . .. . As you can see my existing code just gives the uri and ITextRenderer does the work of creating the Document for me . What s the shortest way of creating the Document from my formatted xhtml String I d prefer to use the existing Flying Saucer libs without having to import another XML parsing jar just for the sake of consistent bugs and functionality . .. . Answer : I use the following without problem : .. . .. . The key differences here are passing in a null URI and also provided the DocumentBuilder with an entity resolver .", "Question : I ve been using Flying Saucer http : code.google.com p flying-saucer for a while now with awesome results . I can set a document via uri like so .. . .. . Which is nice as it will resolve all relative css resources etc relative to the given URI . However I m now generating the xhtml and want to render it directly to a PDF without saving a file . The appropriate methods in ITextRenderer http : jarvana.com jarvana view org xhtmlrenderer core-renderer R8pre2 core-renderer-R8pre2-sources.jar org xhtmlrenderer pdf ITextRenderer.java seem to be : .. . .. . As you can see my existing code just gives the uri and ITextRenderer does the work of creating the Document for me . What s the shortest way of creating the Document from my formatted xhtml String I d prefer to use the existing Flying Saucer libs without having to import another XML parsing jar just for the sake of consistent bugs and functionality . .. . Answer : The following works : .. . .. . Previously I had tried .. . .. . but that fails as it attempts to download the HTML docType from http : www.w3.org which returns 503 s for the java libs . Comment : This is exactly what I was looking for thanks .", "Question : I m using flying-saucer xhtmlrenderer for building pdf documents . Everything worked fine until now - now we should generate arabic text inside pdf . Xhtmlrenderer is rendering Arabic text in reverse order . I ve read somewhere on internet maybe on their own site that xhtmlrenderer does not support bidi rtl . But IText itself contains examples to work with arabic and hebrew via ColumnText and PdfPTable sources can be found here : http : sourceforge.net projects itextpdf files Examples examples-155 examples-155.zip download - arabic hebrew.java and those work fine . I tried to use itext api in xhtmlrenderer s ReplacedElementFactory ITextReplacedElement but could not find good examples for positioning elements . Does anyone tried to do this Or maybe there is a simplier or at least working solution Comment : if someone is interesting in topic here is link for google group on this : groups.google.com group flying-saucer-users browse thread http : groups.google.com group flying-saucer-users browse thread thread 9f409fb987e943a2 .. . Answer : Finally I m able to print arabic text in rtl ltr using flying-saucer . In my code I m giving width and alignment for every arabic text block but in general it works fine . Code is large to print it down here so ask if anyone is interested", "Question : I m using flying-saucer xhtmlrenderer for building pdf documents . Everything worked fine until now - now we should generate arabic text inside pdf . Xhtmlrenderer is rendering Arabic text in reverse order . I ve read somewhere on internet maybe on their own site that xhtmlrenderer does not support bidi rtl . But IText itself contains examples to work with arabic and hebrew via ColumnText and PdfPTable sources can be found here : http : sourceforge.net projects itextpdf files Examples examples-155 examples-155.zip download - arabic hebrew.java and those work fine . I tried to use itext api in xhtmlrenderer s ReplacedElementFactory ITextReplacedElement but could not find good examples for positioning elements . Does anyone tried to do this Or maybe there is a simplier or at least working solution Comment : if someone is interesting in topic here is link for google group on this : groups.google.com group flying-saucer-users browse thread http : groups.google.com group flying-saucer-users browse thread thread 9f409fb987e943a2 .. . Answer : I listed my source in googlegroups : .. . .. . http : groups.google.com group flying-saucer-users msg 3cf648841eecfbf8", "Question : What are some situations that you would use XHTMLRenderer flying-saucer over JTextPane with a HTMLDocument and vice versa Is it mostly a matter of preference or are there certain cases that one is a more natural choice .. . Answer : An HTMLDocument http : download.oracle.com javase 6 docs api javax swing text html HTMLDocument.html is part of the standard Java library but it is limited to HTML 3.2 http : www.w3.org TR REC-html32 . In contrast Flying Saucer https : xhtmlrenderer.dev.java.net feature-list.html is an external dependency but it includes Strong support for the CSS 2.1 specification .", "Question : I was wondering what steps were needed to render Asian characters using the java based xhtmlrenderer flying-saucer library I am wanting to render the following : .. . .. . Without any font settings being added to the HTML this renders fine in normal browsers but I can t find anyway to render this to PDF using the iTextRenderer portion of xhtmlrenderer . After following various threads on the mailing list I see lots of posts talking about adding .TTF files from the c : windows fonts directory and I have modified the examples to run on linux https : gist.github.com 643173745182c9becc57 which shows me various fonts being displayed but I don t see any Asian glyffs . Does anyone have any decent pointers or clean solutions to this problem Or am I looking at the wrong problem with a really simple solution elsewhere Comment : I ve never used Flying Saucer so I m not replying as an answer but usually this kind of thing involves adding fonts to the renderer . Browsers are usually smart enough to detect it but most of these libraries don t bother trying to find a suitable font . BIRT for example is terrible at this . Comment : Thanks - I m discovering this as well have since found even more example flying-saucer code showing the browser component displaying the glyffs on screen but which still fail to render on PDF using iText . .. . Answer : You can also add the font style information in css .", "Question : I read in this bugfix description http : java.net jira browse XHTMLRENDERER-168 that xhtmlrenderer should support the orphans and widows properties of CSS3 since Version R5 . Using R8 it seems not to work . But it looks like this : .. . .. . Wrong paragraph breaking http : i.stack.imgur.com BRJve.png .. . .. . The paragraph a div block element is broken into two pieces although it must not . Any ideas or experience with this Thanks .. . Answer : It is a bug in the Flying Saucer xhtmlrenderer . There is a satisfyWidowsAndOrphans function in BlockBox.java but it is called only after isNeedPageClear is called . I ve created an issue http : code.google.com p flying-saucer issues detail id 118 in the issue tracker . Note that the page-break-inside : avoid css rule works . Comment : I assume this is the answer . Thank you for the page-brake-inside hint maybe i will apply it to p in certain circumstances .", "Question : I m using Flying Saucer to generate PDF from HTML so I m using ITextRenderer if that matters . I would like to simulate something like what Webkit or Gecko put in when the image cannot be found - something like an inset outline and a little broken page image . I have determined that overriding getImageResource in the UserAgentCallback is a way to test for this condition the image in the ImageResource will be null but I can t figure out a nice way to render a placeholder at this point in the API . Is there a proper way to do this It would be nice if this happened out of the box.. . .. . Answer : You re on the right track here . You want to extend UserAgentCallback https : github.com flyingsaucerproject flyingsaucer blob master src java org xhtmlrenderer extend UserAgentCallback.java with your own custom user-agent functionality . It should perform almost the identical functionality of what the existing Flying Saucer implementation does except when an image is not found it should return the default broken page image that you want to include . If you re using the iTextRenderer there is an ITextUserAgent https : github.com flyingsaucerproject flyingsaucer blob master src java org xhtmlrenderer pdf ITextUserAgent.java class which you can extend for your own custom UserAgent . To set the UserAgent after you create the ITextRenderer use the following code .", "Question : I m using a custom truetype font in a pdf generated by flying-saucer xhtmlrenderer . and within the html being rendered i have the following for example .. . .. . but even with the b and the font-weight : bold I can t get the text to come out bold . Now i know this should work because i have a similar legacy project which uses the same font and plain old itext ie no xhtmlrenderer and it does produce pdfs with bold text via : .. . .. . can anyone explain why i can t use bold with xhtmlrenderer and maybe a way to overcome this issue thanks p . Comment : I would add +ten to this question for the sample code you ve provided because i have the same problem but what s more i have to dynamically change the doc while rendering it . I ve spent many hours going through flying saurcer code but only when i saw your snippet i realized that woring with itext directly would be much more easy . Thank you . .. . Answer : If your legacy iText code can produce a bold font then it seems likely that the TTF file does actually contain a bold variant even if Flying Saucer doesn t use it . You may be able to use the bold variant in Flying Saucer if you specify the exact name of the bold variant in your CSS stylesheet . For example : .. . .. . You should be able to find the exact name of the font by opening a PDF generated by the legacy code in Adobe Reader . Go to File -- Properties.. . -- Fonts to see a list of all the fonts in the document . There will probably be a myfont entry as well as a myfont bold entry or similar . Use the latter in your stylesheet .", "Question : I was wondering what steps were needed to render Asian characters using the java based xhtmlrenderer flying-saucer library I am wanting to render the following : .. . .. . Without any font settings being added to the HTML this renders fine in normal browsers but I can t find anyway to render this to PDF using the iTextRenderer portion of xhtmlrenderer . After following various threads on the mailing list I see lots of posts talking about adding .TTF files from the c : windows fonts directory and I have modified the examples to run on linux https : gist.github.com 643173745182c9becc57 which shows me various fonts being displayed but I don t see any Asian glyffs . Does anyone have any decent pointers or clean solutions to this problem Or am I looking at the wrong problem with a really simple solution elsewhere Comment : I ve never used Flying Saucer so I m not replying as an answer but usually this kind of thing involves adding fonts to the renderer . Browsers are usually smart enough to detect it but most of these libraries don t bother trying to find a suitable font . BIRT for example is terrible at this . Comment : Thanks - I m discovering this as well have since found even more example flying-saucer code showing the browser component displaying the glyffs on screen but which still fail to render on PDF using iText . .. . Answer : To support the big character set you need to specify a font file that has all those characters in it . Once you ve picked a font file you ll need your application to point to that file . I ve found that just putting the font files in your font s directory doesn t work . Try embedding the font too eg . This link http : www.sino.uni-heidelberg.de edv sinopc chinese 5Ffonts.htm has quite a few font files .", "Question : I m using a custom truetype font in a pdf generated by flying-saucer xhtmlrenderer . and within the html being rendered i have the following for example .. . .. . but even with the b and the font-weight : bold I can t get the text to come out bold . Now i know this should work because i have a similar legacy project which uses the same font and plain old itext ie no xhtmlrenderer and it does produce pdfs with bold text via : .. . .. . can anyone explain why i can t use bold with xhtmlrenderer and maybe a way to overcome this issue thanks p . Comment : I would add +ten to this question for the sample code you ve provided because i have the same problem but what s more i have to dynamically change the doc while rendering it . I ve spent many hours going through flying saurcer code but only when i saw your snippet i realized that woring with itext directly would be much more easy . Thank you . .. . Answer : I m no expert but if your font doesn t have a bold variant then Flying Saucer may simply not make it bold . When you programmatically make the font bold you re using a font class that could be behind the scenes making the font bolder on its own using some kind of internal mechanism . A good example of this in the real world is Photoshop : if you have a font that doesn t have a bold variety you can t make it bold but Photoshop has a simulated bold option that will go in and thicken up the symbols without really using a true bold face . A good means of diagnosing this for sure would be to switch which font you re using in Flying Saucer but keep the same document . If the new font is also not bold then the problem is less topical . If it does become bold then it is because there is no bold version of your font . Hope this helps . Comment : flying-saucer uses itext to generate the pdf . i was assuming that flying-saucer would use the same mechanism ie font.setStyle to apply the bold transform . clearly i am wrong and i don t dispute your answer in fact i agree 100 however i am looking for a solution not an explanation . my next stop is going through the flying-saucer source code however i d pay 50 rep for someone else to do this thanks anyway . Comment : i found a ttf file which supplied the bold variant and adding this solved my problem .", "Question : I am trying to implement an automatic report generation tool for my clients . I need to create reports in pdf format and i am very much comfortable in creating graphs using Jquery flot . I just need a way to get the graphs inside the pdf . I tried using flying-saucer xhtmlrenderer to capture the image of the graph but it doesn t seem to help me as the graphs being created by javascript . can xhtmlrenderer capture the elements created with javascript or is their any other tool which can capture the image of the graph .. . Answer : I ve put together a JSFiddle with an example of how to accomplish this with Flot + Html2Canvas + jsPDF . The exported PDF includes axis legend etc . : .. . .. . JS Fiddle http : jsfiddle.net jyu4v 1", "Question : I am getting a bug with Flying Saucer xhtmlrenderer where a word at the end of a line gets split across two lines eg . thinking gets split into thin king with king appearing at the beginning of the following line . This is very puzzling since the split does not seem to follow a pattern and seems to happen rarely and randomly e.g . 1 in every 20 pdfs generated . Has anyone else who has used Flying Saucer encountered a similar issue .. . Answer : Sorted . Answer available at http : abhirampal.com 2012 04 18 pdf-document-word-split-using-flying-saucerxhtml-renderer", "Question : I m using xhtmlrenderer Also known as Flying Saucer with iText to convert HTML to PDF . How would I create bookmarks with this Does someone with have a small example Thanks in advance . .. . Answer : Its correct that above approach will work . Sample example from flyingsaucer-R8-src modified for BookMarks Demonstration Comment : Hi somethings wrong with thebook marks the above example produces - bookmark1 bookmark1 bookmark2 bookmark1 bookmark2 bookmark3 - instead of just three bookmarks . Is it something to do with the for-loop Thanks .", "Question : I have a project where I want to be able to format xhtml documents into both PDF format and Docx format . I ve been using flyingsaucer to format PDF documents for some time and always had to use an older version of iText for compatibility reasons . Now that I m using docx4j I need to update iText to a more recent version or it won t work . FlyingSaucer xhtmlrenderer R8pre2 uses iText 2.0.8 .. . docx4j 2.8.0 uses iText 2.1.7 .. . .. . I can only use one iText library but whichever one I use I end up with compatibility issues for either flying-saucer or docx4j . At the moment the problem seems to come down to one particular method com.lowagie.text.pdf.BaseFont.getCharBBox which in one version takes a char parameter and in the other it takes an int parameter . I think I may have to download sources for either flyingsaucer or iText I think they re both open-source and fix this myself not something I ve done before but I think I could manage but I can imagine I m not the 1st person to run into this problem and perhaps there s another way around it or someone else has already forked one of the projects to resolve this sort of issue . .. . Answer : Disclosure : I work on the docx4j project .. . .. . docx4j 2.8.0 only uses iText because it is required by our fork of Flying Saucer https : github.com plutext flyingsaucer which does the XHTML import . In that fork I added docx related stuff and removed some stuff we didn t need . It s possible that in the future we ll offer this back to Flying Saucer - it s a matter of having the time . In the meantime I mention for completeness that you can have the real Flying Saucer and our fork on your class path at the same time since our fork is re-packaged . Back to your question FlyingSaucer proper now has the same 2.1.7 dependency https : github.com flyingsaucerproject flyingsaucer blob master flying-saucer-pdf pom.xml so if you are able to use the current sources that should address the issue you have raised . Comment : I tried using the flying-saucer fork used by docx4j but unfortunately the pdf files produced seemed to be corrupted Comment : I couldn t find a version of the flying-saucer R9 jar in any repositories online so had to download the sources from github and package them up myself . This now works perfectly which is a great relief so thank you very much", "Question : I am new to org.xhtmlrenderer.pdf.ITextRenderer and have this problem : .. . .. . The PDFs that my test servlet streams to my Downloads folder are in fact empty files . The relevant method streamAndDeleteTheClob is shown below . The first try block is definitely not a problem . The server spends a lot of time in the second try block . No exception thrown . Can anyone suggest a solution to this problem or a good approach to to debugging it Can anyone point me to essentially similar code that really works Any help would be much appreciated . .. . Answer : Using the DocumentBuilder.parse this way will try to resolve the DTD referenced in the XHTML page . It takes a really long time . The easyest way to aviod that if you are using the Flying Saucer xhtmlrenderer is to create the document this way : .. . .. . Note that you can use XMLResource.load with a Reader too . Comment : Thank you this was exactly a cause of the problem . Stumbled on it myself googled the answer everything works . Comment : do you remember what kind of times you re getting With these optimizations FS takes about 300 ms still to render a page which isn t horrible but not that great especially because the HTML is minimal", "Question : I am trying to implement an automatic report generation tool for my clients . I need to create reports in pdf format and i am very much comfortable in creating graphs using Jquery flot . I just need a way to get the graphs inside the pdf . I tried using flying-saucer xhtmlrenderer to capture the image of the graph but it doesn t seem to help me as the graphs being created by javascript . can xhtmlrenderer capture the elements created with javascript or is their any other tool which can capture the image of the graph .. . Answer : If you can do this serverside and you are on a Unix based system I would try wkhtmltopdf http : code.google.com p wkhtmltopdf . EDITS AFTER SOME TIME .. . .. . Now a days to do this serverside I would use the awesome phantomjs https : github.com ariya phantomjs blob master examples rasterize.js . I ve been using this on a flot based project for some time and it works perfectly . Comment : Works on windows too .", "Question : It took me a little more research than I would have liked to figure this out on my own so I m going to post a comprehensive answer here . It seems like the information to do this is spread across many different websites and I d like to put it in one place . This answer http : stackoverflow.com questions 8263416 generating-header-footer-with-flying-saucer-xhtmlrenderer-and-itext may be the same thing but my eyes glaze over because it s in a Java string and not in a html template . Here s the question : .. . .. . I m rendering a PDF and I want a footer at the bottom of the page that says Page n of m where n is the page number you re on and m is the total pages in the document . How do I do that .. . Answer : You could also try a slightly more succinct approach : .. . .. . You need to put this in your css style and you do not need to add an extra footer HTML element .", "Question : I m using xhtmlrenderer Also known as Flying Saucer with iText to convert HTML to PDF . How would I create bookmarks with this Does someone with have a small example Thanks in advance . .. . Answer : It seems bookmarks were added in R6 but the user guide only gives them a passing reference . with a TODO to the author to add an example later . Searching the forums I found this example http : markmail.org message cfc4bycnpri6cho6 : .. . .. . So it seems that adding bookmarks is no more than declaring the bookmarks in the head and referencing them as anchors in the body . This should work will with your existing XHTML- PDF conversion without requiring any code changes . Comment : Thanks but I don t want a header or footer on the first page and want it to begin counting from the second page . How would I alter your example to do this Thanks . Comment : Sorry I don t understand . Can you tell me how the header footer is connected with bookmarks Comment : Hi ignore that last question I got it working thanks . Comment : Good to hear you got it working ." ] }
[ "yes-answer-long", "yes-answer-short" ]
itext
UNK_RELATION
cloudify@python@87
cloudify -- cloudify is a pure-play open-source cloud orchestration platform built-in @placeholder and a tosca-based yaml dsl that enables the plugging in of any cloud or toolset .
{ "confidence": [ 62.72761535644531, 59.81060028076172, 54.29831314086914, 51.33433532714844, 47.64557647705078, 47.600650787353516, 46.08477783203125, 45.85862731933594, 44.369136810302734, 42.676841735839844, 42.676841735839844, 42.676841735839844, 42.396018981933594, 40.444801330566406, 39.635868072509766, 37.427284240722656, 37.427284240722656, 35.7685661315918, 25.045520782470703, 19.789806365966797, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 19.066255569458008, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 17.279308319091797, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453, 13.816699981689453 ], "content": [ "Cloudify JVM parameters are configured using the cloud driver configuration file .", "1 Create 2 Cloudify Managers in each of them set a persistencePath property in the cloud configuration file .. . .. . 2 Create 2 Cloudify Managers without setting a persistencePath property in the cloud configuration file .. . .. . 3 Create 1 Cloudify Manager with a persistencePath property in the cloud configuration file .. . .. . Could I execute by means of a bash script into the Cloudify Manager the Cloudify command that saves the state of the deployed applications I mean the command that corresponds to the shutdown-managers using a cron-task", "We are using Cloudify 3.1 .", "I am using Cloudify 2.7 with OpenStack Icehouse .", "I m using Cloudify 2.7 with OpenStack Icehouse for a production environment .", "BTW you may want to check out Cloudify 3 as Cloudify 2.X is nearing End of Life .", "Unfortunately I can t moving to Cloudify 3 .", "I m trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection .", "Please consider that Cloudify 2.x has reached end of life - you should consider moving to Cloudify 3 : http : getcloudify.org guide 3.1 quickstart.html", "I would like know if it exists a documentation about the tuning of Cloudify JVM parameters .", "Option 1 is a bad one and not supported note that Cloudify 2.7 is not supported AT ALL - it has reached end of life .", "You have asked a lot of cloudify questions but have not closed them either accepting answers or stating the problem with the answers .", "I can t arrive to use an axternal script for startDetection in Cloudify 2.7.1 .", "Scenario .. . .. . Cloudify 2.7 application running a tomcat service instance .. . .. . Goal .. . .. . I would like to stop shut off and start the VM hosting tomcat using OpenStack APIs without Cloudify re-installs the tomcat recipe .", "I would like to have High Availability of Cloudify Manager so that the state of the deployed applications can be saved and restored in case of problems .", "That is the correct behavior of the default tomcat service provided with Cloudify 2.7 - after a restart the tomcat files are re-downloaded and deployed locally .", "Added some more notes to my answer - and again you should probably consider moving to Cloudify 3 .", "Have a look at the following files : .. . .. . https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat init.groovy https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat install.groovy .. . .. . These are probably the files you will need to edit to achieve what you are looking for .", "The snippet below is from Ref https : groups.google.com d msg cloudify-users mEAI9x9ivXQ 39Rg6KgKP4cJ .. . .. . They are indeed not exposed as environment-variables but are readily available as inputs by placing them in the top level inputs instead of the nested env.process and then doing something like .. . .. . from cloudify.state import ctx parameters as inputs .. . .. . afterward you can access these like this .. . .. . inputs in this case is just a sugared dict that allows top level key attribute-like access to the operation inputs you could just as well do inputs LOAD BALANCER IP ctx.logger.info inputs.LOAD BALANCER IP .. . .. . Wish this was explicitly stated in the docs . .", "When I execute the command : .. . .. . cfy bootstrap --install-plugins -p path to manager blueprint file -i path to inputs yaml file .. . .. . I receive the following error : .. . .. . raise exceptions.SslCertificateValidationError reason e SslCertificateValidationError : SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed 2016-01-29 09 : 50 : 58 CFY external network 5bbde.creation Task failed neutron plugin.network.creation validation - SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed attempt 1 6 .. . .. . What should I do to solve the problem", "For example how should I configure correctly the gs.properties file into the config directory", "Does it exist other files I should configure", "Thanks", "There are advanced settings to tweak both memory and port settings .", "These are available here : http : getcloudify.org guide 2.7 bootstrapping advanced cloud driver usage.html .. . .. . For instance :", "Which of the following solutions is the correct", "Both 2 and 3 are good options .", "2 gives you High-Availability 3 gives you manager recovery .", "There is no command that saves the state of the manager - state is saved every time there is a change and persisted to the persistencePath directory", "I am trying to pass blueprints inputs as environment-variables to a python script executed by script plugin during one of the lifecycle operations of a node .", "My blueprint looks like below trimmed it to show the required sections : .. . .. . and in my python script installer.py I am trying to access SQL USERNAME using os.environ.get SQL USERNAME DEFAULT .", "But I am always getting the default-value even when I pass a custom value via inputs during deploy .. . .. . What should I change to be able to access the input parameters as environment vairables from the inputs section of the blueprint in the script", "After spending almost 24 hours found out that if the script is a python script and eval script is not set to false in the Process configuration options the environment-variables are not injected atleast for v 3.1 .", "Thanks to Dan Kilman .", "It seems that you have a problem with the keystone SSL certificate .", "You should either import the certificate to your CLI machine .", "Or you could try before bootstrap to run :", "I solved inserting into the dsl definition of the OpenStack blueprint : .. . .. . the following statement : .. . .. . so that the final result was :", "What I tried to do .. . .. . I tried to use the Maintenance Mode following this http : getcloudify.org guide 2.7 developing maintenance mode.html guide : .. . .. . Setting a service instance to maintenance mode will disable host machine failure detection for that specific service instance .", "This means that during the specified time period a failure or a restart of a service instance host machine will NOT result in a provisioning of a new machine and service instance .", "So I have executed the following commands : .. . .. . After that what I saw in the Cloudify s Orchestraotor logs was the re-installation process of the tomcat service .", "In other words the tomcat VM now hosts tow tomcat Processing Units .", "Can someone suggest to me what should I do in order to reach my goal", "If you want a different behavior you may want to tweak the tomcat recipe to save the tomcat files in a different location the default installation saves all files in a per instance work directory which will be replaced after a reboot .", "You can change the recipe to look for an existing installation and use it if it exists .", "Note how catalina base is set as a context property and that AntBuilder is used to download the tomcat installation and save it to a shared location .", "These are the files you will need to change .", "Thank you Barak .", "How can I change the recipe to look for an existing installation and use it if it exists", "Should I verify if the root gigaspaces work processing-units is not empty", "I try : .. . .. . and the result is : .. . .. . before the real end of the start script .", "And I try : .. . .. . and the result before the end of the start script is : .. . .. . and the result after the end of the start script is : .. . .. . In both case it doesn t work .", "I can only use the startDetection in closure like that : .. . .. . like the stopDetection .", "Someone know why", "The log entries you copied above seem ok . With start detection if you use an external lifecycle script all you can do is pass a process return code which indicates pass fail .", "A zero return code indicates the test passed - start detection completed successfully .", "A non-zero value means the test did not pass .", "In your question when the start script completed successfully you get this : Process liveness test passed .. . .. . So the script finished correctly start detection passed .", "What is it exactly that doesn t work", "Thank you for your quick answer Barak .", "I thought the logs showed an error due to : SEVERE Event lifecycle external process exited with abnormal status code : 255 SEVERE Event lifecycle external process failed : .. .", "SEVERE Failed to execute entry : startDetection.groovy Caused by : org.cloudifysource.usm.USMException : Event lifecycle external process exited with abnormal status code : 255 .. . unexpected operator startDetection.groovy .. .", "Yeah the log severity is misleading here .", "But the operation seems to work correctly ." ] }
{ "confidence": [ 80.42171478271484, 74.84310913085938, 55.43010711669922, 52.20097732543945, 52.20097732543945, 47.009220123291016, 45.488914489746094 ], "content": [ "Question : I m using Cloudify 2.7 with OpenStack Icehouse for a production environment . I would like to have High Availability of Cloudify Manager so that the state of the deployed applications can be saved and restored in case of problems . Which of the following solutions is the correct 1 Create 2 Cloudify Managers in each of them set a persistencePath property in the cloud configuration file .. . .. . 2 Create 2 Cloudify Managers without setting a persistencePath property in the cloud configuration file .. . .. . 3 Create 1 Cloudify Manager with a persistencePath property in the cloud configuration file .. . .. . Could I execute by means of a bash script into the Cloudify Manager the Cloudify command that saves the state of the deployed applications I mean the command that corresponds to the shutdown-managers using a cron-task Thanks .. . Answer : Option 1 is a bad one and not supported note that Cloudify 2.7 is not supported AT ALL - it has reached end of life . Both 2 and 3 are good options . 2 gives you High-Availability 3 gives you manager recovery . There is no command that saves the state of the manager - state is saved every time there is a change and persisted to the persistencePath directory Comment : You have asked a lot of cloudify questions but have not closed them either accepting answers or stating the problem with the answers .", "Question : I am using Cloudify 2.7 with OpenStack Icehouse . I would like know if it exists a documentation about the tuning of Cloudify JVM parameters . For example how should I configure correctly the gs.properties file into the config directory Does it exist other files I should configure Thanks .. . Answer : Cloudify JVM parameters are configured using the cloud driver configuration file . There are advanced settings to tweak both memory and port settings . These are available here : http : getcloudify.org guide 2.7 bootstrapping advanced cloud driver usage.html .. . .. . For instance :", "Question : Scenario .. . .. . Cloudify 2.7 application running a tomcat service instance .. . .. . Goal .. . .. . I would like to stop shut off and start the VM hosting tomcat using OpenStack APIs without Cloudify re-installs the tomcat recipe . What I tried to do .. . .. . I tried to use the Maintenance Mode following this http : getcloudify.org guide 2.7 developing maintenance mode.html guide : .. . .. . Setting a service instance to maintenance mode will disable host machine failure detection for that specific service instance . This means that during the specified time period a failure or a restart of a service instance host machine will NOT result in a provisioning of a new machine and service instance . So I have executed the following commands : .. . .. . After that what I saw in the Cloudify s Orchestraotor logs was the re-installation process of the tomcat service . In other words the tomcat VM now hosts tow tomcat Processing Units . Can someone suggest to me what should I do in order to reach my goal .. . Answer : That is the correct behavior of the default tomcat service provided with Cloudify 2.7 - after a restart the tomcat files are re-downloaded and deployed locally . If you want a different behavior you may want to tweak the tomcat recipe to save the tomcat files in a different location the default installation saves all files in a per instance work directory which will be replaced after a reboot . You can change the recipe to look for an existing installation and use it if it exists . Have a look at the following files : .. . .. . https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat init.groovy https : github.com CloudifySource cloudify-recipes blob master services tomcat tomcat install.groovy .. . .. . These are probably the files you will need to edit to achieve what you are looking for . Note how catalina base is set as a context property and that AntBuilder is used to download the tomcat installation and save it to a shared location . These are the files you will need to change . Please consider that Cloudify 2.x has reached end of life - you should consider moving to Cloudify 3 : http : getcloudify.org guide 3.1 quickstart.html Comment : Thank you Barak . How can I change the recipe to look for an existing installation and use it if it exists Should I verify if the root gigaspaces work processing-units is not empty Comment : Added some more notes to my answer - and again you should probably consider moving to Cloudify 3 . Comment : Thank you Barak . Unfortunately I can t moving to Cloudify 3 .", "Question : I m trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection . When I execute the command : .. . .. . cfy bootstrap --install-plugins -p path to manager blueprint file -i path to inputs yaml file .. . .. . I receive the following error : .. . .. . raise exceptions.SslCertificateValidationError reason e SslCertificateValidationError : SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed 2016-01-29 09 : 50 : 58 CFY external network 5bbde.creation Task failed neutron plugin.network.creation validation - SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed attempt 1 6 .. . .. . What should I do to solve the problem .. . Answer : It seems that you have a problem with the keystone SSL certificate . You should either import the certificate to your CLI machine . Or you could try before bootstrap to run :", "Question : I m trying to create a Cloudify Manager into OpenStack with Keystone using HTTPS connection . When I execute the command : .. . .. . cfy bootstrap --install-plugins -p path to manager blueprint file -i path to inputs yaml file .. . .. . I receive the following error : .. . .. . raise exceptions.SslCertificateValidationError reason e SslCertificateValidationError : SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed 2016-01-29 09 : 50 : 58 CFY external network 5bbde.creation Task failed neutron plugin.network.creation validation - SSL certificate validation has failed : Errno 1 ssl.c : 504 : error : 14090086 : SSL routines : SSL3 GET SERVER CERTIFICATE : certificate verify failed attempt 1 6 .. . .. . What should I do to solve the problem .. . Answer : I solved inserting into the dsl definition of the OpenStack blueprint : .. . .. . the following statement : .. . .. . so that the final result was :", "Question : I can t arrive to use an axternal script for startDetection in Cloudify 2.7.1 . I try : .. . .. . and the result is : .. . .. . before the real end of the start script . And I try : .. . .. . and the result before the end of the start script is : .. . .. . and the result after the end of the start script is : .. . .. . In both case it doesn t work . I can only use the startDetection in closure like that : .. . .. . like the stopDetection . Someone know why .. . Answer : The log entries you copied above seem ok . With start detection if you use an external lifecycle script all you can do is pass a process return code which indicates pass fail . A zero return code indicates the test passed - start detection completed successfully . A non-zero value means the test did not pass . In your question when the start script completed successfully you get this : Process liveness test passed .. . .. . So the script finished correctly start detection passed . What is it exactly that doesn t work Comment : Thank you for your quick answer Barak . I thought the logs showed an error due to : SEVERE Event lifecycle external process exited with abnormal status code : 255 SEVERE Event lifecycle external process failed : .. . SEVERE Failed to execute entry : startDetection.groovy Caused by : org.cloudifysource.usm.USMException : Event lifecycle external process exited with abnormal status code : 255 .. . unexpected operator startDetection.groovy .. . Comment : Yeah the log severity is misleading here . But the operation seems to work correctly . BTW you may want to check out Cloudify 3 as Cloudify 2.X is nearing End of Life .", "Question : I am trying to pass blueprints inputs as environment-variables to a python script executed by script plugin during one of the lifecycle operations of a node . We are using Cloudify 3.1 . My blueprint looks like below trimmed it to show the required sections : .. . .. . and in my python script installer.py I am trying to access SQL USERNAME using os.environ.get SQL USERNAME DEFAULT . But I am always getting the default-value even when I pass a custom value via inputs during deploy .. . .. . What should I change to be able to access the input parameters as environment vairables from the inputs section of the blueprint in the script .. . Answer : After spending almost 24 hours found out that if the script is a python script and eval script is not set to false in the Process configuration options the environment-variables are not injected atleast for v 3.1 . Thanks to Dan Kilman . The snippet below is from Ref https : groups.google.com d msg cloudify-users mEAI9x9ivXQ 39Rg6KgKP4cJ .. . .. . They are indeed not exposed as environment-variables but are readily available as inputs by placing them in the top level inputs instead of the nested env.process and then doing something like .. . .. . from cloudify.state import ctx parameters as inputs .. . .. . afterward you can access these like this .. . .. . inputs in this case is just a sugared dict that allows top level key attribute-like access to the operation inputs you could just as well do inputs LOAD BALANCER IP ctx.logger.info inputs.LOAD BALANCER IP .. . .. . Wish this was explicitly stated in the docs . ." ] }
[ "yes-answer-long", "yes-answer-short" ]
python
UNK_RELATION
localtunnel@web@58
localtunnel -- local tunnel helps you to share localhost @placeholder servers to the rest of the world .
{ "confidence": [ 39.70625305175781, 34.994384765625, 34.25495147705078, 33.36192321777344, 31.023263931274414, 29.610584259033203, 28.79742431640625, 28.79742431640625, 28.172012329101562, 27.243499755859375, 26.843875885009766, 25.533527374267578, 24.533103942871094, 24.533103942871094, 23.245342254638672, 23.183000564575195, 23.094532012939453, 21.483278274536133, 21.062435150146484, 20.89503288269043, 20.63060760498047, 18.985551834106445, 18.46324920654297, 18.441280364990234, 18.441280364990234, 18.383838653564453, 17.86703872680664, 16.36045265197754, 15.578737258911133, 15.457414627075195, 15.457414627075195, 15.075321197509766, 14.77647876739502, 14.77647876739502, 14.65207576751709, 13.723666191101074, 13.426374435424805, 13.426374435424805, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.363800048828125, 13.04063606262207, 12.326236724853516, 12.326236724853516, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 12.01369571685791, 11.80823802947998, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086, 10.395559310913086 ], "content": [ "I use http : progrium.com localtunnel to make localhost servers public in internet .", "This is fairly common when using Localtunnel .", "I m developing a Rails app on my local machine right now and I ve put it on localtunnel a number of times today .", "It turns out that LocalTunnel works a little differently to Vagrant Share .", "You should upgrade to localtunnel v2 which has much stronger uniqueness requirements and should eliminate the random traffic .", "Is someone trying to launch an attack my firing off a ton of requests to randomly-generated localtunnel URLs", "localtunnel has been down for a while now .. . .. . https : github.com progrium localtunnel issues 105 .. . https : github.com progrium localtunnel issues 98 .. . .. . Try ngrok https : ngrok.com as an atlernative", "localtunnel has been down for a while now .. . .. . https : github.com progrium localtunnel issues 105 .. . https : github.com progrium localtunnel issues 98 .. . .. . Try ngrok https : ngrok.com instead .", "There are only 6700 or so unique localtunnel URL s and people misconfigure their apps to continue to send requests even after they are done using the URL .", "Then it shows following message : - .. . .. . This localtunnel service is brought to you by Twilio .", "I followed following steps to configure localtunnel in my machine .. . .. . Downloaded Ruby Ruby Gems and generate ssh-keys for hosting localhost in public .", "I run sudo gem install localtunnel and I get the following output .", "I am trying to display an app for a client using Ngrok or LocalTunnel whatever works .", "I tried running localtunnel with this command : .. . .. . and got this error : .. . .. . Is the service down or is there something I can do to fix it", "I am using Ngrok https : ngrok.com application on my Godaddy Linux server to create a local-tunnel to my host .", "So I run this command .. . .. . localtunnel -k .ssh id rsa.pub 80 .. . .. . It ask for passphrase and I gave it .", "As per the instructions at http : progrium.com localtunnel and elsewhere : .. . .. . I get the error : .. . .. . It does not matter whether I include the key or not or try different port numbers i.e .", "I get this error when installing localtunnel : .. . .. . This is what I get when I traceroute rubygems.org : .. . .. . I have also tried installing with a few proxies as suggested at askubuntu .", "Local tunnel services like ngrock or many other services http : john-sheehan.com blog a-survey-of-the-localhost-proxying-landscape .. . Pros : No need for hand coded program and probably they would have handled many edge cases like re-connection and keeping the connection alive even though it is idle for most of the time .", "Hope this helps someone else out there .", "I m tired of using Vagrant Share to provide public urls because it keeps disconnecting so I installed localtunnel.me .. . .. . The issue I m having though is that my Apache headers are showing the local configuration which is a problem .", "I have a local Vagrant VM on which I develop apps .", "Do I have to change the location of my GET request from .get http : localhost : 3000 api to something else to make it work", "Each time I do I get a whole bunch of strange POST requests to my server .", "Some examples : .. . .. . What s going on here", "Now I am used homebrew to instal rbenv to install ruby and when i run brew doctor it says xcode is out of date but when i open up xcode and go to about it is the newest version here is my error output for sudo gem install localtunnel", "Zencoder needs to be able to access the file over the internet in order to be able to download it so localhost isn t going to work .", "SSH reverse tunnel .. . Pros : No need for any additional programming .. . Cons : As the client count increases those many ports need to be opened on the public server which could raise many security issues .", "What do you mean", "How are you accessing your app", "The link you are using to use the app. .", "Hand coded socket programming where each client connects to separate port on server via SSH tunnel .. . Pros : We ll have full control .. . Cons : I m not sure how many edge cases we may have to handle among which we might know many as of now .", "In order to make this work : .. . .. . You need need to add myproject.localtunnel.me to the ServerAlias line in the site s conf file which I had .", "But you ALSO need to add it to your Vagrant s host file : .. . .. . Not having the hosts entry caused the 504 error .", "Setup : .. . .. . Language : Java 8 .. . App Server : Tomcat 8 .. . OS : Ubuntu Linux 14.04 both public cloud hosted client servers .. . .. . To my knowledge below are the ways their pros cons to achieve this : .. . .. . 1 .", "@AndersKitson : So where have you installed the Xcode application", "@AndersKitson : You can right-click on the Xcode icon and choose Options- Show in Finder to see the install location .", "You might be able to use localtunnel.com again but my guess is the download-speed is going to be painfully slow .", "I am running my API on port 3000 and my front end on port 9000 .", "I tried running both with Ngrok but it doesn t seem to be working properly .", "Everything works locally .", "With Ngrok all my pages render but anything pulled from my database which is a lot I put everything from my MongoDB into a table on one page does not show .", "Use similar service which works : https : pagekite.net", "Any ideas", "The two projects are supposedly merging in the near future .", "Ok I am receiving the following error : .. . .. . Given URL is not allowed by the Application configuration .", ": One or more of the given URLs is not allowed by the App s settings .", "It must match the Website URL or Canvas URL or the domain must be a subdomain of one of the App s domains .", "I have set the following website with facebook-login : .. . .. .", "enter image description here http : i.stack.imgur.com 15edB.png .. . .. . I have the following script :", "When I access my app via a localtunnel.me url I need things like SERVER HTTP HOST to read myproject.localtunnel.me and not myproject.local .", "I have added my public localtunnel.me domain to my ServerAlias config for Apache and reloaded Apache .", "When I initiate lt with : .. . .. . I then get a 504 Gateway Timeout when navigating to myproject.localtunnel.me .. . .. . If I do : .. . .. . When I go to http : myproject.localtunnel.me phpinfo shows me that SERVER HTTP HOST myproject.local .", "This breaks many of my connections with other webhooks and API services because the headers don t match the URL .", "Any ideas on how to overcome this besides ngrok which seems to be more resource intensive to run .", "Just to test you may want to try pushing your code to a development server online or set Drupal to upload your files to a service such as S3 for Zencoder to access .", "You know its very difficult already :", "If they are not willing to pay maybe you should not push this service .", "Xcode 4 is not installed in Developer anymore but xcrun seems to expect it there .", "I would install the Command Line Tools first Xcode preferences - Downloads - Components .", "If that does not help call .. . .. . to explicitly set the path for xcrun .", "I have command-line tools installed already and running that command outputs xcode-select : Error : Path Applications Xcode.app is not a directory .", "well I installed it with app-store so I would assume the default applications folder .", "oh weird it installed at Volumes SANDBOX Applications now that is my partition i created and installed a different setup of my os .", "So how would I install xcode since app-store thinks its already installed but its on a different partition", "My Ruby Version was out of date I had to run rbenv install 1.9.3-p0 and than set it to the global .", "I am using Video Module in Drupal 7 and utilizing Zencoder as an option for encoding videos .", "My Apache server is running on port 80 .", "Port 80 is now accessible from http : 5557.localtunnel.com .. . .. . When I give .. . .. . as value in Postback URL of Transcoder option in Administration Configuration Media Video then the configuration is also getting saved .", "Now I upload the video in Video content-type .", "It gives the following message after node is saved .", "This video is currently being processed .", "Please wait .", "When I check my account at Zencoder it says the status as Processing .", "After some time it change the status to Fail and gives the following message : - .. . .. . We tried to download the file at .. . .. . The folder videos original has given public access .", "Please let me know where I am doing mistake or what permission or steps to perform to get the encoded file back to website .", "You can always develop your own solution or pay ngrok yourselves depending on the development rate", "In one line : How to connect multiple on-premise clients installations having private IP behind a firewall to a public cloud hosted server and able to call HTTP endpoint SSH in any of the on-premise clients setup from server .", ".. . .. . Details : We ve multi-tenant application in which we ve one live public or cluster of multiple Tomcat server which is deployed in public cloud ex : AWS .", "We also have client Tomcat server which will be deployed in client place and obviously the on-premise hosted client will have private IP and will be firewalled allowing communication on specific ports to our live server .", "We ve to support the on-premise client installations to support some functionalities of the app during client offline .", "But end user will be syncing from live server to client-server periodically .", "I need a efficient way to access private hosted client machine SSH Tomcat from public server .", "2 .", "Cons : Most of them are commercial solutions and pricing model is per node .", "We ll be having at least 500-600 client installations .", "3 .", "Websockets - Server will send push and client will callbacks the server .", "Pros : No need to open multiple ports on server .. . Cons : Only HTTP is possible SSH is not possible .. . 4 .", "Please suggest a better way to suit our requirement keeping resource efficiency and security in mind .", "The point here is that users want to access data inside the firewall from the public internet .", "If they really want this feature they can pay the ngrok fee", "People here are not from tech background .", "Beside we are trying to push a new trend here - not something they are asking .", "They don t need to understand tunneling just that accessing their data from the Internet costs 10 month .", "However I access the server through SSH and run the application but when I exit from the SSH connection the application stops running so is there way to keep Ngrok application running as a service maybe on a Linux server", ".. . .. . NOTE : I don t have root access on Godaddy server so the whatever the solution should be able to proceed as a non root user", "Run the application using nohup .", "look here for answer serverfault.com questions 311593 http : serverfault.com questions 311593 keeping-a-linux-process-running-after-i-logout.Also look askubuntu.com questions 8653 http : askubuntu.com questions 8653 how-to-keep-processes-running-after-ending-ssh-session", "@Barmar thanks nohup worked well" ] }
{ "confidence": [ 42.13200378417969, 39.07879638671875, 37.39029312133789, 34.138038635253906, 33.610877990722656, 32.42765426635742, 29.843368530273438, 29.472150802612305, 29.472150802612305, 27.224273681640625, 26.093955993652344, 20.68195915222168, 13.179079055786133 ], "content": [ "Question : I m developing a Rails app on my local machine right now and I ve put it on localtunnel a number of times today . Each time I do I get a whole bunch of strange POST requests to my server . Some examples : .. . .. . What s going on here Is someone trying to launch an attack my firing off a ton of requests to randomly-generated localtunnel URLs .. . Answer : There are only 6700 or so unique localtunnel URL s and people misconfigure their apps to continue to send requests even after they are done using the URL . This is fairly common when using Localtunnel . You should upgrade to localtunnel v2 which has much stronger uniqueness requirements and should eliminate the random traffic .", "Question : I am using Video Module in Drupal 7 and utilizing Zencoder as an option for encoding videos . I use http : progrium.com localtunnel to make localhost servers public in internet . I followed following steps to configure localtunnel in my machine .. . .. . Downloaded Ruby Ruby Gems and generate ssh-keys for hosting localhost in public . My Apache server is running on port 80 . So I run this command .. . .. . localtunnel -k .ssh id rsa.pub 80 .. . .. . It ask for passphrase and I gave it . Then it shows following message : - .. . .. . This localtunnel service is brought to you by Twilio . Port 80 is now accessible from http : 5557.localtunnel.com .. . .. . When I give .. . .. . as value in Postback URL of Transcoder option in Administration Configuration Media Video then the configuration is also getting saved . Now I upload the video in Video content-type . It gives the following message after node is saved . This video is currently being processed . Please wait . When I check my account at Zencoder it says the status as Processing . After some time it change the status to Fail and gives the following message : - .. . .. . We tried to download the file at .. . .. . The folder videos original has given public access . Please let me know where I am doing mistake or what permission or steps to perform to get the encoded file back to website . .. . Answer : Zencoder needs to be able to access the file over the internet in order to be able to download it so localhost isn t going to work . You might be able to use localtunnel.com again but my guess is the download-speed is going to be painfully slow . Just to test you may want to try pushing your code to a development server online or set Drupal to upload your files to a service such as S3 for Zencoder to access .", "Question : I have a local Vagrant VM on which I develop apps . I m tired of using Vagrant Share to provide public urls because it keeps disconnecting so I installed localtunnel.me .. . .. . The issue I m having though is that my Apache headers are showing the local configuration which is a problem . When I access my app via a localtunnel.me url I need things like SERVER HTTP HOST to read myproject.localtunnel.me and not myproject.local . I have added my public localtunnel.me domain to my ServerAlias config for Apache and reloaded Apache . When I initiate lt with : .. . .. . I then get a 504 Gateway Timeout when navigating to myproject.localtunnel.me .. . .. . If I do : .. . .. . When I go to http : myproject.localtunnel.me phpinfo shows me that SERVER HTTP HOST myproject.local . This breaks many of my connections with other webhooks and API services because the headers don t match the URL . Any ideas on how to overcome this besides ngrok which seems to be more resource intensive to run . .. . Answer : It turns out that LocalTunnel works a little differently to Vagrant Share . In order to make this work : .. . .. . You need need to add myproject.localtunnel.me to the ServerAlias line in the site s conf file which I had . But you ALSO need to add it to your Vagrant s host file : .. . .. . Not having the hosts entry caused the 504 error . Hope this helps someone else out there .", "Question : I tried running localtunnel with this command : .. . .. . and got this error : .. . .. . Is the service down or is there something I can do to fix it .. . Answer : localtunnel has been down for a while now .. . .. . https : github.com progrium localtunnel issues 105 .. . https : github.com progrium localtunnel issues 98 .. . .. . Try ngrok https : ngrok.com as an atlernative", "Question : As per the instructions at http : progrium.com localtunnel and elsewhere : .. . .. . I get the error : .. . .. . It does not matter whether I include the key or not or try different port numbers i.e . Any ideas .. . Answer : localtunnel has been down for a while now .. . .. . https : github.com progrium localtunnel issues 105 .. . https : github.com progrium localtunnel issues 98 .. . .. . Try ngrok https : ngrok.com instead . The two projects are supposedly merging in the near future .", "Question : null .. . Answer : I am trying to display an app for a client using Ngrok or LocalTunnel whatever works . I am running my API on port 3000 and my front end on port 9000 . I tried running both with Ngrok but it doesn t seem to be working properly . Everything works locally . With Ngrok all my pages render but anything pulled from my database which is a lot I put everything from my MongoDB into a table on one page does not show . Do I have to change the location of my GET request from .get http : localhost : 3000 api to something else to make it work", "Question : I run sudo gem install localtunnel and I get the following output . Now I am used homebrew to instal rbenv to install ruby and when i run brew doctor it says xcode is out of date but when i open up xcode and go to about it is the newest version here is my error output for sudo gem install localtunnel .. . Answer : My Ruby Version was out of date I had to run rbenv install 1.9.3-p0 and than set it to the global .", "Question : I tried running localtunnel with this command : .. . .. . and got this error : .. . .. . Is the service down or is there something I can do to fix it .. . Answer : Use similar service which works : https : pagekite.net", "Question : null .. . Answer : I get this error when installing localtunnel : .. . .. . This is what I get when I traceroute rubygems.org : .. . .. . I have also tried installing with a few proxies as suggested at askubuntu .", "Question : I run sudo gem install localtunnel and I get the following output . Now I am used homebrew to instal rbenv to install ruby and when i run brew doctor it says xcode is out of date but when i open up xcode and go to about it is the newest version here is my error output for sudo gem install localtunnel .. . Answer : Xcode 4 is not installed in Developer anymore but xcrun seems to expect it there . I would install the Command Line Tools first Xcode preferences - Downloads - Components . If that does not help call .. . .. . to explicitly set the path for xcrun . Comment : I have command-line tools installed already and running that command outputs xcode-select : Error : Path Applications Xcode.app is not a directory . Comment : @AndersKitson : So where have you installed the Xcode application Comment : well I installed it with app-store so I would assume the default applications folder . Comment : @AndersKitson : You can right-click on the Xcode icon and choose Options- Show in Finder to see the install location . Comment : oh weird it installed at Volumes SANDBOX Applications now that is my partition i created and installed a different setup of my os . So how would I install xcode since app-store thinks its already installed but its on a different partition", "Question : null .. . Answer : In one line : How to connect multiple on-premise clients installations having private IP behind a firewall to a public cloud hosted server and able to call HTTP endpoint SSH in any of the on-premise clients setup from server . .. . .. . Details : We ve multi-tenant application in which we ve one live public or cluster of multiple Tomcat server which is deployed in public cloud ex : AWS . We also have client Tomcat server which will be deployed in client place and obviously the on-premise hosted client will have private IP and will be firewalled allowing communication on specific ports to our live server . We ve to support the on-premise client installations to support some functionalities of the app during client offline . But end user will be syncing from live server to client-server periodically . I need a efficient way to access private hosted client machine SSH Tomcat from public server . Setup : .. . .. . Language : Java 8 .. . App Server : Tomcat 8 .. . OS : Ubuntu Linux 14.04 both public cloud hosted client servers .. . .. . To my knowledge below are the ways their pros cons to achieve this : .. . .. . 1 . SSH reverse tunnel .. . Pros : No need for any additional programming .. . Cons : As the client count increases those many ports need to be opened on the public server which could raise many security issues . 2 . Local tunnel services like ngrock or many other services http : john-sheehan.com blog a-survey-of-the-localhost-proxying-landscape .. . Pros : No need for hand coded program and probably they would have handled many edge cases like re-connection and keeping the connection alive even though it is idle for most of the time . Cons : Most of them are commercial solutions and pricing model is per node . We ll be having at least 500-600 client installations . 3 . Websockets - Server will send push and client will callbacks the server . Pros : No need to open multiple ports on server .. . Cons : Only HTTP is possible SSH is not possible .. . 4 . Hand coded socket programming where each client connects to separate port on server via SSH tunnel .. . Pros : We ll have full control .. . Cons : I m not sure how many edge cases we may have to handle among which we might know many as of now . Please suggest a better way to suit our requirement keeping resource efficiency and security in mind . Comment : The point here is that users want to access data inside the firewall from the public internet . If they really want this feature they can pay the ngrok fee Comment : People here are not from tech background . Beside we are trying to push a new trend here - not something they are asking . You know its very difficult already : Comment : They don t need to understand tunneling just that accessing their data from the Internet costs 10 month . If they are not willing to pay maybe you should not push this service . You can always develop your own solution or pay ngrok yourselves depending on the development rate", "Question : null .. . Answer : I am using Ngrok https : ngrok.com application on my Godaddy Linux server to create a local-tunnel to my host . However I access the server through SSH and run the application but when I exit from the SSH connection the application stops running so is there way to keep Ngrok application running as a service maybe on a Linux server .. . .. . NOTE : I don t have root access on Godaddy server so the whatever the solution should be able to proceed as a non root user Comment : Run the application using nohup . Comment : look here for answer serverfault.com questions 311593 http : serverfault.com questions 311593 keeping-a-linux-process-running-after-i-logout.Also look askubuntu.com questions 8653 http : askubuntu.com questions 8653 how-to-keep-processes-running-after-ending-ssh-session Comment : @Barmar thanks nohup worked well Comment : @Jayesh thanks screen is also seem to work but tmux is not installed on Godaddy shared-hosting server", "Question : null .. . Answer : Ok I am receiving the following error : .. . .. . Given URL is not allowed by the Application configuration . : One or more of the given URLs is not allowed by the App s settings . It must match the Website URL or Canvas URL or the domain must be a subdomain of one of the App s domains . I have set the following website with facebook-login : .. . .. . enter image description here http : i.stack.imgur.com 15edB.png .. . .. . I have the following script : Comment : How are you accessing your app Comment : What do you mean Comment : The link you are using to use the app. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
appframework@jquery@125
appframework -- intel app framework is a javascript library and the successor of jqmobi.it contains much functionality from @placeholder but is smaller.part of the project is a complementary library for building user interfaces app framework ui .
{ "confidence": [ 51.76771926879883, 45.74142074584961, 44.98654556274414, 43.02254867553711, 40.97903823852539, 40.08452224731445, 39.638431549072266, 38.613059997558594, 38.535377502441406, 38.06265640258789, 37.21333694458008, 37.21333694458008, 37.12142562866211, 37.11205291748047, 37.01869201660156, 36.30508041381836, 35.87333679199219, 35.667537689208984, 35.0324592590332, 34.4851188659668, 34.17812728881836, 34.17812728881836, 33.80757141113281, 33.542179107666016, 33.14126205444336, 33.0750732421875, 33.0750732421875, 33.00093078613281, 32.97343063354492, 32.97275161743164, 32.90345001220703, 32.84571838378906, 32.60736846923828, 32.60736846923828, 32.27583694458008, 32.27583694458008, 32.22013854980469, 32.21755599975586, 32.1800537109375, 32.1800537109375, 32.13654327392578, 31.96255874633789, 31.940216064453125, 31.86969757080078, 31.753036499023438, 31.753036499023438, 31.519855499267578, 31.519168853759766, 31.092086791992188, 31.075855255126953, 31.075855255126953, 30.416114807128906, 30.416114807128906, 30.416114807128906, 30.193653106689453, 30.137680053710938, 29.526596069335938, 29.23369598388672, 29.13843536376953, 29.094078063964844, 28.56268310546875, 28.065906524658203, 28.065906524658203, 28.035381317138672, 27.94397735595703, 27.807025909423828, 27.126659393310547, 27.063465118408203, 26.834514617919922, 26.834514617919922, 26.80504608154297, 26.773773193359375, 26.76082992553711, 26.713340759277344, 26.713340759277344, 26.503135681152344, 26.48287582397461, 26.400890350341797, 26.003387451171875, 25.865238189697266, 25.75985336303711, 25.74555206298828, 25.74555206298828, 25.666606903076172, 25.512474060058594, 25.512474060058594, 25.43878936767578, 24.9158935546875, 24.90948486328125, 24.90948486328125, 24.674686431884766, 24.643146514892578, 24.586776733398438, 24.450428009033203, 24.387691497802734, 24.227460861206055, 24.224040985107422, 24.156578063964844, 23.967485427856445, 23.882949829101562 ], "content": [ "i m building an ios app that is made with AppFramework Intel http : app-framework-software.intel.com and Xcode .", "I think you have an old version of Intel AppFramework http : app-framework-software.intel.com try with the latest https : github.com 01org appframework .", "I m using Intel Appframework to create android app .", "App Framework 3.0 https : github.com 01org appframework tree 3.0beta has more transitions overaly push reveal .", "I assume that JQMobi Intel AppFramework is a light version of JQuery plus a customized UI framework for mobile-devices iOS and Android .", "If MVC is needed which MVCs framework that performs better with Intel AppFramework JqMobi", "I am developing an onpage mobile-application using Intel App Framework .", "Is there a right way to delete panels that I will no longer use from a mobile app that uses Intel s App Framework UI", "This is possible in jQuery Mobile through .trigger and .create but where is this in Intel App Framework", "I m using the UI kit source code of the Intel framework UI .", "Currently I m looking at the intel app framework and xdk to do this .", "I m using angular js with Intel App framework as front end .", "The problem was in the Android App and not in the Intel s App Framework .", "The documentation of your library is not comprehensive app-framework-software.intel.com documentation.php http : app-framework-software.intel.com documentation.php and sometimes I have to search through Jquery docs .", "I have a mobile app developed using Intel s App Framework 2.0 App Framework MVC and Phonegap 3.2 .", "notice I m the author of App Framework .. . .. . App Framework jqMobi is NOT jQuery .", "If I spawn the Cordova InAppBrowser can I still make use of the Intel AppFramework or another framework jquery maybe in the game", "http : app-framework-software.intel.com 30 .. . .. . Also it s not modifying CSS .", "I created an application using intel Appframework .", "https : github.com 01org appframework blob master ui appframework.ui.js L701", "Anyone else got this one to work in the app framework", "In this case I use the Intel s App Framework .", "This question already has an answer here : .. . .. . PhoneGap - Forcing Landscape orientation questions 9801128 phonegap-forcing-landscape-orientation 4 answers .. . .. . I am building a mobile-application using Cordova and Intel app framework .", "SockJs-0.3.4 expects to be able to say .. . .. . but when running under Intel XDK s App Framework the type of the status is string .", "You can develop the main app using Intel AppFramework http : app-framework-software.intel.com and load the list of games via a REST API from web server clicking on game can open a InAppBrowser and load the Application Cached game webpage from web server .", "http : app-framework-software.intel.com documentation.php afui afui panels", "I am using intel s app framework .", "Technically not a HTML5 framework because it used javascript to create a real native app .", "So I have an app that I am trying to strip out all of the JQuery Mobile and now use Intel s App Framework .", "I m trying to use jquery-ui : s autocomplete widget in an appframework phonegap app .", "How to implement Auto Complete Text Box in App Framework Using AngularJS Auto Complete Method gives error undefined .. . .. . The following code throws an error when using AppFramework : .. . .. . Error autoComplete method is undefined", "app-framework-software.intel.com api index.html http : app-framework-software.intel.com api index.html The above is found as the API link in the top .", "The deferred object is not implemented in JQMobi Intel AppFramework", "I am having problems with the Intel AppFramework .", "Can anyone help me how to access MySQL with Intel Appframework", "This is the login script of the application that I created using the Intel AppFramework .", "I had HTML code for flip switch in Intel XDK using App Framework like above .", "Is there a trick to use google-maps in actual appframework while using the plugin library", "I m looking for a proper way to integrate app framework with angular in my app .", "I am developing an app using Intel s XDK App Framework .", ": .. . .. . I m using the appframework intel jqmobi .. . .. . I have the following scenario : .. . .. . An internal bank with a list of calls that a user opened on cell .", "I am new with App Framework I need experts suggestions can I use APP framework for Hybrid app WindowsPhone Android IOS without any panic with PhoneGap", "Is there a way to not to use a side menu on some of the panels on Intel s App Framework 2.0 UI", "The appframework kitchen sink app has a small snippet to load the af.deskopBrowser if needed :", "The problem is App Framework is not nearly as well documented as JQuery .", "deferred done fail always are not implemented in App Framework .", "I am find out the way to create Star Rating from here https : css-tricks.com star-ratings .. . .. . But when I implement by Intel App Framework 3.0 on Intel XDK it s unable to vote .", "I m developning an App framework + phonegap-build application for ios .", "I was doing this project with Jquery Mobile Framework .", "We are currently developing a hybrid app using Intel s App Framework formerly jqMobi appMobi but we have run into a problem .", "I have an Android app that is basically just a webview that loads a html page written using Intel s App Framework 2.2 .", "I found Intel s App-Framework to be light-weight and fast .", "As it turns out it is not the problem of App-Framework it is the way UIWebView is placed on the view .", "Read this https : app-framework-software.intel.com documentation.php afui afui themes", "This doesn t give me my click event : .. . .. . This does give me my click event : .. . .. . I am using intel s App framework UI as well .", "And here came strike jqMobi http : www.jqmobi.com strike now AppFramework https : app-framework-software.intel.com jqTouch http : jqtjs.com Zepto http : zeptojs.com Sencha Touch http : www.sencha.com Trigger.io https : trigger.io and others .", "I had brought in a css file from the stylebuilder here http : app-framework-software.intel.com style2.php this seems to be the root of the problem .", "How to disable the slide action to open the left side menu on in AppFramework UI", "I am making a Cordova Phonegap app using Appframework and Knockout js for front and back end .", "I thought that most of JQuery methods were implemented in App Framework .", "in a Intel-Xdk AppFramework 3 application i would like to style a card element according to the current os Theme .", "I m using AppFramework .", "This works for me on appFramework 3.0 :", "One other thing unlike jQuery Mobile and Phonegap AppFramework and Sencha Touch has their native app packaging system .", "I ve read somewhere that App Framework was JQuery rewritten from the ground up to be faster etc.. . .", "From my experience currently two best solutions as HTML5 CSS3 Android and iOS hybrid app frameworks are AppFramework and Sencha Touch .", "jqmobi appframework is very specific to order .", "I have not been able to resolve the issue of refreshing content which has been added dynamically or appended in Intel App Framework to effectively apply required CSS styles .", "Here is what i ve tried .. . .. . how can i do this in jqmobi app framework", "jQuery Mobile http : jquerymobile.com was never intended to be used only as an HTML5 CSS3 hybrid-mobile-app framework .", "I am using appframework and appui building to apk for android .", "preference name Orientation value portrait .. . .. . The PhoneGap developer app does not reflect this change so you can test by building the app and running it .", "I m looking for a solution to send a Push Message from PHP in Intels App-Framework but I can t find any good solution .", "I have an app using appmobi xdk appframework when I put in the package .. . .. . It disables the scrollinf of the page vertically on the iPhone .", "My app uses Cordova 3.5 Backbone JS JQuery and Appframework former jqMobi .", "I don t have any preferences about the graphic framework used so if an editor works only on AppFramework Ionic or another it would be ok anyway .", "I do my project with JQMobi new name is Intel s App Framework . . .. . .. . On this project i want to determine the visible active panel to startup my functions according to it .", "The card element in Intel XDK s App designer is not part of the AppFramework UI elements its a custom-element for all frameworks so you have manually add set a class and add css to match the frameworks header color : .. . .. . Checkout example css for osTheme here https : github.com 01org appframework blob master build af.ui.css and add custom css like this :", "I am new to Intel s APPFramework .. . .. . At present Side Menu is working like Push .", "Here is working example for appframework with jquery and jqueryui .", "if not then Please suggest me best UI framework with PhoneGap I used JQuery Mobile 1.4.5 but its creating many issues in", "More documentation here : http : app-framework-software.intel.com documentation.php afui afui anchors .. . .. . Here is working example : http : jsbin.com neguxo 1 edit", "Eventually I have to upgrade the Intel s App Framework to version 3 to make it work again and it seems to work for the lower Android versions too .", "Could this be relevant af.selectBox.js from app ui codebase https : github.com 01org appframework blob f638e33cc8d80912d4adcd5b219071e38da38127 plugins af.selectBox.js .. . .. . I don t care if I have to use a dirty hack I just want to fix it", "But its the app framework which is not processing the newly loaded content and does not render view contents properly .", "Can anyone please help me how I could make the app framework properly render new loaded view .", "The problem is I am using Dreamweaver to development and the autocomplete feature of it finds some methods that I am not sure that are native to App framework or from JQuery .", "Edit : The above code is from App Designer Intel XDK .. . .. . To get the value use", "The App Designer in Intel XDK allows us to easily add and remove pages to our apps .", "Is it really the best way to set the app main page or I just don t know that there are options somewhere in Intel XDK", "Yes appframework is independent of XDK it will work on inappbrowswer from webserver", "When I run app the default view gets loaded properly .However when I click on any link-to navigate to any other route the content gets loaded into .. . ng-view .But the panel is not rendered with header footer and contents properly by Intel App framework .", "I am currently developing an application for Android using AppFramework + Intel XDK AppMobi .", "Edit : I m aware that this has been asked however my question only involves getting this to work inside intel-xdk + app framework seems like i ve tried it all without any further success so figured i would reach out here in hope of anyone having the answer to this .. . .. . Thanks", "When building my app for iOS I noticed that the keyboard can crash the app under certain circumstances .", "I brought back in the default appframework-2.1.0 build css af.ui.css file and then changed the colors directly from that and now I am not having the issue .", "The framework provides a basic method Android and IPhone only .", "I just replaced the AppFramework scripts with the link-to latest CDN and tested the code :", "can you post your code or try one of these samples and check : github.com krisrak appframework-templates https : github.com krisrak appframework-templates", "So my entire app needs to be in one html file" ] }
{ "confidence": [ 59.344451904296875, 55.44961929321289, 55.2092170715332, 54.6844367980957, 45.95598602294922, 45.28192138671875, 44.612327575683594, 43.33792495727539, 43.044620513916016, 42.177894592285156, 41.26538848876953, 40.85942077636719, 40.61469268798828, 40.290042877197266, 40.0936164855957, 39.86170959472656, 39.733726501464844, 39.370155334472656, 39.370155334472656, 38.45811462402344 ], "content": [ "Question : I am new to Intel s APPFramework .. . .. . At present Side Menu is working like Push . Is there an overlay option available or need to modify the css to achieve overlay side menu .. . .. . Thanks in advance .. . Answer : Right now there is only push . App Framework 3.0 https : github.com 01org appframework tree 3.0beta has more transitions overaly push reveal . http : app-framework-software.intel.com 30 .. . .. . Also it s not modifying CSS . It uses JavaScript for animation due to Android 2.3 support . https : github.com 01org appframework blob master ui appframework.ui.js L701 Comment : Thanks for the reply . Will try it with the above provided link", "Question : I m starting an uphill journey developing a small app for my wife s speech pathology practice . We want to publish an app that contains several html5 based games that promote language development . Currently I m looking at the intel app framework and xdk to do this . We plan to start with a simple game building words for example then adding more games over time . My question is this html 5 has a cache mechanism using a manifest . If I limit the games to a single page can I store the games on a web server rather than forcing the user to download all of the content with the app at the time of install The objective here is to allow games to be added without forcing updates of the app . I anticipate several Mb of sound clips and images per game . Thanks in advance . .. . Answer : You can use HTML5 Application Caching in remote website and load it in the app using Cordova InAppBrowser http : docs.phonegap.com en 3.3.0 cordova inappbrowser inappbrowser.md.html InAppBrowser so that when you click on a game it opens a InAppBrowser and loads the game from webserver this game can have the manifest with application cache so that all content is downloaded on the device and launched . You can develop the main app using Intel AppFramework http : app-framework-software.intel.com and load the list of games via a REST API from web server clicking on game can open a InAppBrowser and load the Application Cached game webpage from web server . This can all be done in Intel XDK http : xdk.intel.com .. . .. . Details on Application Cache can be found here http : www.html5rocks.com en tutorials appcache beginner Comment : First thank you for your answer . When the user opens a game for the first time it will require a network connection correct Also after they load the game for the first time will the InAppBrower keep the content cached according to the html5 manifest caching feature indefinitely Comment : Yes I did some test it did work not sure about indefinitely you will have to try . Comment : if you don t mind just one more question.. . If I spawn the Cordova InAppBrowser can I still make use of the Intel AppFramework or another framework jquery maybe in the game That should work right as long as the game html refers to the framework on the web server . Thanks again . Comment : Yes appframework is independent of XDK it will work on inappbrowswer from webserver", "Question : My name is Putut . I am currently working on a thesis to finish my lecture . I created an application using intel Appframework . Can anyone help me how to access MySQL with Intel Appframework This is the login script of the application that I created using the Intel AppFramework . and this is my database script .. . Answer : As I can see you will need a WebService to access your Mysql database it can be implemented in PHP Python Ruby Java etc . This is a simple workflow . Your mobile app do a request to this Webservice .. . .. . The Webservice backend access Mysql e verify if the user exists .. . .. . The Webservice returns a reponse with an Success or Fail .. . .. . Your mobile app receive that response Json is prefered shows a message to the user or whatever you want . The framework provides a basic method Android and IPhone only . Take a look to this link . https : software.intel.com en-us node 493048", "Question : I ve been over this for the past entire two days . I assume that JQMobi Intel AppFramework is a light version of JQuery plus a customized UI framework for mobile-devices iOS and Android . Read a lot about JQuery Deferred methods in many websites and blogs and tried to implement some examples in a phonegap project of mine that uses JQMobi . My ajax calls are been fired correctly and success callback is successful : .. . .. . But when I try to use the deferred callback methods in the promise object returned by the ajax call I get no response from them : .. . .. . What is happening The deferred object is not implemented in JQMobi Intel AppFramework Thank you in advance . Comment : AFAIK .done etc should work - only an earlier uncaught error would block . Comment : Accordin to Ian .done is not implemented . Comment : Ah fair enough I was assuming JQMobi was a jQuery plugin derivative . I guess they leave things out to keep the code volume down . If so and if they genuinely say JQuery rewritten from the ground up .. . then the product should also carry a prominent health warning . Comment : They used this statement as marketing tool . The problem is App Framework is not nearly as well documented as JQuery . Maybe they will fix it in the upcoming months . .. . Answer : notice I m the author of App Framework .. . .. . App Framework jqMobi is NOT jQuery . It provides syntax similar to jQuery . deferred done fail always are not implemented in App Framework . Comment : Pleased to meet you Ian and thank you for your answer . I thought that most of JQuery methods were implemented in App Framework . I ve read somewhere that App Framework was JQuery rewritten from the ground up to be faster etc.. . . The problem is I am using Dreamweaver to development and the autocomplete feature of it finds some methods that I am not sure that are native to App framework or from JQuery . The documentation of your library is not comprehensive app-framework-software.intel.com documentation.php http : app-framework-software.intel.com documentation.php and sometimes I have to search through Jquery docs . Comment : app-framework-software.intel.com api index.html http : app-framework-software.intel.com api index.html The above is found as the API link in the top . As to rewritten from the ground up - it s true but also marketing speak Comment : Thank you again .", "Question : in a Intel-Xdk AppFramework 3 application i would like to style a card element according to the current os Theme . I want the Header of the card to be the same color of the header of the page how do i do card : .. . Answer : The card element in Intel XDK s App designer is not part of the AppFramework UI elements its a custom-element for all frameworks so you have manually add set a class and add css to match the frameworks header color : .. . .. . Checkout example css for osTheme here https : github.com 01org appframework blob master build af.ui.css and add custom css like this : Comment : Maybe i dont need to use a card what i need is to represent a list of data into a web app i would use a table but in phone app there no avaible space for 7 columns . I m thinking to make a 2 column table for each item firse field for name second field for value .", "Question : We are currently developing a hybrid app using Intel s App Framework formerly jqMobi appMobi but we have run into a problem . The actual problem is that when running inside an Android WebView on an actual Android device the webpage shows a rather big scrollbar . Even if there is no content on the webpage it still gives us the opportunity to scroll way down When using the browser on the Android device and visit the webpage it is not scrollable just like we want it . Our html looks like this see below ....as you can see there s nothing actual on the page I really hope someone can help us out here.. . The WebView is configured like this : .. . .. . Here is a link-to a screenshot : Screenshot https : www.fundme.nl uploads Screenshot 2014-04-04-08-26-20.png Comment : Please share how you are configuring the WebView and the layout that you are using . What Android platform versions are you trying this on Comment : I am running a Nexus 5 on Android 4.4.. . I added the WebView configuration above.. . .. . Answer : I think you have an old version of Intel AppFramework http : app-framework-software.intel.com try with the latest https : github.com 01org appframework . I do not see the issues on Android 4.4 Nexus5 . I just replaced the AppFramework scripts with the link-to latest CDN and tested the code : Comment : Thanks for testing.. . I m using a Nexus 5 on Android 4.4 also . When I startup my Android app and launch a webpage with the code you provided me I actually have the exact same problem I mentioned before . I have a black page but when I try to scroll the scrollbar appears and I seem to be able to scroll an empty page.. . Weird. .", "Question : null .. . Answer : I am currently developing an application for Android using AppFramework + Intel XDK AppMobi . As this application will involves a lot of Javascript codes some reading on the internet suggest to use MVC approach Backbone JS Intel MVC etc . Regarding to performance people that I know told me that using MVC will decrease the application performance . So can you all give me suggestion should I use MVC or keep the traditional way If MVC is needed which MVCs framework that performs better with Intel AppFramework JqMobi Thanks Comment : MVC is quite traditional too.. . though nobody can tell you which is the better approach as we don t know what your app will be . If it is quite sizeable the benefit of MVC is that it keeps things organized . There s a clear separation of concern : A controller shouldn t contain a lot of business logic nor should it render any output . Those are the tasks of the model layer and the view scripts respectively . Basically the tradeoff is : performace maintainability", "Question : i m building an ios app that is made with AppFramework Intel http : app-framework-software.intel.com and Xcode . The files html js css img are inside the app and are loaded by UiWebView . I have some forms that require the user include some values . When the input fields are pressed for some reason the keyboard is bigger than the conventional : .. . .. . Here is how the keyboard looks like and should be . enter image description here http : i.stack.imgur.com zegIZ.png http : backstagedigital.com.br stackoverflow keyboard-issue.png .. . .. . .. . Any help is welcome . Thanks .. . Answer : According to apple documentation : .. . .. . Configuring the Keyboard for Web Views .. . .. . Although the UIWebView class does not support the UITextInputTraits protocol directly you can configure some keyboard attributes for text input elements . For example you can include autocorrect and autocapitalize attributes in the definition of an input element to specify the keyboard s behaviors as shown in the following example . You can also control which type of keyboard is displayed when a user touches a text field in a web page . To display a telephone keypad an email keyboard or a URL keyboard use the tel email or url keywords for the type attribute on an input element respectively . To display a numeric keyboard set the value of the pattern attribute to 0-9 or d . .. . These keywords and the pattern attribute are part of HTML 5 and are available in iOS . The following list shows how to display each type of keyboard including the standard keyboard . You can find the complete article here https : developer.apple.com library ios documentation StringsTextFonts Conceptual TextAndWebiPhoneOS KeyboardManagement KeyboardManagement.html Comment : Thanks I figured out that uiwebview keyboard size is bigger than the conventional but adding this attributes make the app better and more useful .", "Question : I ve built a project using Jquery Mobile . JQM seems perfect for fast prototyping but the end result on an iphone 3GS IOS 5.1 is far from fluid . I ve tried a lot of hacks tricks to make it faster and got rid of transitions but still I cannot get a satisfying result . I ve been looking around . What I need is a lightweight solution with a decent UI JQM is perfect for what I need in that domain . trigger.io and AppFramework seem to be the 2 solutions which are available maybe I m missing some others . I d like to give AppFramework a go but I d like to have feedback from people who have made the change . Thank you . .. . Answer : Intro .. . .. . A larger version of this answer can also be found HERE http : www.gajotres.net switching-from-a-jquery-mobile-to-appframework . jQuery Mobile http : jquerymobile.com was never intended to be used only as an HTML5 CSS3 hybrid-mobile-app framework . On a similar track like its older brother jQuery http : jquery.com and jQuery UI http : jqueryui.com it was intended to be used as a robust responsive solution in the ever growing mobile web application market . What it took from its older brother was an all around browser support . Run it on every possible major platform and it should work just the same . That same broad browser support also brought another problem and that is platform optimization . Because jQM can t favor specific platforms also means it is not optimized to use most in any of it . Let us also talk about Phonegap http : phonegap.com a bit . While great app packaging system it becomes a hell hole when used with a larger jQuery Mobile http : jquerymobile.com application . It s like two great parents made a deformed bastard child or to large pluses gave as an even bigger minus . Solutions .. . .. . Like always in human history another groups of developers came to fill this evident hole . And here came strike jqMobi http : www.jqmobi.com strike now AppFramework https : app-framework-software.intel.com jqTouch http : jqtjs.com Zepto http : zeptojs.com Sencha Touch http : www.sencha.com Trigger.io https : trigger.io and others . Good vs .. . .. . .. . Before going any further than jQuery Mobile one thing must be understood whatever you gain in speed and trust me you will get it you will lose in community support . While every earlier mentioned framework has a sizable developer community behind them all of them combined can t even come close to jQM . With this said let us delve into specifics . From my experience currently two best solutions as HTML5 CSS3 Android and iOS hybrid app frameworks are AppFramework and Sencha Touch . First let me say they are fast faster than jQuery Mobile will ever be if jQ developers stay on this course . UI support is similar if not even better in the case of Sencha Touch not to mention UI is more native looking that it is the case with jQuery Mobile . Listviews are faster scrolling is better transitions do not stutter . .. . bad .. . .. . Before someone asks why do people then choose to use jQuery Mobile instead The obvious reason would be community support and to some extent this is the truth . But there are some other pressing matters here . While jQMoby advertise it self as a truer jQuery alternative to jQuery Mobile it is a big lie . While still a great an excellent framework they are using this saying as a marketing trick . They have indeed cloned redone them a lot of jQuery features but this is only a partial job and veteran jQuery developers are going to find them self in a problem . They will not be able to make fully the most of their previous knowledge thus spending more time trying to find how to do something that was supposed to work than working on an app . On the other hand Sencha Touch doesn t suffer from this problem because it has a different almost alien syntax . Like with jqMoby you will need a lot of time to get into its syntax . But have no fear the result will be satisfactory in the end . One other thing unlike jQuery Mobile and Phonegap AppFramework and Sencha Touch has their native app packaging system . In my humble opinion this system is better than Phonegap because they are made to work with their js frameworks . Only thing Phonegap have over them is a HUGE plugin development community . Links .. . .. . jQuery vs Zepto vs jQMobi - which one is the fastest http : www.codefessions.com 2012 08 performance-of-jquery-compatible-mobile.html utm source MoSync 20developer 20mailing 20list utm campaign 76dcada701-Aug 2012 Newsletter utm medium email .. . .. . In this case jQuery is like jQuery Mobile because test here relays on an underlying framework functionality which jQM takes from jQ . Good ranting on jQuery Mobile vs . Sencha Touch http : forum.jquery.com topic future-roadmap-for-jquery-mobile .. . .. . Title says it all . AppFramework forum http : forums.appmobi.com index.php .. . .. . Only good jqMoby support site .. . .. . Sencha Touch forum http : www.sencha.com forum forumdisplay.php 89-Sencha-Touch-2.x-Forums .. . .. . Only good Sencha Touch support site .. . .. . Conclusion .. . .. . AppFramework is probably the best choice for you . It has a similar design as jQuery Mobile so the syntax is not going to be a problem . Comment : Thank you very much for this answer . I had a look at your profile and I have seen that you ve given numerous pointers to enhance the use of JQM . I m going to try each point you raised for a last JQM attempt . Comment : I had tried sencha-touch on mac . First : installation sencha console make my folder dirty . Test speed on Android slow and buggy . For speed and small app i prefer use jQuery Mobile . Comment : Better late then never : Very good answer One more little tip though : If you go Appmobi on a large complicated project like I did definitely use the one with jQuery . It is only a fraction slower really not noticeable but you get all the jQuery functions . I still have pain in my ass for not using the jQuery one it wasn t there when I started . Comment : You mention if jQ developers stay on this course . By looking at jQM s roadmap isn t it true that the coming versions will be all about removing clutter and making things faster Comment : 1.4 already started with removing and it s a lot faster then 1.3 1.5 will go same way plus they will add some new stuff .", "Question : I have a mobile app developed using Intel s App Framework 2.0 App Framework MVC and Phonegap 3.2 . When I tap on a link MVC executes an action where I use the .ui.loadContent function to show the next panel but it doesn t seem to work properly on Android 2.3.7 because it only displays the mask that shows a Loading Content message but the panel is not displayed . What could be the cause of this behavior and how can I solve it in order to show another panel .. . Answer : Seems that the issue is not related to the .ui.loadContent function but to the routing . In some earlier versions of Android and Google Chrome when the link is put like this : .. . .. . The webview browser tries to open a local file file : path to app mycontroller myaction param1 and AppFramework is not able to handle the route and execute the related action . An ugly but useful solution is to execute javascript to invoke the action : .. . .. . A more elegant but heavier solution in terms of performance could be to rewrite all the routes of the links to invoke the javascript function on init .", "Question : I am having problems with the Intel AppFramework . I can not seem to get the sidemenu working . It is working fine on the demo you can download from the AppFramework website but no matter how well I am trying to mimic it - I can t get the sidemenu to work on my project . Everything is working fine until I add tags as that is how you make a sidemenu . When those tags are added the whole app will render blank white and an error pops up into console saying Uncaught TypeError : Cannot read property hideScrollbars of undefined . It has something to do with appframework.ui.js line 1100 that says this.scrollingDivs.menu scroller.hideScrollbars .. . .. . So it seems like this menu scroller is undefined for some reason . This is as much code as I can give you it is the index.html of my AppFramework Phonegap app : http : pastebin.com dXtTeiKx .. . .. . Console does not say about any missing files except cordova.js which is fine because PC nor does it throw any other JavaScript errors other than the one I told you so I would assume there is no need for me to post the code in every other file . I have tried the tags with AppFramework version 3.0 . I have also tried switching the JavaScript includes around a bit including appframework.ui before appframework and putting some includes to the bottom of the index.html but none if these have resolved the issue so far . I also tried removing all excess css and js includes but that did not work either . This has lead me to believe there is some kind of bug within the AppFramework itself or I am just doing something horribly wrong or have overseen something . Here is the documentation for the AppFrameworks sidemenu : http : app-framework-software.intel.com documentation.php afui afui side and as you can see it should not require anything else than including that nav thing to the source hell I even tried copying the whole .. . .. . nav id leftMenu class view header h1 Left Menu h1 header div class pages div class panel active This is the left menu div div nav .. . .. . ...but that changed nothing . Comment : Your code example is highly not useful . If you expect people to make a sincere effort in troubleshooting your bug at least put up a live example where the error is reproduced . Comment : I don t expect anyone to fire up their development-environment and fix my problems . I am hoping that someone else has had this same problem before and would be able to help me . Comment : basically no matter how good a developer is they can t parse your code in their head and output it . It s likely few people have had this problem since this is a relatively unknown framework so your best hope is that pro developers will be willing to play around with your demo out of boredom desire for bounty points . I am just trying to help you Comment : I have solved the issue . If you are interested you can check my answer . : If you could be so kind and revert your downvote from my question so that people with the same problem can find this easier in the future - if you did downvote that is . .. . Answer : So I have successfully resolved the issue by myself . I don t know what kind of wizardry AppFramework does on the background but the issue that caused the nav not work for me was that I had a panel defined like so : .. . .. . The nav was correctly defined like so : .. . .. . The problem was with the panel like I said as you can see it has an id of menu - this is what broke the nav . Menu as an id for a panel is most likely a preserved word or something so it should not be used . I am suggesting that if you use AppFramework you should prefix everything especially panels with something like so : .. . .. . Here I prefixed the main panel with f prefix there is main as well but that s just extra so it tells about the panel more . So in short .. . .. . Prefix your panel ids and do not give any of them an id of main or menu . Use something like x main and x menu instead .", "Question : I found Intel s App-Framework to be light-weight and fast . However I am facing a problem that I just can t seems to overcome . In the framework one can display a navbar that stick to the bottom of the screen . This work fine on the browser WebView in Android and UIWebView in IOS - except on iPhone with 3.5 screen - the navbar just didn t show up . It appears that the screen is too short to show it . I have tried playing with viewport meta tag by setting various height and disabling changing OS theme . Nothing works . Anyone has experience on this How do I adjust the navbar position Comment : can you post your code or try one of these samples and check : github.com krisrak appframework-templates https : github.com krisrak appframework-templates Comment : Thanks for the templates I ll give them a try and post my codes later . .. . Answer : As it turns out it is not the problem of App-Framework it is the way UIWebView is placed on the view . After correctly setting UIWebView s top and bottom constraints I am able to see the navbar correctly set at the bottom of the screen .", "Question : I recently 4 days stumbled upon Intel XDK to develop hybrid html5-apps and it looks very promising and powerful . I wanted for learning purposes to design a simple application a single view application with some buttons a list and a swipe menu using one of the XDK integrated UI frameworks like JQuery mobile or AppFramework 3 . To achieve my goal I started a new project using AppDesigner and I followed the official Intel XDK video tutorials . However those tutorials refer to an older version of AppDesigner and some things now are missing different in the current version 2727 . I also encountered many different problems button groups with different buttons size misplaced elements apparently random behaviours crashes.. . to the point that I can t use it even for simple tasks like putting something different than a title on a footer . So I came up with 2 alternatives : .. . .. . 1- AppDesigner right now is bugged like hell . In this case are there any FREE WYSIWYG editors that target mobiles and offer the same feeling and functionalities of AppDesigner drag drop functionalities preview on an emulated phone etc . I don t have any preferences about the graphic framework used so if an editor works only on AppFramework Ionic or another it would be ok anyway . OFFLINE editors are prefered . It would be fine even if someone finds a link-to older versions of XDK so I can use the same used in the tutorials . 2- I failed to understand how AppDesigner works . As said however the official video tutorials are outdated . So is there a more recent guide video tutorials are prefered but a book guide would be fine anyway that targets a more recent version of AppDesigner and covers almost every basic functionality Many thanks .. . Answer : MastErAldo - Well stated . I am on the Intel XDK team . You have raised valid concerns . We will have new App Designer videos available soon . The ones available now as you pointed out are 2 years old . With a 6-8 week release schedule there have been a lot of changes in that time . If you opted in to receive information when you registered you should have received an invitation this week to two short live webinars later this month which are specifically about App Designer where you can listen to and ask questions of one of our most knowledgeable App Designer developers . In the future to ensure we see your feedback please post on our forum : https : software.intel.com en-us forums intel-xdk .. . .. . Thanks for letting us know of your concerns . It helps mold our product when we know which features our users are concerned about and what issues you are having . Pamela Comment : Thank you unfortunately I haven t enrolled in for newsletters when I registered however I just set my account to receive news . Is there a way to receive an invitation for the live webinars Comment : If you give me your email-address I can pass it on to our marketing folks to get you an invitation . Comment : Let me know if you do not receive the invitation by Monday . Comment : I received the mail this morning . Thanks again", "Question : I have a mobile app developed using Intel s App Framework 2.0 App Framework MVC and Phonegap 3.2 . When I tap on a link MVC executes an action where I use the .ui.loadContent function to show the next panel but it doesn t seem to work properly on Android 2.3.7 because it only displays the mask that shows a Loading Content message but the panel is not displayed . What could be the cause of this behavior and how can I solve it in order to show another panel .. . Answer : I ve said this many times and many times it is the issue . jqmobi appframework is very specific to order . If something is not called in the right order css js functions it will budge on some platforms . Not a clue why specifically but it seems to be it every time . Try and reordering every script and function to match the example . More then once that worked for me .", "Question : I have an app and can t get the footer to go away . I can remove all the content from it but there is still space that isn t being used by the content . Also for some reason the side panel is leaving artifacts . Anybody ever have to deal with this . At first I thought this was an android rendering problem but it shows up in Chrome as well.. . enter image description here http : i.stack.imgur.com stguy.png .. . Answer : I had brought in a css file from the stylebuilder here http : app-framework-software.intel.com style2.php this seems to be the root of the problem . I brought back in the default appframework-2.1.0 build css af.ui.css file and then changed the colors directly from that and now I am not having the issue .", "Question : I m new to HTML5 webapp . I m using the UI kit source code of the Intel framework UI . Everything works fine but I m not getting any colour in my app . When I run that files in browser it runs fine . But in both the emulator and the device it s going black all background . I have tried to remove some CSS parts and getting somewhere some colors - but not all . I have tried and removed afui .header to header . It s showing some color but not in all of it . .. . Answer : To disable custom operating-system themes set .afui.useOSThemes to false . Read this https : app-framework-software.intel.com documentation.php afui afui themes", "Question : This question already has an answer here : .. . .. . PhoneGap - Forcing Landscape orientation questions 9801128 phonegap-forcing-landscape-orientation 4 answers .. . .. . I am building a mobile-application using Cordova and Intel app framework . I try to set the orientation to portrait mode .. . .. . But when I check the build by installing the APK in Android 4.4 it doesnt work . It always rotate in both modes . Any suggestions .. . Answer : If you are using Cordova PhoneGap you need to change the Orientation to portrait normally it is default in the config.xml file in the app folder or www folder . preference name Orientation value portrait .. . .. . The PhoneGap developer app does not reflect this change so you can test by building the app and running it .", "Question : This question already has an answer here : .. . .. . PhoneGap - Forcing Landscape orientation questions 9801128 phonegap-forcing-landscape-orientation 4 answers .. . .. . I am building a mobile-application using Cordova and Intel app framework . I try to set the orientation to portrait mode .. . .. . But when I check the build by installing the APK in Android 4.4 it doesnt work . It always rotate in both modes . Any suggestions .. . Answer : Add this to your config.xml : .. . .. . this works for all devices .", "Question : This question already has an answer here : .. . .. . PhoneGap - Forcing Landscape orientation questions 9801128 phonegap-forcing-landscape-orientation 4 answers .. . .. . I am building a mobile-application using Cordova and Intel app framework . I try to set the orientation to portrait mode .. . .. . But when I check the build by installing the APK in Android 4.4 it doesnt work . It always rotate in both modes . Any suggestions .. . Answer : this style works", "Question : How to implement Auto Complete Text Box in App Framework Using AngularJS Auto Complete Method gives error undefined .. . .. . The following code throws an error when using AppFramework : .. . .. . Error autoComplete method is undefined Comment : Please tell us what you have tried before or some more information that can be added to your question Comment : The below code worked well in Web Application but in Mobile Application using AppFramework gives the Error autoComplete method is undefined code scope.complete function console.log scope.availableTags tags .autocomplete source : scope.availableTags code Comment : in the future please edit the question to include relevant code or error messages rather than using comments . Code blocks posted in comments lose their formatting and become difficult to interpret . Comment : based on the code you provided it appears as though you are trying to mix angular and jquery which isn t the best approach . .. . Answer : You can use ng-autocomplete . I have provided a simple example as follows : .. . .. . You can also use Angucomplete . Find it here : http : ghiden.github.io angucomplete-alt" ] }
[ "yes-answer-long", "yes-answer-short" ]
jquery
UNK_RELATION
parparvm@ios@39
parparvm -- meant to tag codename one @placeholder vm low-level issues capabilities and usage of parparvm that isn t necessarily related to codename one .
{ "confidence": [ 64.71996307373047, 63.418067932128906, 59.50994110107422, 47.62029266357422, 46.006195068359375, 45.36040496826172, 45.36040496826172, 44.17938995361328, 44.17938995361328, 42.07843017578125, 41.3779411315918, 40.509639739990234, 40.21345520019531, 38.27763366699219, 37.260108947753906, 36.83170700073242, 36.787742614746094, 36.787742614746094, 36.787742614746094, 35.483360290527344, 33.54972839355469, 33.54972839355469, 33.20501708984375, 33.20501708984375, 31.980941772460938, 29.923038482666016, 29.923038482666016, 29.923038482666016, 29.923038482666016, 28.354251861572266, 21.088272094726562, 20.615909576416016, 19.41909408569336, 19.406536102294922, 18.891300201416016, 18.51841926574707, 17.712051391601562, 17.630800247192383, 17.53363800048828, 17.33393096923828, 17.013036727905273, 17.013036727905273, 16.601512908935547, 16.426748275756836, 15.444250106811523, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.92928695678711, 14.05215072631836, 11.647310256958008, 11.647310256958008, 11.647310256958008, 11.647310256958008, 11.647310256958008, 11.647310256958008, 11.647310256958008, 11.647310256958008, 11.647310256958008 ], "content": [ "On iOS Codename One built open sourced ParparVM https : github.com codenameone CodenameOne tree master vm which is a very conservative VM .", "At this time Codename One is re-evaluating this backend and is considering a move either to ParparVM or to ikvm for this backend .", "The reasoning is simple since Codename One has multiple VM implementations iOS Dalvik ART XMLVM ParparVM https : github.com codenameone CodenameOne tree master vm blackberry etc .", "The core technologies behind Codename One are all open-source including most of the stuff developed by Codename One itself e.g .", "Codename one took very balanced approach to portability .", "You can learn more in this answer : How does Codename One work", "http : stackoverflow.com questions 10639766 how-codename-one-works", "In the past Codename One used XMLVM http : xmlvm.org to generate native-code in a very similar way but the XMLVM solution was too generic for the needs of Codename One .", "You can learn more about using the Codename One sources here https : www.codenameone.com blog how-to-use-the-codename-one-sources.html .", "FYI Shai Almog the author of this answer is the CEO of Codename One .", "Codename One translates all the code to native-code or the native VM resulting in performance that matches or exceeds the performance of native-code .", "Unlike RoboVM Codename One is a true Write Once Run Anywhere solution .", "ParparVM https : github.com codenameone CodenameOne tree master vm features a concurrent non-blocking GC and it is written entirely in Java C .", "with recent 64bit and bitcode changes to iOS builds ParparVM needed no modifications to comply with those changes .", "They don t mention that Xamarin compiles down to native-code on iOS in contrast to the Codename VM described above .", "I got several build errors on my very new Codename One application : .. . .. . The build complains on the FileNotfoundException class and the String split method .", "Codename One https : www.codenameone.com uses a SaaS based approach so this might and probably will-change in the future to accommodate improved architectures .", "Codename One achieves fast performance by drawing using the native gaming API s of most platforms e.g .", "There is no evaluation phase for Codename One our intention is to always have a reasonable free option for developers no strings attached .", "ParparVM https : github.com codenameone CodenameOne tree master vm but also the full library platform ports designer tool http : github.com codenameone CodenameOne device skins https : github.com codenameone codenameone-skins etc .", "For desktop builds Codename One uses javafxpackager since both Macs and Windows machines are available in the cloud the platform specific nature of javafxpackager is not a problem .", "You can learn more about this in this blog post https : www.codenameone.com blog understanding-peer-native-components-why-codename-one-is-so-portable.html .", "Codename One https : www.codenameone.com supports a subset of Java 8 https : www.codenameone.com blog java-8-support.html now although string.split is still a problematic API call .", "Codename One supports a subset of Java 5 you shouldn t try and change that since the server translation code relies on bytecode behaviors of the target Java 5 and only supports a very specific subset of the API .", "I have to evaluate Codename One but I couldn t find infos about how the deployment works under the hood and what the end result actually is .", "I m prospecting alternatives to develop for multiple mobile platforms and have found Codename One http : www.codenameone.com that uses Java as lingua franca instead of HTML CSS JS or scripting languages .", "Preemptive strike : this is a question about Codename One not about which cross-platform should I choose or if I should go native or if I should go web .", "Notice that Codename One also provides an option to install its build servers in house https : www.codenameone.com corporate-server.html which means corporations that have policies forbidding such cloud architectures can install the cloud portion on premise .", "What makes Codename One stand out is the approach it takes to UI where it uses a lightweight architecture to allow the UI to work seamlessly across all platforms and be developed almost entirely in Java .", "You can see my answer here http : stackoverflow.com questions 10639766 how-codename-one-works 10646336 10646336 for additional details but the gist of it is that we are somewhat different than RoboVM .", "Compared to a more full featured VM we are at least 5 times smaller in production .", "One that takes an ImageAdapter parameter that you can use to apply the mask to the image itself before setting it as the icon for the label .", "Second very strong point main one", "This is a big deal for mobile apps.. . .. . .. . We are working on consolidating the various VM s on the server-side which will allow us to add core VM API s more easily in the future as well as features like Java 8 support .", "Notice that our full VM is open-source under the vm tree here https : github.com codenameone CodenameOne .", "I have just released a new version https : github.com shannah cloudinary-codenameone releases tag 1.1 of the cloudinary cn1lib which gives you a couple of options for working around this .", "Java 5 syntax is translated seamlessly to JDK 1.3 cldc subset on J2ME RIM to provide those language capabilities and API s across all devices .", "I am not sure if the issue is really with downloading the picture before or after applying the mask. . time can tell down the road .. . .. . Here is what worked for me if anyone else is having similar issues : .. . .. . Shai I seriously appreciate your time", "The VM portion is a very small piece of our solution e.g .", "Notice that the XMLVM backend that translates to C is very different from the one that was formerly used to translates to iOS .", "They are very disingenuous on their web page codenameone.com compare.html https : www.codenameone.com compare.html criticising Xamarin on most of the devices in the field it would require a 3rd party VM to be installed .", "From the language side : on iOS it is java compiled to C which is then tied to hand-written Objective-C and it does not bundle VM only portability layer .", "One of the strongest points of CN1 approach is its emulator implemented over desktop JavaFX canvas which you use to develop software .", "JavaScript build targets which are available on the enterprise level use TeaVM http : teavm.org to do the translation statically .", "We initially used XMLVM and when RoboVM launched we thought about switching to them but decided writing our own VM would reduce risk .", "Any idea why", "and .. . .. . By the way is that true that there is a restriction to use java 1.5 in CodenameOne", "I couldn t find where to say to compile with java-7 .", "Kind regards", "EDIT : This reply is somewhat out of date .", "its really hard to test new stuff e.g .", "newer bytecodes and its really hard to add new API s in a way that will be totally cross-platform .", "You can use StringUtils.split to implement this functionality as well as StringTokenizer .", "Limiting the API s also allows us to keep the executable efficient and small relatively .", "For the most of the world who s used to working with Java 7 most likely this is quite a downer .", "When do you expect support for more recent versions of Java will be available", "Java 7 isn t much of an improvement we might support Java 8 lambdas in the future but don t have a concrete schedule .", "If you are referring to the full API I doubt that will ever happen.. .", "The full API is just too big and since we need to package the whole thing you will quickly hit the 100mb hard limit for OTA downloads in itunes .", "Updated the answer with newer details as Java 8 is supported now .", "The javadocs for the ShareButton class uses a try-with-resources .", "I couldn t get it to build because it told me that it s not supported in -source 1.5 .", "I tried setting the codename1.languageLevel property to 7 but that didn t work .", "Is there a way to use this", "Or is the ShareButton sample code simply incorrect", "We switched to Java 8 support a while back and since 3.3 have set it to the default .", "See the edit to this question .", "I am trying to display a rounded image that I get straight from the Internet .", "I used the code below to create a round mask get the image from the Internet then tried to either set the mask on the image or the label itself .", "None of these approaches worked .", "If I remove the mask the image is displayed fine .", "If I keep the code to set the mask then all I see is an empty white circle .", "I have the idea that if I apply the mask on the image itself then it may not take effect because the image was not downloaded at the time the mask was applied .", "But I don t seem to understand why calling setMask on the label is also not working .", "I think the making code you set to the label might be conflicting with the masking code you get from Cloudinary .", "So I tried various things : .. . .. . 1 Removing the mask that was set through cloudinary - That did not work .. . .. . 2 applied the mask to the placeholder encoded image as expected these shouldnt affect the final version that is getting published .. . .. . 3 This is what works", "Thank you very much .", "Will have to dig more into it if it gives me any other problems later but it seems to consistently work for now .", "The Cloudinary API returns a URLImage which doesn t work well with the Label.setMask method because technically a URLImage is an animated image it is a placeholder image until it finishes loading and then animates to become the target image .", "I have added two new image methods .", "Then you wouldn t use Label.setMask at all .", "See javadocs for this method here http : shannah.github.io cloudinary-codenameone javadoc com cloudinary Url.html image-com.codename1.ui.EncodedImage-java.lang.String-com.codename1.ui.URLImage.ImageAdapter- .. . .. . The other method uses the new Async image loading APIs underneath to load the image asynchronously .", "The image you receive in the callback is a real image so you can use it with a mask normally .", "See javadocs for this method here http : shannah.github.io cloudinary-codenameone javadoc com cloudinary Url.html image-java.lang.String-com.codename1.util.SuccessCallback- .. . .. . We are looking at adding a soft warning to the Label.setMask and setIcon methods if you try to add an animated image and mask it so that it is more clear .", "That makes sense .", "I was under the impression that it may have been an image download issue .", "I will implement your suggestion .", "I think it is the right way to go forward .", "Thanks", "For us the migration to iOS 9 and to 64 bit was relatively painless our code base is also smaller since we limit the JDK usage to a set of supported classes for portability .", "What I couldn t find is how does it work .", "Does it bundle a JVM with the application for iOS and Win7 and uses Dalvik in Android", "Does it translates source code to native and do we have access to this source code", "Is there other magic considering they promise no compromise", "What limitations should I be aware while coding agnostic Java", "Currently on Android J2ME RIM the standard Java code is executed as is .", "This is done using a server based bytecode processor based on retroweaver and a lot of custom code .", "Java 8 syntax is translated using retrolambda for all platforms when its used .", "This allows it to be compatible all the way down to RIM J2ME and also for newer non-Java 8 platforms such as Android ." ] }
{ "confidence": [ 84.08758544921875, 76.30751037597656, 50.376625061035156, 35.07383728027344, 20.05515480041504, 18.54837417602539, 15.516931533813477 ], "content": [ "Question : I m prospecting alternatives to develop for multiple mobile platforms and have found Codename One http : www.codenameone.com that uses Java as lingua franca instead of HTML CSS JS or scripting languages . What I couldn t find is how does it work . Does it bundle a JVM with the application for iOS and Win7 and uses Dalvik in Android Does it translates source code to native and do we have access to this source code Is there other magic considering they promise no compromise What limitations should I be aware while coding agnostic Java Preemptive strike : this is a question about Codename One not about which cross-platform should I choose or if I should go native or if I should go web . .. . Answer : Codename One https : www.codenameone.com uses a SaaS based approach so this might and probably will-change in the future to accommodate improved architectures . Notice that Codename One also provides an option to install its build servers in house https : www.codenameone.com corporate-server.html which means corporations that have policies forbidding such cloud architectures can install the cloud portion on premise . Currently on Android J2ME RIM the standard Java code is executed as is . Java 5 syntax is translated seamlessly to JDK 1.3 cldc subset on J2ME RIM to provide those language capabilities and API s across all devices . This is done using a server based bytecode processor based on retroweaver and a lot of custom code . Java 8 syntax is translated using retrolambda for all platforms when its used . This allows it to be compatible all the way down to RIM J2ME and also for newer non-Java 8 platforms such as Android . On iOS Codename One built open sourced ParparVM https : github.com codenameone CodenameOne tree master vm which is a very conservative VM . ParparVM https : github.com codenameone CodenameOne tree master vm features a concurrent non-blocking GC and it is written entirely in Java C . This effectively means that an xcode project is generated and compiled on the build servers so its effectively as-if you handcoded a native app and thus future proof for changes made by Apple . E.g . with recent 64bit and bitcode changes to iOS builds ParparVM needed no modifications to comply with those changes . In the past Codename One used XMLVM http : xmlvm.org to generate native-code in a very similar way but the XMLVM solution was too generic for the needs of Codename One . On Windows Phone a C translator is used currently it relies on XMLVM but it is not an ideal approach . Notice that the XMLVM backend that translates to C is very different from the one that was formerly used to translates to iOS . At this time Codename One is re-evaluating this backend and is considering a move either to ParparVM or to ikvm for this backend . JavaScript build targets which are available on the enterprise level use TeaVM http : teavm.org to do the translation statically . For desktop builds Codename One uses javafxpackager since both Macs and Windows machines are available in the cloud the platform specific nature of javafxpackager is not a problem . What makes Codename One stand out is the approach it takes to UI where it uses a lightweight architecture to allow the UI to work seamlessly across all platforms and be developed almost entirely in Java . It is augmented by the ability to embed heavyweight widgets into place among the lightweights . You can learn more about this in this blog post https : www.codenameone.com blog understanding-peer-native-components-why-codename-one-is-so-portable.html . A lightweight component is written entirely in Java this allows developers to preview the application accurately in the simulators GUI builder . Codename One achieves fast performance by drawing using the native gaming API s of most platforms e.g . OpenGL ES on iOS . The core technologies behind Codename One are all open-source including most of the stuff developed by Codename One itself e.g . ParparVM https : github.com codenameone CodenameOne tree master vm but also the full library platform ports designer tool http : github.com codenameone CodenameOne device skins https : github.com codenameone codenameone-skins etc . You can learn more about using the Codename One sources here https : www.codenameone.com blog how-to-use-the-codename-one-sources.html . FYI Shai Almog the author of this answer is the CEO of Codename One . Comment : Thanks for your attention Shai I think you should put it in your FAQ we know there s no real magic happening and like to know how the perceived magic works . I ll probably give it a try in evaluation phase Comment : There is no evaluation phase for Codename One our intention is to always have a reasonable free option for developers no strings attached . Since the product is open-source its important for us to carry some of that freedom into the SaaS services as well . Comment : Sorry I expressed myself wrong : P I m currently only searching for alternatives then we ll have an evaluation phase to see how the technologies meet our needs . Comment : Notice its highlighted in my bio and pretty much everywhere so its not as-if I tried to hide . I think it doesn t warrant being part of the answer since the answer should be judged by the facts rather than the bias of the author so I m moving that to the bottom but keeping the bold . I think the article is pretty objective . Comment : They are very disingenuous on their web page codenameone.com compare.html https : www.codenameone.com compare.html criticising Xamarin on most of the devices in the field it would require a 3rd party VM to be installed . which is technically true - Android IS most of the devices . They don t mention that Xamarin compiles down to native-code on iOS in contrast to the Codename VM described above .", "Question : I got several build errors on my very new Codename One application : .. . .. . The build complains on the FileNotfoundException class and the String split method . Any idea why and .. . .. . By the way is that true that there is a restriction to use java 1.5 in CodenameOne I couldn t find where to say to compile with java-7 . Kind regards .. . Answer : EDIT : This reply is somewhat out of date . Codename One https : www.codenameone.com supports a subset of Java 8 https : www.codenameone.com blog java-8-support.html now although string.split is still a problematic API call . Codename One supports a subset of Java 5 you shouldn t try and change that since the server translation code relies on bytecode behaviors of the target Java 5 and only supports a very specific subset of the API . The reasoning is simple since Codename One has multiple VM implementations iOS Dalvik ART XMLVM ParparVM https : github.com codenameone CodenameOne tree master vm blackberry etc . its really hard to test new stuff e.g . newer bytecodes and its really hard to add new API s in a way that will be totally cross-platform . You can use StringUtils.split to implement this functionality as well as StringTokenizer . Limiting the API s also allows us to keep the executable efficient and small relatively . Compared to a more full featured VM we are at least 5 times smaller in production . This is a big deal for mobile apps.. . .. . .. . We are working on consolidating the various VM s on the server-side which will allow us to add core VM API s more easily in the future as well as features like Java 8 support . You can learn more in this answer : How does Codename One work http : stackoverflow.com questions 10639766 how-codename-one-works Comment : For the most of the world who s used to working with Java 7 most likely this is quite a downer . When do you expect support for more recent versions of Java will be available Comment : Java 7 isn t much of an improvement we might support Java 8 lambdas in the future but don t have a concrete schedule . If you are referring to the full API I doubt that will ever happen.. . The full API is just too big and since we need to package the whole thing you will quickly hit the 100mb hard limit for OTA downloads in itunes . Comment : Updated the answer with newer details as Java 8 is supported now . Comment : The javadocs for the ShareButton class uses a try-with-resources . I couldn t get it to build because it told me that it s not supported in -source 1.5 . I tried setting the codename1.languageLevel property to 7 but that didn t work . Is there a way to use this Or is the ShareButton sample code simply incorrect Comment : We switched to Java 8 support a while back and since 3.3 have set it to the default . See the edit to this question .", "Question : I have to evaluate Codename One but I couldn t find infos about how the deployment works under the hood and what the end result actually is . Do they cross-compile my Java code to real native-code similar to RoboVM do they use a JVM similar to Gluon or do they have their own JVMs Comment : Codename One translates all the code to native-code or the native VM resulting in performance that matches or exceeds the performance of native-code . https : www.codenameone.com compare.html unfold the Fast option .. . Answer : You can see my answer here http : stackoverflow.com questions 10639766 how-codename-one-works 10646336 10646336 for additional details but the gist of it is that we are somewhat different than RoboVM . We translate the bytecode to C and compile it to native using xcode . Hence you get a fully native app and can even get the source code http : www.codenameone.com how-do-i---use-the-include-sources-feature-to-debug-the-native-code-on-iosandroid-etc and compile it yourself . Since native C Objective-C code is an officially supported path to iOS used by many apps games this is guaranteed to work always . RoboVM is a LLVM frontend for Java . This is rather ambitious and something that Apple just doesn t officially support . It created quite a few challenging situations for them in the past e.g . this post https : groups.google.com d msg robovm OnE3moz3d-8 nba0ury5CwAJ from a RoboVM employee explaining how hard it was for them to migrate to iOS 9.. . The same was true for the recent 64 bit transition etc . For us the migration to iOS 9 and to 64 bit was relatively painless our code base is also smaller since we limit the JDK usage to a set of supported classes for portability . Notice that our full VM is open-source under the vm tree here https : github.com codenameone CodenameOne . We initially used XMLVM and when RoboVM launched we thought about switching to them but decided writing our own VM would reduce risk . The VM portion is a very small piece of our solution e.g . we can translate your app to anything including a JavaScript app thanks to TeaVM http : teavm.org which supports threads on JavaScript . Unlike RoboVM Codename One is a true Write Once Run Anywhere solution .", "Question : I m prospecting alternatives to develop for multiple mobile platforms and have found Codename One http : www.codenameone.com that uses Java as lingua franca instead of HTML CSS JS or scripting languages . What I couldn t find is how does it work . Does it bundle a JVM with the application for iOS and Win7 and uses Dalvik in Android Does it translates source code to native and do we have access to this source code Is there other magic considering they promise no compromise What limitations should I be aware while coding agnostic Java Preemptive strike : this is a question about Codename One not about which cross-platform should I choose or if I should go native or if I should go web . .. . Answer : Codename one took very balanced approach to portability . I would like to add a pragmatic comment . From the user-interface side CN1 does paint all its UI on platform-provided canvas . It tries to mimic platform native look-and-feel if you choose it but has as much success as Swing had with its native platform look-and-feel because native platform constantly changes and native l f always lacks behind and in most cases feels not quite right . But if you choose platform-independent look-and-feel which is the sort of the trend today you are not restricted by Codenameone s default component set set in any way : it s just like Swing with its cross-platform look-and-feel Metal etc . . Which is good . From the language side : on iOS it is java compiled to C which is then tied to hand-written Objective-C and it does not bundle VM only portability layer . Most important here is the fact that java is compiled to C and not Objective-C which make it faster then idiomatic Objective-C code because it does virtual or more often direct method invocations instead of slow Objective C message dispatch . Which is good . It also may seem little faster on Android because while using Dalvik Art it does not use Android native UI which is bulky compared to CN1 s . This can make dynamic UI creation faster in runtime which is good . One of the strongest points of CN1 approach is its emulator implemented over desktop JavaFX canvas which you use to develop software . Emulator makes use of same UI code and portability APIs as on mobile platforms and lets you use IDE of choice for debugging . It restarts quickly and edit-compile-run cycle is very sustainable compared to android . Which is good . Second very strong point main one is open nature of their UI library all native-code and bytecode-to-C translator . If you spend some effort you can avoid building Android iOS ports on their farms and untie yourself from their particular revision of product but not from quite a few value-added services they offer which are not open-source . Depending on your situation this may or may not be quite good for you Weak point of Codenameone is its less-then-ideal maturity which means you can easily shoot yourself in the foot using basic UI components if you use them the way they were not indended to be used . Also it means that its java portability layer is not big enough and has holes in it to cover everyone s need and you may have to use native in some places and port other pure java libraries too . Also current state of graphics performance is sub-optimal if you get bunch of text on screen you ll easily miss 16msec fluid animation repaint time limit this can be worked around by double-buffering but it also has its limits . Luckily there is still room for optimization in implementation on both main platforms hopefully they will improve it . Overall Codenameone has good niche as a cross-platform framework for several classes of applications you may find a value in their services too .", "Question : I am trying to display a rounded image that I get straight from the Internet . I used the code below to create a round mask get the image from the Internet then tried to either set the mask on the image or the label itself . None of these approaches worked . If I remove the mask the image is displayed fine . If I keep the code to set the mask then all I see is an empty white circle . I have the idea that if I apply the mask on the image itself then it may not take effect because the image was not downloaded at the time the mask was applied . But I don t seem to understand why calling setMask on the label is also not working . .. . Answer : The Cloudinary API returns a URLImage which doesn t work well with the Label.setMask method because technically a URLImage is an animated image it is a placeholder image until it finishes loading and then animates to become the target image . I have just released a new version https : github.com shannah cloudinary-codenameone releases tag 1.1 of the cloudinary cn1lib which gives you a couple of options for working around this . I have added two new image methods . One that takes an ImageAdapter parameter that you can use to apply the mask to the image itself before setting it as the icon for the label . Then you wouldn t use Label.setMask at all . See javadocs for this method here http : shannah.github.io cloudinary-codenameone javadoc com cloudinary Url.html image-com.codename1.ui.EncodedImage-java.lang.String-com.codename1.ui.URLImage.ImageAdapter- .. . .. . The other method uses the new Async image loading APIs underneath to load the image asynchronously . The image you receive in the callback is a real image so you can use it with a mask normally . See javadocs for this method here http : shannah.github.io cloudinary-codenameone javadoc com cloudinary Url.html image-java.lang.String-com.codename1.util.SuccessCallback- .. . .. . We are looking at adding a soft warning to the Label.setMask and setIcon methods if you try to add an animated image and mask it so that it is more clear . Comment : That makes sense . I was under the impression that it may have been an image download issue . I will implement your suggestion . I think it is the right way to go forward . Thanks", "Question : I am trying to display a rounded image that I get straight from the Internet . I used the code below to create a round mask get the image from the Internet then tried to either set the mask on the image or the label itself . None of these approaches worked . If I remove the mask the image is displayed fine . If I keep the code to set the mask then all I see is an empty white circle . I have the idea that if I apply the mask on the image itself then it may not take effect because the image was not downloaded at the time the mask was applied . But I don t seem to understand why calling setMask on the label is also not working . .. . Answer : So I tried various things : .. . .. . 1 Removing the mask that was set through cloudinary - That did not work .. . .. . 2 applied the mask to the placeholder encoded image as expected these shouldnt affect the final version that is getting published .. . .. . 3 This is what works I am not sure if the issue is really with downloading the picture before or after applying the mask. . time can tell down the road .. . .. . Here is what worked for me if anyone else is having similar issues : .. . .. . Shai I seriously appreciate your time Thank you very much . Will have to dig more into it if it gives me any other problems later but it seems to consistently work for now .", "Question : I am trying to display a rounded image that I get straight from the Internet . I used the code below to create a round mask get the image from the Internet then tried to either set the mask on the image or the label itself . None of these approaches worked . If I remove the mask the image is displayed fine . If I keep the code to set the mask then all I see is an empty white circle . I have the idea that if I apply the mask on the image itself then it may not take effect because the image was not downloaded at the time the mask was applied . But I don t seem to understand why calling setMask on the label is also not working . .. . Answer : I think the making code you set to the label might be conflicting with the masking code you get from Cloudinary ." ] }
[ "yes-answer-long", "yes-answer-short" ]
ios
UNK_RELATION
arraylist@interface@57
arraylist -- resizable-array implementation of the list @placeholder in java .
{ "confidence": [ 43.48036193847656, 41.51194763183594, 35.45643997192383, 33.14902877807617, 31.21455955505371, 30.620399475097656, 30.497068405151367, 30.27497100830078, 30.263145446777344, 29.595813751220703, 29.293659210205078, 28.834922790527344, 28.705039978027344, 28.523052215576172, 28.48101043701172, 28.301532745361328, 28.072799682617188, 28.06870460510254, 27.920265197753906, 27.885543823242188, 27.879596710205078, 27.879596710205078, 27.879596710205078, 27.85561180114746, 27.449298858642578, 27.445018768310547, 27.375919342041016, 27.248966217041016, 27.230243682861328, 27.117473602294922, 27.117473602294922, 27.069671630859375, 26.97549057006836, 26.937299728393555, 26.77455711364746, 26.77455711364746, 26.703689575195312, 26.59288787841797, 26.459209442138672, 26.315750122070312, 26.279159545898438, 26.20404815673828, 26.159107208251953, 26.12340545654297, 26.09927749633789, 26.047216415405273, 26.047216415405273, 26.036251068115234, 26.012027740478516, 25.846221923828125, 25.846221923828125, 25.603221893310547, 25.602807998657227, 25.554885864257812, 25.554885864257812, 25.554885864257812, 25.554885864257812, 25.554885864257812, 25.554885864257812, 25.554885864257812, 25.466156005859375, 25.42707633972168, 25.38748550415039, 25.38748550415039, 25.38748550415039, 25.120925903320312, 24.932796478271484, 24.843109130859375, 24.792762756347656, 24.792762756347656, 24.792762756347656, 24.792762756347656, 24.792762756347656, 24.792762756347656, 24.792762756347656, 24.792762756347656, 24.5435791015625, 24.37438201904297, 24.37438201904297, 24.370601654052734, 24.325199127197266, 24.325199127197266, 24.32337188720703, 24.32337188720703, 24.31484603881836, 24.232070922851562, 24.19773292541504, 24.19773292541504, 24.19773292541504, 24.128387451171875, 24.128387451171875, 24.128387451171875, 24.128387451171875, 24.05237579345703, 23.94034767150879, 23.94034767150879, 23.92082405090332 ], "content": [ "Is ArrayList an array or a list in java", "An ArrayList in Java is a List that is backed by an array .", "In Java List Key is not ArrayList Key but the opposite is true - ArrayList is an implementation one of many possible of an interface List .", "And a normal Python list is essentially a Java ArrayList already .", "The documentation says : .. . .. . Resizable-array implementation of the Deque interface .", "I am trying to map a Bson array to Java ArrayList .", "Possible duplicate of Java : Find string in array list http : stackoverflow.com questions 32304214 java-find-string-in-array-list", "ArrayList is a particular implementation of List but is not an implementation of ObservableList .", "Implement the given List interface in Java as an Array List .", "In this case how a Java ArrayList works .", "java-examples.com http : www.java-examples.com copy-all-elements-java-arraylist-object-array-example", "questions 26167930 initial-arraylist-size-in-java-dependent-on-memory 4 answers .. . .. . What is the initial capacity of an ArrayList in Java 8", "How can I convert a List to an Array in Java", "ArrayList and LinkedList are an implementation of the List interface .", "In Java 7 we can eliminate the type like .. . .. . ArrayList String list new ArrayList", "This question already has an answer here : .. . .. . Convert list to array in Java questions 9572795 convert-list-to-array-in-java 11 answers .. . .. . There is a Problem in my Project .", "possible duplicate of Sorting an ArrayList of Person with java collections http : stackoverflow.com questions 12771534 sorting-an-arraylist-of-person-with-java-collections", "List Element list new ArrayList .. . Collections.addAll list array .. . .. . 3 .", "ArrayList T in Java uses 1.5 .", "This question already has an answer here : .. . .. . Create ArrayList from array questions 157944 create-arraylist-from-array 19 answers .. . .. . I m having a lot of trouble turning an array into an ArrayList in Java .", "In Java 7 ArrayList does not have sort method .", "I m new to java and I m having a problem with ArrayList .", "Possible Duplicate : .. . How to get the capacity of the ArrayList in Java", "The ArrayDeque http : grepcode.com file repository.grepcode.com java root jdk openjdk 8u40-b25 java util ArrayDeque.java implementation changes less often than ArrayList .", "Possible Duplicate : .. . Assigning an array to an ArrayList in Java http : stackoverflow.com questions 3746639 assigning-an-array-to-an-arraylist-in-java .. . .. . I need to convert a String to an ArrayList and I don t know how .. . .. . Basically I would like to transform filesOrig into an ArrayList .", "Wouldn t List ArrayList String 2dlist new ArrayList ArrayList String be a better more efficient implementation", "An array of List is a different object from an array of ArrayList and cannot be type casted .", "As per Java Docs https : docs.oracle.com javase 8 docs api java util ArrayList.html ArrayList-- : .. . .. . Constructs an empty list with an initial capacity of ten .", "I disagree with the previous answers suggesting ArrayList because ArrayList is not a Dynamic Array but a List backed by an array .", "Java think you have an ArrayList of Object .", "http : javaconceptoftheday.com arraylist-vs-linkedlist-java", "I want to create my own implementation of ArrayList in java that can listen when the list is changing and to do action when this happens .", "As it says in the Javadoc for ArrayList https : docs.oracle.com javase 7 docs api java util ArrayList.html : .. . .. . Note that this implementation is not synchronized .", "Arraylist list new Arraylist .. . list.addAll Arrays.asList array .. . .. . For more detail you can refer to http : javarevisited.blogspot.in 2011 06 converting-array-to-arraylist-in-java.html", "ArrayList int initialCapacity http : docs.oracle.com javase 8 docs api java util ArrayList.html ArrayList-int- .. . .. . Constructs an empty list with the specified initial capacity .", "As per the JavaDoc https : docs.oracle.com javase 8 docs api java util ArrayList.html ArrayList-- .. . .. . public ArrayList .. . .. . Constructs an empty list with an initial capacity of ten .", "Same concept should work on arraylist however .. . .. . Here is Java 8 way :", "what if the array lists are nested ArrayList ArrayList Object", "java.util.List list new java.util.ArrayList error in c .. . .. . List list new ArrayList java .. . .. . only : Hashtable hashtable new Hashtable ok in c", "I have decided to create an ArrayList of ArrayList a 2d ArrayList to store the nodes and edges in an array list .", "The common idiom in Java would just to use ArrayList Person if you need a list of Person objects and not to create a specific subclass for this .", "An ObservableList is no less a part of Java SE than an ArrayList .", "Array ArrayList .", "If you look into the implementation of ArrayList - an empty ArrayList starts with a an empty array to store the data - thats easy .", "Unlike a real ArrayList the resulting List is not resizable and attempts to .add elements to the end of it will result in UnsupportedOperationException .", "ArrayList is the go-to List implementation used by professionals and experienced programmers .", "Size is equal to the number of elements contained in the ArrayList and any other List implementation .", "Possible duplicate of Moving data from a HashSet to ArrayList in Java http : stackoverflow.com questions 13632135 moving-data-from-a-hashset-to-arraylist-in-java", "This question already has an answer here : .. . .. . Initialization of an ArrayList in one line questions 1005073 initialization-of-an-arraylist-in-one-line 22 answers .. . .. . ArrayList declaration Java http : stackoverflow.com questions 12321177 arraylist-declaration-java has questioned and answered how to declare an empty ArrayList but how do I declare an arraylist with values", "stackoverflow.com questions 3746639 http : stackoverflow.com questions 3746639 assigning-an-array-to-an-arraylist-in-java", "Example taken from this page : http : www.java-examples.com copy-all-elements-java-arraylist-object-array-example", "In Java 8 : String.join t array", "The problem you seem to be having is with the conversion of ArrayList to an array of List .", "I m new to Java and I m trying to arrange an arrayList of terms in alphabetical order .", "I m writing a program in Java that reads data from a text file into an Arraylist .", "I use an ArrayList in one of my Java project s classes .", ".. . .. . Reference http : www.sap-img.com java difference-between-arraylist-and-vector.htm", "As far as I know ArrayList is a Java C collection that s not used in Delphi .", "Java ArrayList do not provide a way to access its current capacity .", "So if you create an arraylist with 10 items java will make it size 17 .", "Take a look in to ArrayList implementation .", "Explanation : If you use ArrayList al new ArrayList which means array list of objects .", "ArrayList ArrayList String .. . .. . http : download.oracle.com javase 6 docs api java util ArrayList.html .. . .. . http : en.wikipedia.org wiki Generics in Java", "In java ArrayList already has a get on it. . in C also has a get defined on ArrayList but it is used differently .", "http : stackoverflow.com questions 2497063 how-to-get-the-capacity-of-the-arraylist-in-java .. . .. . How to find the capacity of an ArrayList", "ArrayList http : docs.oracle.com javase 7 docs api java util ArrayList.html : A List backed by an array where the array has a length called capacity that is at least as large as the number of elements the list s size .", "C++ has std : : vector and Java has ArrayList and many other languages have their own form of dynamically allocated array .", "List or ArrayList", "In Java I usually pass ArrayList with data type in constructor .", "type this into a search-engine : java arraylist custom sort order", "In Java ArrayList and LinkedList use exactly the same code other than the constructor .", "Extracts from the code : .. . .. . And for the adding ite to the ArrayList : .. . .. . Very new to Java", "I am wondering what is the memory overhead of java HashMap compared to ArrayList", "This new class should behave like Java ArrayList class .", "Obviously you should not use Java ArrayList as the default data structure .", "I create ARFF file-format in java from several arraylist of string .", "The specified list must be modifiable but need not be resizable .", "ArrayList implements the List Interface .", "Will return a List and not a ArrayList .", "I think that I might need to write my own Java class with a method to convert an ArrayList to a List but I am not Java developer and I don t know how to create this class .", "By default ArrayList has capacity of 10 http : grepcode.com file repository.grepcode.com java root jdk openjdk 6-b14 java util ArrayList.java ArrayList.0elementData and it is resized by +50 each time .", "If you see the source code of ArrayList http : grepcode.com file repository.grepcode.com java root jdk openjdk 6-b14 java util ArrayList.java ArrayList . 3Cinit 3E 28 29 : .. . .. . The initial capacity is 10 .", "List lista new ArrayList --- List lista new ArrayList", "Lets say list A is an ArrayList CustomTexField and list B is an ArrayList JLabel .", "the interface type instead of implementation type ArrayList String .", "ArrayList String list new ArrayList String .", "Now keep in mind that Array in Java is 0 indexed .", "Any array in Java does not override equals method .", "possible duplicate of how to make a set of array in java", "@Zip ArrayList is an extendable array .", "sentences is an ArrayList and then sentence is an array .. .", "ArrayList is essentially an array .", "ArrayList isn t an array .", "Then if you truly need it to be a List as opposed to ArrayList you can convert the arraylist to a list .", "Problem is that OP is using ArrayList not array .", "An ArrayList maps directly to a JSON array .", "That said these methods may be of interest to you : .. . .. . ArrayList int initialCapacity http : download.oracle.com javase 6 docs api java util ArrayList.html ArrayList 28int 29 .. . Constructs an empty list with the specified initial capacity ." ] }
{ "confidence": [ 41.11105728149414, 38.83854675292969, 37.944942474365234, 37.517940521240234, 37.171321868896484, 36.36736297607422, 36.08250427246094, 35.82175827026367, 35.47344207763672, 35.416622161865234, 35.15092086791992, 34.49066162109375, 34.360206604003906, 34.255409240722656, 34.24163818359375, 34.17559051513672, 34.117488861083984, 34.067779541015625 ], "content": [ "Question : This question already has an answer here : .. . .. . Create ArrayList from array questions 157944 create-arraylist-from-array 19 answers .. . .. . I m having a lot of trouble turning an array into an ArrayList in Java . This is my array right now : .. . .. . hand holds an array of Cards . How this would look like as an ArrayList Comment : Have you read any reference info e.g . docs.oracle.com javase tutorial collections http : docs.oracle.com javase tutorial collections .. . Answer : This will give you a list . If you want an arraylist you can do Comment : Nope This gives an object that acts as a List wrapper around an underlying object . Unlike a real ArrayList the resulting List is not resizable and attempts to .add elements to the end of it will result in UnsupportedOperationException .", "Question : I would like to have an object that is a resizable list of byte s that implements the following interface : .. . .. . get current size .. . clear the list reset size to zero .. . add a byte to the end .. . remove a byte from the end .. . get value of any element by index .. . .. . Also it is known that this list never need hold more than 21 elements . I have already implemented this object as just an array byte of size 21 and an int that gives the index of the next not-yet-populated element and had great success using it . This seems like a simple implementation but doesn t java have build-in type for this kind of thing already I imagine the need for such a thing is extremely prevelant . I tried using a ArrayList Byte but it is super slow and my runtime scales exponentially with iterations . Am I suffering from boxing unboxing performance losses Which built-in type should I use as my resizable list of primatives Comment : what about LinkedList Byte it is the best option for first four clauses Comment : @AndrewTobilko : If ArrayList Byte is super slow in their use-case I can t see LinkedList Byte being much if any better . Comment : What s your motivation for making a change If you have something that works well for your scenario and you already know that ArrayList Byte doesn t suit.. . Comment : ArrayList amortized cost of appending at the end is more than outeweighed by its O 1 indexed access compared to LinkedList s O n Comment : I haven t tried but eclipse collections http : www.eclipse.org collections has some native collections . I am surprised by the lack of a list for native elements . I also wrote my own version of an ArrayList using int s called an IntList due to performance issues . Sometimes the boxing unboxing can have serious performance issues . .. . Answer : If an external library is allowed you can use HPPC https : labs.carrotsearch.com hppc.html High Performance Primitive Collections for Java . It support Lists Sets and Maps of all Java primitives . .. . .. . You will have to make a compromise when dealing with those requirements . I recommend finding the most used operation and choose the support structure based on that . Comment : fastutil is better .", "Question : I would like to have an object that is a resizable list of byte s that implements the following interface : .. . .. . get current size .. . clear the list reset size to zero .. . add a byte to the end .. . remove a byte from the end .. . get value of any element by index .. . .. . Also it is known that this list never need hold more than 21 elements . I have already implemented this object as just an array byte of size 21 and an int that gives the index of the next not-yet-populated element and had great success using it . This seems like a simple implementation but doesn t java have build-in type for this kind of thing already I imagine the need for such a thing is extremely prevelant . I tried using a ArrayList Byte but it is super slow and my runtime scales exponentially with iterations . Am I suffering from boxing unboxing performance losses Which built-in type should I use as my resizable list of primatives Comment : what about LinkedList Byte it is the best option for first four clauses Comment : @AndrewTobilko : If ArrayList Byte is super slow in their use-case I can t see LinkedList Byte being much if any better . Comment : What s your motivation for making a change If you have something that works well for your scenario and you already know that ArrayList Byte doesn t suit.. . Comment : ArrayList amortized cost of appending at the end is more than outeweighed by its O 1 indexed access compared to LinkedList s O n Comment : I haven t tried but eclipse collections http : www.eclipse.org collections has some native collections . I am surprised by the lack of a list for native elements . I also wrote my own version of an ArrayList using int s called an IntList due to performance issues . Sometimes the boxing unboxing can have serious performance issues . .. . Answer : Standard Java does not offer collections for any of the primitive-types . But the compiler does a lot of auto-boxing for you and there are nice helper methods so going forward from byte to List Byte is probably not much work coding wise . But it seems you hit the the big problem with such code : it comes with performance cost . But this can t be assessed by talking about it on such a generic level . Long story short : if your environment allows you to turn to one of the recommend 3rd party libraries .. . just try them . If not you have to understand where your CPU cycles are coming from : .. . .. . a by profiling .. . .. . or .. . .. . b by extensive review if you have some sharp-eyed coworkers around - show them your code and then you try to figure where un boxing takes place and how to avoid it .. . .. . If the internal review doesn t work for you you can turn to codereview.stackexchange.com", "Question : I m fairly new to ArrayLists anyway but I need them for this project I m doing so if you guys could help me I would be more than grateful Basically I need to create a multidemensional ArrayList to hold String values . I know how to do this with a standard array like so public static String array but this is no good because I don t know the size of my array all I know is how many demensions it will have . So if you guys know how to make a dynamically resizable array with 2 + demensions please could you tell me . Thanks In advance .. . Andy .. . .. . Edit Update .. . .. . .. . .. . Maybe it would be easier to resize or define a standard array using a varible But I don t know It s probably easier to use my original idea of an ArrayList though.. . All I need is a complete example code to create a 2D ArrayList and add so example values to both dimensions without knowing the index . Comment : Please take a look at this answer : stackoverflow.com a 37016599 2457251 http : stackoverflow.com a 37016599 2457251 .. . Answer : Wouldn t List ArrayList String 2dlist new ArrayList ArrayList String be a better more efficient implementation Comment : If you re going with declaring List on the outside seems like you d want it on the inside as well as List List String .", "Question : The documentation says : .. . .. . Resizable-array implementation of the Deque interface . Array deques have no capacity restrictions they grow as necessary to support usage .. . .. . However I still want to understand what exactly the structure of ArrayDeque is how the resizing works . Also it would be great if someone could provide a reliable source where I can find the answer . According to some of the Google results I found it is possibly implemented as a circular array . Is it true And what is the grow policy Is it similar to ArrayList If it is does ArrayDeque have a similar performance to ArrayList in the operations like adding or removing the element at the end Thank you . Comment : Read the source code Comment : @chrylis Yes I m doing it now . It seems to me that it is a circular array . And the size doubles when it is full which makes the grow policy very similar to ArrayList . I don t understand why many people say ArrayDeque is faster than ArrayList . Comment : Who says it s faster They re different kinds of data-structures not alternative implementations . Comment : For adding elements at the beginning ArrayDeque is going to be faster because if it doesn t need resizing it will just decrement the head counter possibly wrapping around . ArrayList will copy over all elements to n+1 . But fit adding at the end they should be pretty similar . .. . Answer : The grow policy of ArrayList and ArrayDeque is not documented and may vary between JDK implementations and even JDK versions . For example in Open JDK 6 http : grepcode.com file repository.grepcode.com java root jdk openjdk 6-b14 java util ArrayList.java ArrayList.ensureCapacity 28int 29 it was n 3 2+1 but in Open JDK 8 http : grepcode.com file repository.grepcode.com java root jdk openjdk 8u40-b25 java util ArrayList.java ArrayList.grow 28int 29 it s n 3 2 . Also in JDK 6 ArrayList with default constructor was initially created with 10 elements array while in JDK 8 it allocates an array only when at least one element is added . The ArrayDeque http : grepcode.com file repository.grepcode.com java root jdk openjdk 8u40-b25 java util ArrayDeque.java implementation changes less often than ArrayList . It always uses internally the power-of-two sized array starting with 16 by default and doubling it when necessary thus memory-footprint may be different for ArrayList and ArrayDeque for ArrayDeque you will have in average less reallocations but more wasted memory . Addition to the tail is roughly equally fast for both ArrayList and ArrayDeque unless reallocation is necessary . Reallocation events may occur at different points . For example by default first reallocation for ArrayList will occur when adding element 11 but for ArrayDeque it will occur on element 16 . The advantage of ArrayDeque is ability to add remove elements to the head as fast as to the tail . In contrast ArrayList will do it in O n time as it will have to move all the existing elements . Thus use ArrayDeque when you need to add remove both to head and tail . If you need to modify the tail only usually ArrayList is preferred .", "Question : I was wondering how to initialise an integer array such that it s size and values change through out the execution of my program any suggestions .. . Answer : I disagree with the previous answers suggesting ArrayList because ArrayList is not a Dynamic Array but a List backed by an array . The difference is that you cannot do the following : .. . .. . It will give you an IndexOutOfBoundsException because there is no element at this position yet even though the backing array would permit such an addition . So you need to use a custom extendable Array implementation like suggested by @randy-lance Comment : I believe you wanted to link it to codereply.com answer 6i5bur java-dynamic-arrays.html http : codereply.com answer 6i5bur java-dynamic-arrays.html", "Question : I try to add objects in a List String instance but it throw an UnsupportedOperationException . Anyone knows why My Java code : .. . .. . The error message : .. . Answer : Not every List http : download.oracle.com javase 6 docs api java util List.html implementation supports the add method . One common example is the List returned by Arrays.asList http : download.oracle.com javase 6 docs api java util Arrays.html asList 28T.. . 29 : it is documented not to support any structural modification i.e . removing or adding elements emphasis mine : .. . .. . Returns a fixed-size list backed by the specified array . Even if that s not the specific List you re trying to modify the answer still applies to other List implementations that are either immutable or only allow some selected changes . You can find out about this by reading the documentation of UnsupportedOperationException http : download.oracle.com javase 6 docs api java lang UnsupportedOperationException.html and List.add http : download.oracle.com javase 6 docs api java util List.html add 28E 29 which documents this to be an optional operation . The precise meaning of this phrase is explained at the top of the List documentation . As a workaround you can create a copy of the list to a known-modifiable implementation like ArrayList : Comment : so i have to use the list instance to test if it contain my element and the array instance when i have to add an element that s write Comment : @Florito : This will work though : List String listMembres new ArrayList String Arrays.asList tabMembres : Comment : or maybe i have to cast my List object to ArrayList or another Comment : No not really . If you want to add an element to a List implementation that doesn t allow addition then you ll have to copy that List to an implementation that does ArrayList is a common candidate and add to that . Comment : I can t believe something like made me waste so much time : S", "Question : I have an array that is initialized like : .. . .. . I would like to convert this array into an object of the ArrayList class . .. . Answer : Comment : Yep . And in the most common case where you just want a list the new ArrayList call is unecessary as well . Comment : @Luron - just use List ClassName list Arrays.asList array Comment : @Calum and @Pool - as noted below in Alex Miller s answer using Arrays.asList array without passing it into a new ArrayList object will fix the size of the list . One of the more common reasons to use an ArrayList is to be able to dynamically change its size and your suggestion would prevent this . Comment : Arrays.asList is a horrible function and you should never just use its return-value as is . It breaks the List template so always use it in the form indicated here even if it does seem redundant . Good answer . Comment : @Adam Please study the javadoc for java.util.List . The contract for add allows them to throw an UnsupportedOperationException . docs.oracle.com javase 7 docs api java util http : docs.oracle.com javase 7 docs api java util List.html add 28E 29 Admittedly from an object-oriented perspective it is not very nice that many times you have to know the concrete implementation in order to use a collection - this was a pragmatic design choice in order to keep the framework simple .", "Question : I need to know if i store my data in an ArrayList and I need to get the value that I ve stored in it .. . .. . For example : if I have an array list like this .. . .. . and I want to get each String element how can I do it I ve tried to do it like this Comment : Just a few notes about your code : Don t use single-letter variable names . Instead use names that clearly show what the purpose of the variable is - that will make your code a lot less cryptic . Also the convention in Java is to use variable names that start with a lower-case letter . .. . Answer : The following snippet gives an example that shows how to get an element from a List at a specified index and also how to use the advanced for-each loop to iterate through all elements : .. . .. . Note the following : .. . .. . Generic List String and ArrayList String types are used instead of raw ArrayList type . Variable names starts with lowercase .. . list is declared as List String i.e . the interface type instead of implementation type ArrayList String . .. . .. . References .. . .. . API : .. . .. . Java Collections Framework tutorial http : java.sun.com docs books tutorial collections index.html .. . class ArrayList E implements List E http : java.sun.com javase 6 docs api java util ArrayList.html .. . interface List E http : java.sun.com javase 6 docs api java util List.html .. . E get int index http : java.sun.com javase 6 docs api java util List.html get 28int 29 .. . Returns the element at the specified position in this list . Don t use raw-types .. . .. . JLS 4.8 Raw Types http : java.sun.com docs books jls third edition html typesValues.html 4.8 .. . .. . The use of raw-types is allowed only as a concession to compatibility of legacy code . The use of raw-types in code written after the introduction of genericity into the Java programming language is strongly discouraged . It is possible that future versions of the Java programming language will disallow the use of raw-types . .. . .. . Effective Java 2nd Edition : Item 23 : Don t use raw-types in new code .. . .. . If you use raw-types you lose all the safety and expressiveness benefits of generics . .. . .. . Prefer interfaces to implementation classes in type declarations .. . .. . Effective Java 2nd Edition : Item 52 : Refer to objects by their interfaces .. . .. . .. . you should favor the use of interfaces rather than classes to refer to objects . If appropriate interface types exist then parameters return values variables and fields should all be declared using interface types . Naming conventions http : java.sun.com docs codeconv html CodeConventions.doc8.html .. . .. . Variables : Except for variables all instance class and class-constants are in mixed case with a lowercase first letter .", "Question : I m fairly new to ArrayLists anyway but I need them for this project I m doing so if you guys could help me I would be more than grateful Basically I need to create a multidemensional ArrayList to hold String values . I know how to do this with a standard array like so public static String array but this is no good because I don t know the size of my array all I know is how many demensions it will have . So if you guys know how to make a dynamically resizable array with 2 + demensions please could you tell me . Thanks In advance .. . Andy .. . .. . Edit Update .. . .. . .. . .. . Maybe it would be easier to resize or define a standard array using a varible But I don t know It s probably easier to use my original idea of an ArrayList though.. . All I need is a complete example code to create a 2D ArrayList and add so example values to both dimensions without knowing the index . Comment : Please take a look at this answer : stackoverflow.com a 37016599 2457251 http : stackoverflow.com a 37016599 2457251 .. . Answer : ArrayList ArrayList String .. . .. . http : download.oracle.com javase 6 docs api java util ArrayList.html .. . .. . http : en.wikipedia.org wiki Generics in Java", "Question : I have an array that is initialized like : .. . .. . I would like to convert this array into an object of the ArrayList class . .. . Answer : Another update almost ending year 2014 you can do it with Java 8 too : .. . .. . A few characters would be saved if this could be just a List Comment : It s probably best not to be implementation-dependent but Collectors.toList actually returns an ArrayList .", "Question : Possible Duplicate : .. . Sorting a collection of objects http : stackoverflow.com questions 1206073 sorting-a-collection-of-objects .. . .. . Ok so I have a been making an addressbook application and have pretty much finished all the key features but I am looking to implement a sort feature in the program . I want to sort an Arraylist which is of a type called Contact contactArray which is a separate class which contains four fields name home number mobile number and address . So I was looking into using the collection sort yet am not sure how i d implement this . Is this the right sort I should be using is it possible to use or should I look into making a custom sort Comment : This assignment sounds so familiar . Mine is due tonight and I m running late . Agh .. . Answer : The Collections.sort is a good sort implementation . If you don t have The comparable implemented for Contact you will need to pass in a Comparator implementation http : java.sun.com javase 6 docs api java util Collections.html sort 28java.util.List 20java.util.Comparator 29 .. . .. . Of note : .. . .. . The sorting algorithm is a modified mergesort in which the merge is omitted if the highest element in the low sublist is less than the lowest element in the high sublist . This algorithm offers guaranteed n log n performance . The specified list must be modifiable but need not be resizable . This implementation dumps the specified list into an array sorts the array and iterates over the list resetting each element from the corresponding position in the array . This avoids the n2 log n performance that would result from attempting to sort a linked-list in-place . The merge sort is probably better than most search algorithm you can do .", "Question : I have a string arraylist names which contains names of people . I want to sort the arraylist in alphabetical order . I tried to sort the list in above way . But it is displaying the sorted array as : .. . .. . but I don t want to make it case sensitive . I want the result as : .. . Answer : Starting from Java 8 you can use Stream https : docs.oracle.com javase 8 docs api java util stream Stream.html : .. . .. . It gets a stream from that ArrayList then it sorts it ignoring the case . After that the stream is converted to an array which is converted to an ArrayList . If you print the result using : .. . .. . you get the following output :", "Question : Is ArrayList an array or a list in java what is the time-complexity for the get operation is it O n or O 1 .. . Answer : It s implementation is done with an array and the get operation is O 1 . javadoc says : .. . .. . The size isEmpty get set iterator and listIterator operations run in constant-time . The add operation runs in amortized constant-time that is adding n elements requires O n time . All of the other operations run in linear time roughly speaking . The constant factor is low compared to that for the LinkedList implementation .", "Question : Possible Duplicate : .. . Assigning an array to an ArrayList in Java http : stackoverflow.com questions 3746639 assigning-an-array-to-an-arraylist-in-java .. . .. . I need to convert a String to an ArrayList and I don t know how .. . .. . Basically I would like to transform filesOrig into an ArrayList . I ve Googled around but I can t find any solutions . Thanks for your time and help . Comment : stackoverflow.com questions 3746639 http : stackoverflow.com questions 3746639 assigning-an-array-to-an-arraylist-in-java .. . Answer : The list returned will be backed by the array it acts like a bridge so it will be fixed-size .", "Question : This question already has an answer here : .. . .. . Initialization of an ArrayList in one line questions 1005073 initialization-of-an-arraylist-in-one-line 22 answers .. . .. . ArrayList declaration Java http : stackoverflow.com questions 12321177 arraylist-declaration-java has questioned and answered how to declare an empty ArrayList but how do I declare an arraylist with values I ve tried the following but it returns a syntax-error : .. . Answer : You can create a new object using the constructor that accepts a Collection http : docs.oracle.com javase 8 docs api java util Collection.html : .. . .. . .. . .. . When you have question like this you should visit the docs http : docs.oracle.com javase 8 docs api java util ArrayList.html and see what constructors available there : .. . .. . ArrayList http : docs.oracle.com javase 8 docs api java util ArrayList.html ArrayList-- .. . .. . Constructs an empty list with an initial capacity of ten . ArrayList Collection extends E c http : docs.oracle.com javase 8 docs api java util ArrayList.html ArrayList-java.util.Collection- .. . .. . Constructs a list containing the elements of the specified collection in the order they are returned by the collection s iterator . ArrayList int initialCapacity http : docs.oracle.com javase 8 docs api java util ArrayList.html ArrayList-int- .. . .. . Constructs an empty list with the specified initial capacity . .. . .. . Java 8 solution using Stream https : docs.oracle.com javase 8 docs api java util stream Stream.html : Comment : Use List on the LHS rather than ArrayList if you don t absolutly need an ArrayList there . And use the diamond-operator on the RHS to avoid warnings . Comment : short and clean solution Comment : Why you wrap by new ArrayList List String x Arrays.asList xyz abc is ok Comment : @mystdeim OP asked for ArrayList . Arrays asList returns a List not a specific implementation . Comment : The stream solution is elegant", "Question : How can I convert a List to an Array in Java Check the code below : .. . .. . I need to populate the array tiendas with the values of tiendasList . Comment : ArrayList isn t an array . Tienda would be an array . .. . Answer : Example taken from this page : http : www.java-examples.com copy-all-elements-java-arraylist-object-array-example Comment : Please don t just copy other people s work as your own without attribution . java-examples.com http : www.java-examples.com copy-all-elements-java-arraylist-object-array-example", "Question : I am trying to call a Java method from JRuby and one of the arguments to the Java method needs to be an instance of java.util.List . I cannot get this to work from JRuby . When I try to create an instance of a List object in JRuby it doesn t have the method for assignment elements to the List . I think that I might need to write my own Java class with a method to convert an ArrayList to a List but I am not Java developer and I don t know how to create this class . .. . .. . Edits : I am trying to automate the creation of a PDF with form elements using older open-source Java software called PDF Forms Designer which you can download here : https : sourceforge.net projects pdfformsdesigne files pdfformsdesigne 0.8b05 forms src.zip download .. . .. . I am trying to call the write method defined in the org.pdf.forms.writer.Writer class . I am basically duplicating the code in the publishPDF method defined in the org.pdf.forms.gui.commands.Commands class . I have the widgets argument setup as an instance of ArrayList which is easy to work with in JRuby . I just need to get it converted to a List so I can call the method to save out the PDF document . Here is a bit of JRuby code that isn t working : .. . Answer : java.util.ArrayList is of the type java.util.List . So I am not sure why you say you need to write a new class to convert ArrayList to List . Please paste your code and error to explain the issue . Comment : When I try to pass the ArrayList variable to the Java method that expects a List variable I get this error : TypeError : failed to coerce java.util.ArrayList to Ljava.util.List . I will edit my post to add some code samples . Comment : The problem you seem to be having is with the conversion of ArrayList to an array of List . An array of List is a different object from an array of ArrayList and cannot be type casted . your widgets.to Java java.util.List will only give you an object of List and not List . Change your code to return List and it should work ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
this-pointer@function-call@71
this-pointer -- this-pointer is a compiler generated pointer during a @placeholder pointing to the object upon which that function gets called .
{ "confidence": [ 45.08553695678711, 44.727439880371094, 43.539756774902344, 43.16680145263672, 42.40354919433594, 42.18642807006836, 41.307315826416016, 40.77406311035156, 40.751136779785156, 40.383514404296875, 39.7468147277832, 39.64404296875, 39.332542419433594, 38.99042892456055, 38.80821990966797, 38.47953796386719, 37.822696685791016, 37.668052673339844, 37.553218841552734, 37.53385925292969, 37.53385925292969, 37.51974868774414, 37.35977554321289, 37.31379699707031, 37.12959289550781, 37.12959289550781, 37.026634216308594, 37.00950622558594, 36.884952545166016, 36.85337448120117, 36.85337448120117, 36.79811477661133, 36.72563552856445, 36.65414810180664, 36.647857666015625, 36.63504409790039, 36.63504409790039, 36.58715057373047, 36.5308723449707, 36.420860290527344, 36.420860290527344, 36.38336181640625, 36.38336181640625, 36.37056350708008, 36.354461669921875, 36.3317756652832, 36.306236267089844, 36.18642044067383, 36.16478729248047, 36.12067413330078, 36.07343292236328, 36.07343292236328, 36.0330924987793, 35.87696075439453, 35.85274887084961, 35.83317947387695, 35.83317947387695, 35.747535705566406, 35.747535705566406, 35.742767333984375, 35.742767333984375, 35.72410583496094, 35.62952423095703, 35.55445861816406, 35.53684997558594, 35.53684997558594, 35.43230438232422, 35.43230438232422, 35.33363342285156, 35.223472595214844, 35.206695556640625, 35.09630584716797, 35.03379440307617, 34.85676574707031, 34.85676574707031, 34.85676574707031, 34.85676574707031, 34.85676574707031, 34.85676574707031, 34.82107162475586, 34.792335510253906, 34.629764556884766, 34.629764556884766, 34.629764556884766, 34.60201644897461, 34.57297134399414, 34.56401443481445, 34.536956787109375, 34.408790588378906, 34.39201354980469, 34.39201354980469, 34.39201354980469, 34.39201354980469, 34.39201354980469, 34.30281448364258, 34.28717803955078, 34.281288146972656, 34.253929138183594, 34.22202682495117, 34.14790344238281 ], "content": [ "This is called a dangling-pointer : a pointer to an object that doesn t exist .", "A pointer to 0 is called a null-pointer and is usually used to indicate that it is not pointing to anything .", "The pointer is pointing to a deleted instance - it is a dangling-pointer .", "Since that object is a pointer itself it will be a pointer to pointer .", "Having said that a reference to a pointer type ref means indicates that you will be modifying the pointer the object which it is pointing to .", "A null-pointer is a pointer that regardless of its type is pointing at the null object which is not any valid object that can be created .", "When I have a pointer or double-pointer in this case pointing to the original object how do I call the member function", "You are confusing const pointer pointer that can t be made to point to a different object and pointer to const pointer to an object that you aren t allowed to change through the pointer .", "It simply passes a pointer to the object the function was called on as a hidden parameter to the function .", "In general You would need to pass a pointer to pointer or pointer to array because you are mutating the input in the called function .", "You should pass pointers by reference if you have to modify the pointer rather than the object that the pointer is pointing to .", "That pointer is called as dangling-pointer and the problem that arises at that time is called as dangling-pointer problem .", "A pointer is a pointer is a pointer .", "A null-pointer constant can be converted to a pointer type the result is the null-pointer value of that type and is distinguishable from every other value of pointer to object or pointer to function type .", "Dangling Pointer and dangling-pointer problem If any pointer is pointing the memory-address of any variable but after some variable has deleted from that memory location while pointer is still pointing such memory location .", "And what if the function called calls free on the pointer", "It is usually called uninitialized pointer .", "It cannot be a dangling-pointer as it is not a pointer .", "However the integer zero when casted to a pointer any pointer really is converted by the compiler to the system-dependent null-pointer .", "You aren t closing the pointer you re closing the object that the pointer points to .", "A dangling-pointer refers to a pointer that points at a no longer valid object .", "In the SDL2 implementation the called function wants to store the pointer and you want it stored in an existing pointer defined by the calling code .", "You are not reusing arr as both a pointer to pointer and as a pointer .", "I would expect dev to be called at this point but it s undefined behaviour as the this-pointer is pointing at an object that has been destroyed .", "The conversion to uint8 t does not affect the float data the pointer is pointing to since only the type of the pointer is converted", "The conversion to uint8 t does not affect the float data the pointer is pointing to since only the type of the pointer is converted", "It could merely be a pointer to a pointer that s passed so that the function can set the pointer value .", "foo isn t an object it is a pointer .", "null-pointer is point to 0x000000 which is incorrect to access pointer while void pointer is a correct pointer to an unspecified type void .", "a pointer to a pointer to a character .", "It means pointer to a pointer .", "Is the pointer to a member function different from a pointer to some other function", "Don t call it a double-pointer - this gets you off on the wrong foot mentally - it is a pointer to a pointer .", "The following code passes to the function modify entry a pointer to an object of type Entry and inside the body of the function a unique-ptr adopts the raw pointer .", "int p is a pointer to a pointer-to-int .", "If want to change double-pointer pass pointer to pointer to pointer .", "What about delete pointer pointer nullptr pointer nullptr delete pointer", "This pointer value can then be passed out of the function if needed unlike the pointer to the pointer which would point to the stack and be invalid when the function returns .", "OS debugger doesn t care where the pointer is pointing to .", "A pointer to a pointer is not a double-pointer .. . that s incorrect and confusing terminology .", "Such pointer is known as dangling-pointer and this problem is known as dangling-pointer problem .", "So if want to change pointer pass pointer to pointer .", "A double-pointer is just a pointer to another pointer .", "A quote from your link : .. . .. . a pointer with no return-type is called a null-pointer .", "- if a function requires a pointer and you pass it a non-pointer then it won t even compile .", "Reading int A as A is a pointer to pointer to int emphasizes that its value is a pointer which is the most significant thing about it .", "As a matter of style I explain a dangling-pointer as a pointer which still exists even though the object it pointed to no longer exists .", "I am trying to modify a static struct object by passing its pointer to another function and modifying it by pointer inside that .", "@SaranyaDeviGanesan The pointer gets passed by value .", "Dangling Pointer .. . .. . If any pointer is pointing the memory-address of any variable but after some variable has deleted from that memory location while pointer is still pointing such memory location .", "this is a pointer", "a pointer to a .", "And the pointer shall points to an object .", "Resulting in a pointer to pointer .", "What about delete pointer pointer nullptr pointer nullptr delete pointer .. . .. . If you delete a pointer that is already null there is no effect .", "So if it takes a pointer call it with a pointer .", "You pass pointer to pointer to init .", "Does such a function result in a dangling-pointer", "When the function returns the pointer is invalid .", "NULL is a valid value for any pointer but there s no object at pointer value NULL .", "Only a Derived pointer can be treated as a pointer to an array object .", "After Load function is called the pointer d fragment code i contains no text .", "None suffices it gets converted to a NULL pointer .", "a pointer pointing to some location not readable accessible by the process .", "@sp2danny : Once the array-to-pointer conversion is performed the Base pointer must be treated as a pointer to a nonarray object .", "I guess this question boils down to : can you convert from single pointer to an object to pointer to a pointer", "end example .. . .. . And from expr.unary.op : .. . .. . The unary operator performs indirection : the expression to which it is applied shall be a pointer to an object-type or a pointer to a function type and the result is an lvalue referring to the object or function to which the expression points .", "For normative text see expr.unary.op : The unary operator performs indirection : the expression to which it is applied shall be a pointer to an object-type or a pointer to a function type and the result is an lvalue referring to the object or function to which the expression points .", "Yes this is confusing because when you pass value of something that is not a pointer it is called pass-by-value and when you pass value of pointer this is called pass-by-pointer .", "is much different from .. . .. . The latter is a pointer to an object and the object cannot be modified using the pointer anyway .", "@user1998844 No it will cast a pointer to int to pointer to double .", "In a const member function the type of this is a const pointer to a const class - type object .", "@Tiana987642 - the so-called workaround is to use reference-counting pointer which is smart shared pointer .", "A null-pointer is a pointer value 0", "if use pointer then pass-by-pointer not by value .", "Remember that the type of a is pointer to pointer to uint8 t .", "An array of arrays is not the same as a pointer to pointer .", "int is a pointer to pointer not a 2D array .", "@Omega delete pointer pointer nullptr .", "Each function activation level has the this-pointer .", "By unwrapping I mean to split it up into a this-pointer and a static function pointer using std : : function : : target for further processing .", "However void pointer can be null-pointer but then unreferencing the pointer will generate error .", "So if you want to modify pointer then you should pass pointer to pointer .", "to combine it with a member pointer and for the pointer use - to combine it with a member pointer .", "A pointer to void can also be null .. . .. . is perfectly valid code and just says that this-pointer is capable of pointing a an untyped object but right now it isn t .", "The double address .. . The double value .. . The pointer address .. . The pointer value pointers hold addresses this should be the address of the double .. . The dereferenced pointer value what the pointer is pointing to the double value .. . 4 .", "is transformed by the compiler to an ordinary function-call : .. . .. . Is the this-pointer a pc or B pc", "I was incorrect it is an array of pointers in which pointer to pointer would work .", "It calculates the object pointer relative to its instruction pointer knowing that the object is at a fixed offset from its own address .", "@PeterClark If it requires a pointer then nothing else but a pointer will suffice .", "making a pointer a null-pointer : int p 0", "The conventional way of writing pointer+cnt is pointer cnt .", "Integer + integer is a different operation and pointer + pointer is nonsense .", "setA doesn t return a pointer it returns the deference of the this-pointer .", "Just setting the pointer to nullptr will cause a memeory leak as there is no way to now delete the memory the pointer was pointing to .", "Pointer arithmetic of void-pointers is also not supported in C . In order to be used with pointer-arithmetic the pointer has to point to object-type which void is not .", "The this -pointer is not a variable it s more like a literal that expands to the address of the object for which the function is called class.this .", "I have a pointer to a pointer to a struct and I don t know how I can scan a double-pointer to the pointer that points to the struct .", "This means that whatever pointer you pass gets referenced and any modification that the function will do to pMemoryPointer will also affect the original passed pointer e.g .", "Then you cast that pointer back to int pointer because b is int and output it ." ] }
{ "confidence": [ 50.13023376464844, 44.77678298950195, 43.854434967041016, 43.49460220336914, 43.357398986816406, 42.827789306640625, 42.73455047607422, 42.63396453857422, 42.491817474365234, 42.40939712524414, 42.19557189941406, 42.17219543457031, 42.09405517578125, 42.05241394042969, 41.72549057006836, 41.650779724121094, 41.61604309082031, 41.51457214355469, 41.46804428100586, 41.44826126098633 ], "content": [ "Question : I am writing a function to load text from shader code file . I have stumbled upon something strange regarding pointers and I cannot figure out why . I have a function named Load . In this function I copy text taken from a file stream in the output variable . Load is called in this way : .. . .. . where d fragment code is a double-pointer of Glchar which is already initialized . After Load function is called the pointer d fragment code i contains no text . I tried to change the signature of the Load function to : .. . .. . and thus passing the pointer by reference . It works after the function is called d fragment code holds correctly the text loaded from the file but I don t understand why a pointer it is to be passed by reference . I thought that passing a pointer only would suffice to change its content . I am confused could you shed some light on it Comment : You don t only change the content you change the pointer here : output new GLchar count .. . Answer : You should pass pointers by reference if you have to modify the pointer rather than the object that the pointer is pointing to . Using double pointers is also a similar case . Here is a more detailed article : .. . http : www.codeproject.com Articles 4894 Pointer-to-Pointer-and-Reference-to-Pointer", "Question : I was experimenting with C++ and found the below code as very strange . I know that the virtual method call crashes because it requires a vtable lookup and can only work with valid objects . I have the following questions .. . .. . 1 . How does the non virtual method say hi work on a NULL pointer 2 . Where does the object foo get allocated Any thoughts Comment : See this http : stackoverflow.com questions 2474018 when-does-invoking-a-member-function-on-a-null-instance-result-in-undefined-behav for what the language says about it . Both are undefined-behavior . .. . Answer : The object foo is a local variable with type Foo . That variable likely gets allocated on the stack for the main function just like any other local variable . But the value stored in foo is a null-pointer . It doesn t point anywhere . There is no instance of type Foo represented anywhere . To call a virtual function the caller needs to know which object the function is being called on . That s because the object itself is what tells which function should really be called . That s frequently implemented by giving the object a pointer to a vtable a list of function-pointers and the caller just knows it s supposed to call the first function on the list without knowing in advance where that pointer points . But to call a non-virtual function the caller doesn t need to know all that . The compiler knows exactly which function will get called so it can generate a CALL machine-code instruction to go directly to the desired function . It simply passes a pointer to the object the function was called on as a hidden parameter to the function . In other words the compiler translates your function-call into this : .. . .. . Now since the implementation of that function never makes reference to any members of the object pointed to by its this argument you effectively dodge the bullet of dereferencing a null-pointer because you never dereference one . Formally calling any function even a non-virtual one on a null-pointer is undefined-behavior . One of the allowed results of undefined-behavior is that your code appears to run exactly as you intended . You shouldn t rely on that although you will sometimes find libraries from your compiler vendor that do rely on that . But the compiler vendor has the advantage of being able to add further definition to what would otherwise be undefined-behavior . Don t do it yourself . Comment : Good answer . Thanks Comment : There also seems to be confusion as to the fact that the function code and the object data are two different things . Have a look at this stackoverflow.com questions 1966920 http : stackoverflow.com questions 1966920 more-info-on-memory-layout-of-an-executable-program-process . The object data is not available after the initialization in this case because of the null-pointer but the code has alsways been available in memory elsewhere . Comment : FYI this is derived from C++11 : 9.3.1 2 : If a non-static member function of a class X is called for an object that is not of type X or of a type derived from X the behavior is undefined . Clearly foo is not of type Foo as it doesn t exist . Comment : Actually in hindsight it s more directly derived from C++11 : 5.2.5 2 : The expression E1- E2 is converted to the equivalent form E1 .E2 and then the obvious UB of dereferencing E1 when it s not a valid pointer inc . C++11 : 3.8 2 . Comment : Can you tell me where you saw this question referenced @Lightness I ve gotten over 20 votes on it in the last day and I d like to see why it s suddenly attracted so much attention .", "Question : What does the OS Debugger do when a pointer is assigned 0 Comment : Hmmm nothing it assigns 0 to the pointer . That s all . It s just used as a convention to know that the pointer is unused and not pointing to anything . Comment : What specifically do you mean Can you provide some source code of what you re trying to understand Comment : Your question s title and your question s body ask different things.. . Comment : It does the hokey pokey and spins itself around Comment : @haylem : strictly interpreting the standard assigning zero doesn t actually require any paritcular state in the pointer except to make it be a null-pointer . a null-pointer should be convertable back to 0 but it could have any possible storage structure . On systems where it s not possible to make an address read from the 0 address be an error it could have some other value hypothetically 0x8c000000 which won t be in ram or rom .. . Answer : A pointer to 0 is called a null-pointer and is usually used to indicate that it is not pointing to anything . This can be checked for by the debugger runtime compiler whatever to be sure you don t have a pointer to invalid data . It s just an explicit recognition that the pointer isn t supposed to be pointing to anything just now .", "Question : I am writing a function to load text from shader code file . I have stumbled upon something strange regarding pointers and I cannot figure out why . I have a function named Load . In this function I copy text taken from a file stream in the output variable . Load is called in this way : .. . .. . where d fragment code is a double-pointer of Glchar which is already initialized . After Load function is called the pointer d fragment code i contains no text . I tried to change the signature of the Load function to : .. . .. . and thus passing the pointer by reference . It works after the function is called d fragment code holds correctly the text loaded from the file but I don t understand why a pointer it is to be passed by reference . I thought that passing a pointer only would suffice to change its content . I am confused could you shed some light on it Comment : You don t only change the content you change the pointer here : output new GLchar count .. . Answer : I thought that passing a pointer only would suffice to change its content . Passing a pointer suffices to change the content of the pointee the thing pointed to . That s great and it has essentially the same effect as passing a reference . But you re not doing that . You want to change the pointer itself . Consider if you wanted to pass an object into a function such that the function altered the original object . Let s call the object s type T and let s pretend that it has a member function mutate that changes it somehow so that we don t have to give a real-world example of this as T changes : .. . .. . Both foo and bar accomplish the same thing using a reference and a pointer respectively . Now we can apply this logic to anything by exchanging various types for T . The scenario that you re thinking of is passing some non-pointer object by pointer to mutate it : .. . .. . But the situation you re actually in calls for T itself to be a pointer and to use foo rather than bar . It s understandable that this is confusing If it helps you could also have written : .. . .. . which is effectively equivalent . disclaimer : I didn t initialise obj in any of those examples . You ll want to . Comment : You might want to point out where the OP is actually changing the pointer itself . It seems they re not aware . Comment : @Angew : I disagree", "Question : Where exactly is the this-pointer stored in memory Is it allocated on the stack in the heap or in the data segment In the above code I am calling the member function add and the receiver object is passed implicitly as the this-pointer . Where is this stored in memory .. . Answer : Other answers have done a very good job explaining how a typical compiler implements this by passing it as an implicit first parameter to the function . I think it s also useful to see what the C++ ISO spec explicitly says about this . According to the C++03 ISO spec 9.3.2 1 : .. . .. . In the body of a nonstatic 9.3 member function the keyword this is a non-lvalue expression whose value is the address of the object for which the function is called . It s important to note that this is not a variable - it s an expression much in the same way that the expression 1 + 2 3 is an expression . The value of this expression is permitted to be stored pretty much anywhere . The compiler might put it on the stack and pass it as an implicit parameter to a function or it might put it in a register and it conceivably could put it in the heap or in the data segment . The C++ specification deliberately gives the implementation some flexibility here . I think that the language-lawyer answer is this is completely implementation-defined and moreover this is technically not a pointer but an expression that evaluates to a pointer . Hope this helps Comment : language-lawyer is an excellent term .", "Question : Here is an example code : .. . .. . ptr that s a dangling-pointer . When I run that program it prints : .. . .. . but it also may cause a segmentation-fault even if only a function which read a memory - getNumber is called . 1 . There is no segmentation-fault when a memory location pointed by ptr is not allocated by other object program right How to explain that Comment : This is called undefined-behavior . Basically anything can happen - literally . I ve seen cases of it which caused values to be treated as both true and false at the same time . Comment : By the way the code you show doesn t sport a dangling-pointer - in the commons sense of the term . It is usually called uninitialized pointer . Dangling pointer is something which was valid sometime ago but not any more . Comment : In C++ there are few reasons to use a pointer at all . Comment : In C++ there are few reasons to use a raw pointer at all . Pointers to allocated memory should be wrapped in resource management classes and code outside of those classes should rarely need raw pointers to allocated memory . Pointers to non-heap memory are still sometimes useful and of course somebody needs to write the resource management classes . .. . Answer : Since ptr is never initialized it may point to anything - code data stack unmapped memory memory that is mapped but not in an in-use range . That is the address in the ptr member variable could contain random leftover data special values generated by the compiler or heap implementation or Reasoning about why you do or do not get a segmentation-fault in these circumstances is not particularly useful or meaningful in most cases . Just don t do that . It s undefined-behavior and can cause arbitrarily unpredictable things to happen . Comment : What s often overlooked : Undefined behavior doesn t just apply to the single statement that causes it but to the program as a whole . If you trigger UB you are left without a single guarantee . Comment : BTW understanding what actually happens in these circumstances can be useful when investigating crashes but the advice of don t do that still applies . And any understanding of what happens will necessarily include it depends on the compiler compiler settings OS surrounding code and many other factors . The results will often vary from run to run .", "Question : I m reading Bjarne s paper : Multiple Inheritance for C++ https : www.google.com url sa t rct j q esrc s source web cd 1 cad rja uact 8 ved 0CCAQFjAAahUKEwiyyr2ZhoTGAhUCd60KHXGxAJI url http 3A 2F 2Fwww.usenix.org 2Fpublications 2Fcompsystems 2F1989 2Ffall stroustrup.pdf ei uZx3VfKJJoLutQXx4oKQCQ usg AFQjCNHPqDyiu0Gc700VQ-3h 98GX0A Ig sig2 RxYvH1CG OR55ZE 3dvulA bvm bv.95039771 d.b2w . In section 3 page 370 Bjarne said that The compiler turns a call of a member function into an ordinary function-call with an extra argument that extra argument is a pointer to the object for which the member function is called . Consider a simple class A : .. . .. . A call of the member function A : : f : .. . .. . is transformed by the compiler to an ordinary function-call : .. . .. . pa is passed as the this-pointer . It s easy to understand for the above example . Consider the following code snippet : .. . .. . Question 1 : .. . .. . A call of the member function A : : f : .. . .. . is transformed by the compiler to an ordinary function-call : .. . .. . Is the this-pointer a pc or B pc Another question is how the compile knows where the member-functions are Let s make the above example more interesting by adding the virtual keyword . A class c object C looks like : .. . .. . C : .. . .. . A call to a virtual function is transformed into an indirect call by the compiler . For example .. . .. . becomes something like : .. . .. . The Bjarne s paper tole me the above conclusion . Question 2 : .. . .. . 1 In the vtbl I believe these function-pointers are assigned during the runtime . How does the compiler know the second function pointer should point to the class B s implementation of the g How the compiler figures it 2 In the above example all members are int and we assume that the compiler assigns 4 bytes memory for the int . What if the member is char does the compiler still assigns 4 bytes memory for the char Or just one byte 3 pc 1 pc 2 the this-pointer here is a pc why not B pc Is there any rule for the passing this-pointer Can anyone help me answer these questions I really appreciate it . I have a deadline tomorrow which is really relative to these problems . Please help Comment : This seems like it s going to take a peek into Clang GCC to get the answers . Comment : Don t use quote formatting for text that isn t quoted .. . Answer : Question 1 : .. . .. . A call of the member function A : : f : .. . .. . .. . C pc new C .. . pc- g int .. . .. . .. . This isn t a call to A : : f . It is a call to B : : g . is transformed by the compiler to an ordinary function-call : .. . .. . Is the this-pointer a pc or B pc Neither . It is a B . Another question is how the compile knows where the member-functions are It doesn t . It knows their names . The linker assigns their addresses . Question 2 : .. . .. . 1 How does the compiler know the second function pointer should point to the class B s implementation of the g How the compiler figures it Because it is C s vtbl and C inherits from B and B has the nearest definition of g . 2 In the above example all members are int and we assume that the compiler assigns 4 bytes memory for the int . What if the member is char does the compiler still assigns 4 bytes memory for the char Or just one byte It depends on the alignment and packing rules of the processor the compiler compiler-options surrounding pragmas etc . 3 pc 1 pc 2 the this-pointer here is a pc why not B pc This supposition contradicts your other question http : stackoverflow.com q 30747633 207421 . It is B . Is there any rule for the passing this-pointer See above . Comment : thanks so much for your answer . I have another question : stackoverflow.com questions 30747633 http : stackoverflow.com questions 30747633 compilers-detail-of-this-pointer Can you please help me take a look at it Comment : For question 2 the function-pointers are pointed to appropriate functions at runtime or at the compile step", "Question : I am trying to explore this-pointer in c++ . I have created a pointer to class object and caling a function to delete the current object but the behavior is unexpected . Why output of the last print statement is x 0 y 6 . Comment : Behavior of deleting this is undefined . At least behavior accessing it afterwards is undefined . Comment : What behavior did you expect Comment : I understood that the behavior is undefined after deleting this-pointer . But why the value is set as x 0 and y 6 .. . Answer : Deleting this is legal which calls the destructor of class .. . .. . However if the object was not allocated using new it will be a Undefined Behavior .. . .. . But you have to be absolutely sure that this will be last member function invoked on this object and none of of your member function after the delete this line gets called through this object since this will become a dangling-pointer which should not be dereferenced . If you do these the behavior will be undefined so can see anything in your output . Comment : thank you so much for the explanation .", "Question : As mentioned in the title I would like to know about the type of this-pointer . I m working on a project and I observed that the type of this-pointer is ClassName const this on windows using VC++ 2008 . Well I would want to know what is the need requirement to make the this-pointer a constant pointer . Thanks . .. . Answer : The type of this-pointer is either ClassName or const ClassName depending on whether it is inspected inside a non-const or const method of the class ClassName . Pointer this is not an lvalue . The observation you mentioned above is misleading . Pointer this is not an lvalue which means that it cannot possibly have ClassName const type i.e . it cannot possible have a const to the right of the . Non-lvalues of pointer type cannot be const or non-const . There s simply no such concept in C++ language . What you observed must be an internal quirk of the specific compiler . Formally it is incorrect . Here are the relevant quotes from the language specification emphasis mine .. . .. . 9.3.2 The this-pointer .. . .. . In the body of a non-static 9.3 member function the keyword this is a prvalue expression whose value is the address of the object for which the function is called . The type of this in a member function of a class X is X . If the member function is declared const the type of this is const X if the member function is declared volatile the type of this is volatile X and if the member function is declared const volatile the type of this is const volatile X . Note : thus in a const member function the object for which the function is called is accessed through a const access path . end note Comment : Exactly what I was expecting . But I do not see that way . the behaviour I m observing is inside a non-const method of the so called ClassName class . Well I get to know the type using the VC++ intellisense which displays the type when you scroll over the variables . Could this be the possible reason why I m getting incorrect type information . Comment : @Purnima : The type information you see is probably restricted to error messages only and to Intellisense and stuff like that . I m sure the core language sees the correct type of this . I.e . if you inspect the type of this using typeid it will not have const to the right of the . Comment : @Andrey : Thank u for the prompt response . I indeed checked using typeid and got the correct type as expected . Comment : I couldn t agree more hmm if there is no C++0x standard . After that this may have a type of rvalue pointer if the object is a tmp obj like ClassName .call . Comment : @Purnima : No . That means that your C++ Primer 4th ed is incorrect . I don t know whether this is a deliberate error for simplification or genuine error in the book but saying that this is a const pointer is always incorrect . Again this is an rvalue of scalar type . Rvalues of scalar type cannot be const or non-const . The fourth edition was published in 2001 which means it is rather old . It probably makes sense to check the later editions . The error might be fixed there .", "Question : i have main class that i like to pass its pointer reference to on of the objects i creating but it gives me error : .. . .. . Error 1 error C2664 : GameController : : GameController GameLayer : cannot convert parameter 1 from GameLayer const to GameLayer .. . .. . what i have in the GameLayer the main object .. . .. . and in the GameController i have this constructor .. . .. . the resone is i need to be able to modify the data in GameLayer from GameController GUI stuff Comment : Why does it need to be a reference I m going to go ahead and bet that it probably doesn t . Comment : this is not a GameLayer . It s either a GameLayer or a const GameLayer depending on the constness of the currently running method . Comment : Also note that instead of a variable you re using the type name itself in the constructor . GameController GameLayer GameLayer shouldn t it be GameController GameLayer gameLayer Comment : Please avoid pointers : GameController GameLayer GameLayer and than m GameController GameController this - this does not address const correctness .. . Answer : First the type of this could be GameLayer const or const GameLayer const depending upon whether the member function is const or not . But it is a const pointer . Having said that a reference to a pointer type ref means indicates that you will be modifying the pointer the object which it is pointing to . Since this-pointer is a constant pointer you cannot assign that to a non-const pointer GameLayer p in the context of references . In case of references to pointer you cannot assign to a reference which will modify the value in this . You cannot assign it to a reference to a non-const pointer GameLayer p but you can assign a reference to a const pointer i.e . GameLayer const p . So changing the constructor to GameController GameLayer const gameLayer should work . But I don t see any use of it here currently . And if you re calling from a const member function then this has the type const const so you will have to change it to GameController const GameLayer const gameLayer . Comment : Since this-pointer is a constant pointer you cannot assign that to a non-const pointer GameLayer p -- Yes you can . Comment : Specifically : the set of all things that can be used to initialize GameLayer is identical to the set of all things that can be used to initialize GameLayer const . The const in that location only affects whether you can assign to p it doesn t affect what you can initialize it with . The difference between initializing GameLayer and initializing GameLayer const is as you say . Comment : @SteveJessop : Yes I agree . But isn t what is written above true Comment : @Uchia : No what you wrote is not all true . The part that is not true is Since this-pointer is a constant pointer you cannot assign that to a non-const pointer GameLayer p but you can assign it to a const pointer GameLayer const p . Comment : @SteveJessop : Could you please point out I am unable to get you .", "Question : I am writing a function to load text from shader code file . I have stumbled upon something strange regarding pointers and I cannot figure out why . I have a function named Load . In this function I copy text taken from a file stream in the output variable . Load is called in this way : .. . .. . where d fragment code is a double-pointer of Glchar which is already initialized . After Load function is called the pointer d fragment code i contains no text . I tried to change the signature of the Load function to : .. . .. . and thus passing the pointer by reference . It works after the function is called d fragment code holds correctly the text loaded from the file but I don t understand why a pointer it is to be passed by reference . I thought that passing a pointer only would suffice to change its content . I am confused could you shed some light on it Comment : You don t only change the content you change the pointer here : output new GLchar count .. . Answer : .. . output new GLchar count .. . .. . .. . This changes what output points to . If you are sure that output already points to a buffer of sufficient size remove this line . Comment : You didn t explain the problem or explain why we pass pointers by reference or explain why the fact that it was a pointer in the first place was insufficient .", "Question : Since std : : function can hold member-functions so it must store a pointer to the object instance somewhere . How can I fetch the this-pointer from a std : : function that holds a member function Comment : Did you take a look at e.g . en.cppreference.com w cpp utility functional function http : en.cppreference.com w cpp utility functional function Comment : @OliCharlesworth . Of course I did . Tell me if I was blind to the answer . Comment : I m pretty sure that this sort of information is deliberately not exposed in the library and thus inaccessible in a portable way . .. . Answer : An object of type std : : function holds a callable object . A pointer to member function is a kind of callable object it can be called with an argument of the appropriate class type plus any additional arguments that it needs . For example : .. . .. . To call it pass an object of type S : .. . .. . Note that the std : : function object does not hold an S object it s only when you call it that the function pointer gets bound to an object . Comment : My goal is to unwrap lambdas I passed as std : : function to another function . How can I do so then By unwrapping I mean to split it up into a this-pointer and a static function pointer using std : : function : : target for further processing . Comment : @danijar : Why don t you put your goal into your question instead Your question makes little sense . Comment : @danijar you can make your own function object which binds a this-pointer and allows retrieval . Comment : @danijar if it s a static function there is no bound object instance . Comment : When I store a lambda expression as std : : function it the this-pointer already bound then", "Question : I m reading this article Virtual method table http : en.wikipedia.org wiki Virtual method table .. . .. . Example in the above article : .. . .. . In the article the author introduces that the memory layout of object d is like this : .. . .. . The question is about d- f2 . The call to d- f2 passes a B2 pointer as a this-pointer so we have to do something like : .. . .. . Why should we pass a B2 pointer as the this-pointer not the original D pointer We are actually calling D : : f2 . Based on my understanding we should pass a D pointer as this to D : : f2 function . update .. . .. . If passing a B2 pointer as this to D : : f2 What if we want to access the members of B1 class in D : : f2 I believe the B2 pointer this is shown like this : .. . .. . It already has a certain offset of the beginning address of this contiguous memory layout . For example we want to access b1 inside D : : f2 I guess in runtime it will do something like : this+4 this points to the same address as b2 which would points b2 in B .. . Answer : We cannot pass the D pointer to a virtual function overriding B2 : : f2 because all overrides of the same virtual function must accept identical memory layout . Since B2 : : f2 function expects B2 s memory layout of the object being passed to it as its this-pointer i.e . the overriding function D : : f2 must expect the same layout as well . Otherwise the functions would no longer be interchangeable . To see why interchangeability matters consider this scenario : .. . .. . B2 : : test needs to make a call of f2 in both scenarios . It has no additional information to tell it how this-pointer has to be adjusted when making these calls . That is why the compiler passes the fixed-up pointer so test s call of f2 would work both with D : : f2 and B2 : : f2 . Other implementations may very well pass this information however multiple-inheritance implementation discussed in the article does not do it . Comment : 1 what do you mean by interchangeable can you explain a little bit more detail 2 If passing a B2 pointer as this to D : : f2 what if we want to access the members of B1 class in D : : f2 For 2 please see the update of the question . Comment : Thanks so much Please verify me . B2 b2 b2.test it s a B2 pointer passed as this to B2 : : test definitely since b2 is a standlone object . For D d d.test the compiler passes the fixup pointer which actually points to the sub-object B2 of D as the this to test since the actually calling function is B2 : : test . If the this does not point to B2 inside D it would cause problems when accessing the members of B2 inside the function B2 : : test . This is why I think we should pass a fixup pointer as this . This example cannot explain the update . Thanks still Comment : For D d d.test I agree we do something like d.test B2 b2 means this points to sub-object B2 of D . However inside B2 : test b2- f2 should execute D : : f2 . Am I right Now the problem becomes what kind of this is passed to b2- f2 Comment : Also consider the common situation of void foo const B2 b2 b2.f2 . Calling foo with an object of type D needs to work but there s no possibility for foo to be able to pass a this-pointer of type D . So the compiler must compile D : : f2 assuming that the this-pointer hidden parameter is to a B2 type . However it can assume that the hidden pointer parameter is pointing to the B2 type that is embedded in a D type . So the function still has access to members of D but must adjust the passed in this-pointer appropriately and automatically . Comment : @FihopZz inside B2 : test b2- f2 should execute D : : f2 You are absolutely right That s precisely the reason why this-pointer passed to test must be that of B2 inside D because test has no way to adjust the pointer for the call of D : : f2 . Therefore it passes its own this regardless of how it was called and it works because both B2 : : f2 and D : : f2 expect an identical layout of what is passed through this-pointer .", "Question : What is this in the following QT function-call I know the background of this in C++ but what is this pointing to in this function-call Comment : Pointer to instance of the class where you call the connect . Comment : there is no this in C and no language called C C++ : . .. . Answer : this points to the current object . The method is called from a member function .", "Question : So I was going through some interview questions an I came across this question http : kyapoocha.com css-interview-questions what-is-a-void-pointer-2 .. . .. . The answer to the question confused me throughly It seems void and null could be used interchangeably according to this question and I don t believe that to be correct . I assumed void to be a return-type and null to be a value . But I am just a code-rookie and am not sure I know right . Hence to all the gurus out there. . If you could shed some light it would be extremely beneficial : .. . .. . Please express your views as to what a null-pointer is and a void pointer is . Not looking for difference between null and void . Also please verify the answer of the question and tell me if that is correct.. . Thanks Comment : It s a bad answer to a bad question and nothing to do with CSS . Ignore it and move on . Comment : Lol actually CSS is a company : P Comment : It s a company that hosts the worst answer to a dumb interviewer question that I ve ever seen . Comment : Link is now dead . .. . Answer : The linked article is simply wrong . Its first sentence : .. . .. . a pointer with no return-type is called a null-pointer .. . .. . is triggering all sorts of alarms for me . This is a highly confused piece of writing . You are almost correct . Pointer to void is a type not a return-type . Values of any type can be returned by functions and thus be the function s return-type . A null-pointer is a pointer that regardless of its type is pointing at the null object which is not any valid object that can be created . A null-pointer can be said to point at nothing . A pointer to void can also be null .. . .. . is perfectly valid code and just says that this-pointer is capable of pointing a an untyped object but right now it isn t . Comment : K thanks for ur affirmation . bTW is there any particular use of a void pointer Comment : @Shouvik A function can accept void arguments . If you re familiar with Java or C it s roughly equivalent to accepting Object . Comment : oh okay.. . see it :", "Question : it might sound stupid.in C++prime 5th edition P258 it says : .. . .. . by default the type of this is a const pointer to the nonconst version of the class type.for example by default the type of this in a Sales data member function is Sales data const . i can understand that for this is a const pointer which means the object it points once initialized cannot change.but then it says : .. . .. . although this is implicit it follows the normal initialization rules which means that by default we cannot bind this to a const object . but i wrote the following codes it was still compiled fine : .. . .. . so my question is : if the compiler can compile it fine whether there is a const or not why does it matter and then the book says : .. . .. . after all the body of isbn doesn t change the object to which this points so our function would be more flexible if this were a pointer to const . and i m wondering what is the flexiblity is would you show me some examples Comment : The book is misleading . this isn t a const pointer . It s a keyword and when evaluated it produces a prvalue of a suitable pointer type . Since it s a prvalue you can t modify it just like you can t say 1 + 2 3 . Comment : You are confusing const pointer pointer that can t be made to point to a different object and pointer to const pointer to an object that you aren t allowed to change through the pointer . Comment : As for the example you want change the first line of your main to const Test a abc 2 and you will note that you can no longer call getint but you can continue to call getstr . Methods that don t change the object should be declared const because then they can be used when given a const object or reference pointer-to a const object . Comment : Your quote specifically says by default the type of this is a const pointer to the nonconst version of the class type .for example by default the type of this in a Sales data member function is Sales data const Comment : you keep typing this which is not a thing . Just plain this please . .. . Answer : For beginners this is often depicted as a constant pointer . However this is actually a prvalue pure rvalue of pointer type . You can t assign anything to prvalues of fundamental type which implies the const-ness of this . The exact type of this depends on the cv-qualification of the method . A rule of thumb is that the cv-qualification is simply prepended to the usual pointer type - i.e . if a method of Class is marked const then the type is const Class . if the compiler can compile it fine whether there is a const or not why does it matter If and only if the pointee type of this is const you can t modify the members of the class . The const -qualifier on methods allows you to distinguish between methods for const objects and methods for non- const ones which is often a necessity .", "Question : I m reading Bjarne s paper : Multiple Inheritance for C++ https : www.google.com url sa t rct j q esrc s source web cd 1 cad rja uact 8 ved 0CB4QFjAAahUKEwj30Mntr4TGAhVJbK0KHZVGAG8 url http 3A 2F 2Fwww.usenix.org 2Fpublications 2Fcompsystems 2F1989 2Ffall stroustrup.pdf ei Z8h3VbeBM8nYtQWVjYH4Bg usg AFQjCNHPqDyiu0Gc700VQ-3h 98GX0A Ig sig2 XB1KwzmY14xMvZig6Wrwjw bvm bv.95039771 d.b2w . In section 3 page 370 Bjarne said that The compiler turns a call of a member function into an ordinary function-call with an extra argument that extra argument is a pointer to the object for which the member function is called . I m confused by the extra this argument . Please see the following two examples : .. . .. . Example 1 : page 372 .. . .. . A class c object C looks like : .. . .. . C : .. . .. . A call to a virtual function is transformed into an indirect call by the compiler . For example .. . .. . becomes something like : .. . .. . The Bjarne s paper told me the above conclusion . The passing this point is C . In the following example Bjarne told another story which totally confused me .. . .. . Example 2 : page 373 .. . .. . Given two classes .. . .. . An object of class C can be laid out as a contiguous object like this : .. . .. . Calling a member function of B given a C : .. . .. . Bjarne wrote : Naturally B : : bf expects a B to become its this-pointer . The compiler transforms the call into : .. . .. . Why here we need a B pointer to be the this If we just pass a C pointer as the this we can still access the members of B correctly I think . For example to get the member of class B inside B : : bf we just need to do something like : this+offset . this offset can be known by the compiler . Is this Right .. . .. . Follow up questions for example 1 and 2 : .. . .. . 1 When it s a linear chain derivation example 1 why the C object can be expected to be at the same address as the B and in turn A sub-objects There is no problem to use a C pointer to access class B s members inside the function B : : g in example 1 For example we want to access the member b what will happen in runtime pc+8 2 Why can we use the same memory layout linear chain derivation for the multiple-inheritance Assuming in example 2 class A B C have exactly the same members as the example 1 . A : int a and f B : int b and bf or call it g C : int c and h . Why not just use the memory layout like : .. . .. . 3 I ve wrote some simple code to test the differences between the linear chain derivation and multiple-inheritance . It shows that pa pb and pc have the same address . Now pc and pa have the same address while pb is some offset to pa and pc . Why the compile make these differences .. . .. . Example 3 : page 377 .. . .. . 1 The first question is about pc- g which relates to the discussion in example 2 . Does the compile do the following transformation : .. . .. . Or we have to wait for the runtime to do this 2 Bjarne wrote : On entry to C : : f the this-pointer must point to the beginning of the C object and not to the B part . However it is not in general known at compile-time that the B pointed to by pb is part of a C so the compiler cannot subtract the constant delta B . Why we cannot know the B object pointed to by pb is part of a C at the compile-time Based on my understanding B pb new C pb points to a created C object and C inherits from B so a B pointer pb points to part of C . 3 Assume that we do not know B pointer to by pb is part of a C at the compile-time . So we have to store the delta B for the runtime which is actually stored with the vtbl . So the vtbl entry now looks like : .. . .. . Bjarne wrote : .. . .. . I m totally confused here . Why B not a C in vt- fct B char pb+vt- delta Based on my understanding and Bjarne s introduction at the first sentence at 5.1 section an 377 page we should pass a C as this here Followed by the above code snippet Bjarne continued writing : Note that the object pointer may have to be adjusted to po int to the correct sub-object before looking for the member pointing to the vtbl . Oh Man I totally have no idea of what Bjarne tried to say Can you help me explain it .. . Answer : It should in theory be that the compiler would take any this s in the code and if refer to the pointer so it knows what the this is referring to . Comment : sorry I do not get it . Can you explain a little bit more detail Comment : Well I have not read his paper and I don t know for sure however I would assume it would be as-if someone was asking What is this you look at him confused what is what Unless that person is grabbing or pointing to something you don t know what he is referring to as this . Therefore my point is that that other argument that you are talking about would be the finger pointing to the object or the hand grabbing the object . I would assume it would be so the compiler could make sense of this . Comment : The question is about what the compiler does not what it can make sense of . Comment : @EJP I ve updated the question a little bit . Ulrich can you help me take a look at it when you have time .", "Question : it might sound stupid.in C++prime 5th edition P258 it says : .. . .. . by default the type of this is a const pointer to the nonconst version of the class type.for example by default the type of this in a Sales data member function is Sales data const . i can understand that for this is a const pointer which means the object it points once initialized cannot change.but then it says : .. . .. . although this is implicit it follows the normal initialization rules which means that by default we cannot bind this to a const object . but i wrote the following codes it was still compiled fine : .. . .. . so my question is : if the compiler can compile it fine whether there is a const or not why does it matter and then the book says : .. . .. . after all the body of isbn doesn t change the object to which this points so our function would be more flexible if this were a pointer to const . and i m wondering what is the flexiblity is would you show me some examples Comment : The book is misleading . this isn t a const pointer . It s a keyword and when evaluated it produces a prvalue of a suitable pointer type . Since it s a prvalue you can t modify it just like you can t say 1 + 2 3 . Comment : You are confusing const pointer pointer that can t be made to point to a different object and pointer to const pointer to an object that you aren t allowed to change through the pointer . Comment : As for the example you want change the first line of your main to const Test a abc 2 and you will note that you can no longer call getint but you can continue to call getstr . Methods that don t change the object should be declared const because then they can be used when given a const object or reference pointer-to a const object . Comment : Your quote specifically says by default the type of this is a const pointer to the nonconst version of the class type .for example by default the type of this in a Sales data member function is Sales data const Comment : you keep typing this which is not a thing . Just plain this please . .. . Answer : According to the C++ Standard 9.3.2 The this-pointer .. . .. . 1 In the body of a non-static 9.3 member function the keyword this is a prvalue expression whose value is the address of the object for which the function is called . The type of this in a member function of a class X is X . If the member function is declared const the type of this is const X if the member function is declared volatile the type of this is volatile X and if the member function is declared const volatile the type of this is const volatile X . As you see there is nothing said that this has type ClassTYpe const of ClassType const const . It is a prvalue that may not be modified as any prvalue except that for a prvalue of a class type you may call non-const member functions. . .. . .. . As for you then you mix two types a constant pointer and a pointer that points to a constant data . For example this declaration .. . .. . does not declare a constant pointer . So the pointer itself may be not initialized . On the other hand thsi declaration .. . .. . declares a constant pointer and the pointer itself shall be initialized as any other constant . As for this quote from your book .. . .. . after all the body of isbn doesn t change the object to which this points so our function would be more flexible if this were a pointer to const .. . .. . Then it means that it would be better to define the function with qualifier const . In this case it could be called for constant and non-constant objects . Otherwise it may be called only for-non constant objects because within the function the pointer type of this is not const ClassTYpe . Comment : It is a prvalue that may not be modified as any prvalue That s only true for prvalues of non-class type so any is wrong . Comment : @Lightness Races in Orbit You may call non-const member-functions for a prvlaue of a class type but you may not change data-members of the class directly . Comment : Correct but you may do so through a call to a member function . To say that you cannot modify the object is plain wrong . Comment : @Lightness Races in Orbit I updated my post . Comment : Lovely jubbly +1", "Question : This question already has an answer here : .. . .. . Why use double-pointer or Why use pointers to pointers questions 5580761 why-use-double-pointer-or-why-use-pointers-to-pointers 14 answers .. . .. . I need to create this function : .. . .. . To do this I must first create this function : .. . .. . This function should upload a file and return if the load was successful . But I fail to understand why using double-pointer . Can you help Comment : Depends on what the function should accomplish . Comment : So you mean why FILE is used Comment : Certainly loadFile is assigning file . Comment : Perhaps with a given filename a search may yield multiple-files The FILE file would allow you to retrieve an array of pointers each pointing to a different file . Comment : or the loadFile function is returning the FILE pointer of the open file . We need to see the source of loadFile .. . Answer : C is a pass-by-value . When you pass a variable to a function it gets copied and a change of that copy will not change the original variable . You can however pass an address of a variable the function will get a pointer to that variable which enables you to change it . Don t forget that a pointer is still a variable and if you want to change a pointer you need a double-pointer . As you can see one did not change .", "Question : What does the OS Debugger do when a pointer is assigned 0 Comment : Hmmm nothing it assigns 0 to the pointer . That s all . It s just used as a convention to know that the pointer is unused and not pointing to anything . Comment : What specifically do you mean Can you provide some source code of what you re trying to understand Comment : Your question s title and your question s body ask different things.. . Comment : It does the hokey pokey and spins itself around Comment : @haylem : strictly interpreting the standard assigning zero doesn t actually require any paritcular state in the pointer except to make it be a null-pointer . a null-pointer should be convertable back to 0 but it could have any possible storage structure . On systems where it s not possible to make an address read from the 0 address be an error it could have some other value hypothetically 0x8c000000 which won t be in ram or rom .. . Answer : Assigning 0 or NULL or whatever is pre-defined for you depending on your imports to a pointer is a general convention used to indicate that : .. . .. . the pointer is unused not pointing to a memory-address of interest .. . and that it should NOT be dereferenced . Comment : This being a c++ question its not quite that.. . actually a pointer that has previously been assigned 0 puts it in a special state called null-pointer which is a feature of the language . generally what s special about a null-pointer is that dereferencing it is a runtime-error which is quite different from any other pointer value that has not been returned by new or has been delete ed which when dereferenced is undefined-behavior which of course could mean anything your hard drive is erased your girlfriend gets pregnant et.cetera this is not a mere matter of convention . Comment : @TokenMacGuy : indeed I stand corrected and did not detail enough +1-ed you already Comment : @TokenMacGuy : dereferencing a null-pointer is undefined-behavior . I ve had programs that ran as expected even though I dereferenced a null-pointer before . Saying it is a runtime-error would be wrong ." ] }
[ "yes-answer-long", "yes-answer-short" ]
function-call
UNK_RELATION
componentone@spreadsheet@194
componentone -- componentone a division of grapecity provide customers with the premier studio of innovative ui controls tools and solutions including deep functionality reporting analysis and @placeholder platforms .
{ "confidence": [ 49.033172607421875, 47.55207061767578, 45.45509338378906, 44.35319137573242, 43.48689651489258, 39.67169189453125, 38.864959716796875, 38.518768310546875, 38.36464309692383, 37.6900749206543, 37.6900749206543, 37.33645248413086, 37.33645248413086, 36.831417083740234, 36.82326889038086, 36.24591064453125, 36.24591064453125, 34.93886184692383, 34.226016998291016, 32.72194290161133, 32.72194290161133, 32.72194290161133, 32.72194290161133, 31.631399154663086, 31.631399154663086, 30.324352264404297, 30.324352264404297, 30.324352264404297, 29.89776611328125, 28.807222366333008, 28.79112434387207, 27.50017547607422, 27.011211395263672, 26.73458480834961, 26.36905860900879, 25.966947555541992, 24.336994171142578, 23.85018539428711, 21.693828582763672, 20.455291748046875, 19.801301956176758, 19.095653533935547, 18.913230895996094, 18.79287338256836, 18.71697998046875, 18.71697998046875, 18.53058433532715, 18.45209503173828, 18.344024658203125, 18.235267639160156, 17.903392791748047, 17.903392791748047, 17.811325073242188, 17.766292572021484, 17.58442497253418, 17.58442497253418, 17.2808895111084, 17.180988311767578, 16.808238983154297, 16.808238983154297, 16.808238983154297, 16.686796188354492, 16.018505096435547, 15.992199897766113, 15.897006034851074, 15.897006034851074, 15.884214401245117, 15.762718200683594, 15.762718200683594, 15.762718200683594, 15.500865936279297, 15.413732528686523, 15.391119956970215, 15.12283706665039, 14.964845657348633, 14.942487716674805, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.895912170410156, 14.609457015991211, 14.503768920898438, 14.410646438598633, 14.164724349975586, 14.100666046142578, 13.673070907592773, 13.38174057006836, 13.315603256225586, 13.043939590454102, 13.017293930053711, 12.713125228881836, 12.438445091247559, 12.438445091247559 ], "content": [ "FPSpread7 for WinForms by ComponentOne Studio .", "I m using Visual Studio 2008 with ComponentOne 2009 .", "Studio for ASP.NET comes under ComponentOne studio enterprise package .", "I m not familiar with componentone-controls but try to cast e.Item.DataItem to DataRowView :", "ComboList in C1FlexGrid in a ComponentOne Studio for Winforms works analogous to ComboList in DatGridView of MS Controls .", "The sample projects for ComponentOne FlexGrid include a Hyperlink sample .", "I posted the query to the ComponentOne Studio team and they said that the UI automation provider is not implemented for their control and is in development pipeline .", "FWIW this is why I never liked ComponentOne controls -- it felt like they were stuck in WinForms mode .", "Specifically ComponentOne VSPDF and VSPRINTER version 8 .", "I looked into this folder C : Program Files x86 ComponentOne Studio for ASP.NET Wijmo to any subfolder available for HTML5 widgets .", "But we are not able to find any HTML5 widgets in C : Program Files ComponentOne Studio for ASP.NET Wijmo .", "ComponentOne FlexGrid for WinForms facilitates users to enter currency values in the columns of the grid .", "I am using a ComponentOne DataTree that is a FlexGrid with child grids .", "Note : Link to the ComponentOne website : http : www.componentone.com", "Am trying to use ComponentOne MVVM style I want to stay away from having to write code-behind .", "I would recommend you to reach the componentone vendors site for quicker response .", "Also enlighten all of us with the answer from ComponentOne Forums by posting here .", "I have a C Windows Phone 8 app with a ComponentOne RichTextBox contorl .", "After installed it we cannot find the related things to wijmo javascripts html5 widgets in C : Program Files x86 ComponentOne Studio for ASP.NET Wijmo folder .", "Please refer ComponentOne HelpCentral for Active Reports http : helpcentral.componentone.com nethelp AR8Help AR8 HelpOnlineEN for topics to get started with ActiveReports .", "I have an MDI application where I m trying to get a list of open windows for a ComponentOne Ribbon Menu .", "So I have a C1TrueDBGrid on my form which is a ComponentOne control and I give the user the option to print the contents of the grid .", "However recently the main shell of the application for which we use ComponentOne RibbonForm has been updated in a big way .", "If not you can also access it via the ComponentOne website http : our.componentone.com samples winforms-hyperlink .", "One of the requirements is to display data in the form of a surface map as per the ComponentOne Chart below .", "Because the clipboard in ComponentOne is global the content changes if a Copy Cut was done in another application and thus the HTML will be different .", "I am trying to figure out how to bind a a combo box to a parent data context from within a ComponentOne FlexGrid .", "I would like to ask how to show routes on my map using WinRT ComponentOne map .", "Updates have been posted to this ComponentOne forum thread http : our.componentone.com groups topic pageheader-containing-special-characters-in-string post-670390 .", "We re using the ComponentOne C1RichTextBox in a plain WPF ListBox .. . C1 WPF components V2014.3 .. . .. . Each ListBoxItem contains just a plain WPF TextBlock and a C1RichTextBox .", "I have a C Windows Phone app with a ComponentOne rich text box as the main content element .", "Please let me know how do we solve such issues generally for creating PDF even if you do not know about componentOne library .", "Support for Migration from Other Reporting Tools .. . .. . 6 .", "You are setting that text to a PageHeader and according to ComponentOne http : helpcentral.componentone.com nethelp truedbgrid8 default.htm pageheaderpropertyprintinfo.htm S is a special character that returns the total number of sub-pages or 1 in your example .", "Should you require further assistance you can post your issue over the GrapeCity support forums http : our.componentone.com groups forum reporting activereports-7 .", "If you are using ComponentOne then try to set .EmbedTrueTypeFonts true see details here http : helpcentral.componentone.com nethelp c1report C1.C1Report.4 C1.C1Preview.Export.C1dExporterBase EmbedTrueTypeFonts.html", "I am creating a PDF using componentOne library to create a PDF in my universal application this is creating a PDF fine for English but when I create a PDF in Arabic it starts giving garbage characters instead of Arabic characters .", "I have a ComponentOne C1DBNavigator and on this line of the code in InitializeComponent .. . .. . it generates the following error .. . .. . A first-chance-exception of type C1.Data.DisabledOperationException occurred in C1.Data.2.dll An unhandled-exception of type C1.Data.DisabledOperationException occurred in C1.Data.2.dll Additional information : Adding a new row is not allowed with current property settings . .. . .. . No property setting change works .", "And if I try to include tools in HTML tab in toolbox all the controls found in the name started with c1 .", "This is what our customers saying .", "Go to the Report menu in Visual Studio .", "Studio for WinRT XAML 8.1 6.Studio for windows-phone 7.Studio for compact-framework .", "To add an ActiveReport to the Visual Studio project .. . .. . Create a new Visual Studio project .", "There are three controls in the datagrid cell .", "I can use the c1 controls for ASP.NET applications .", "We are able to access c1 controls for ASP.NET .", "It shows a below list during install 1.Studio for winforms v2 2.Studio for WPF 3.Studio for Silver light 4.Studio for ASP.Net wijmo 5 .", "Open the CPL report in Design View inside Visual Studio .", "In fact it is an important and widely used functionality of C1FlexGrid . .. . .. . The ComboList property of C1FlexGrid enables this functionality .", "Thanks for the answer but in the end as I know the position of each group I chose to add all the controls programmatically in the ReportStart event .", "It seems like wijmo javascripts html5 widgets belongs-to Studio for ASP.Net of Studio enterprise package .", "8.Studio for Activex 9.OLAP for winforms 10.Studio for LightSwitch 11.Intellispell 12 . xap optimizer .", "Simple and lightweight report controls allow you to easily create dazzling reports .", "Actually Spread is a very complex control and supporting UI automation in such complex controls requires a special custom property provider DLL .", "Visual Studio Integrated Design Time Support .. . .. . 5 .", "The Studio for ASP.Net wijmo can be used for .Net .", "You can try implementing a custom extension to provide custom property classes for controls .", "Is it possible to implement this functionality : .. . .. . Mix code sets in the 128 bar code .", "I have installed the Studio for ASP.NET wijmo with license activated .", "Wijmo widgets come under the Studio for ASP.NET package but these are jQuery based widgets .", "what my question is we have a license for Component One Studio Enterprise .", "Multiple Report Types to Fit Your Reporting Needs : Fixed Page Layout provides developers with a new way of creating reports where layout is the primary focus .", "Provide a zipped sample and you would get the response .", "I think it would be better if you send in your report or a small sample to ActiveReports forums here : arhelp.grapecity.com groups forum reporting activereports-8 http : arhelp.grapecity.com groups forum reporting activereports-8 Some details about your use-case would also help in determining the right approach .", "ASP.NET MVC Tools 2 . bin 3 . c1excel etc. . and not any folders for HTML5 widgets .", "I am in the process of replacing old Component One data tools with out of the box funtionality .", "We use Nevron for our Charts and Infragistics for our UI components .", "Now how should we mapped the wijmo widgets downloads with our existing Studio enterprise license in order to implement in production", "Can we use component one studio enterprise to create stand alone HTML5 web application", "Studio for ASP.NET Wijmo includes Wijmo widgets which you can use for HTML5 application .", "ActiveReports operates -like other report engines- on the premise that report width is fixed and the controls grow vertically only .", "I have not worked with the controls just guessing based on docs .", "Now I ve come across a method which uses C1.Data.SimpleTableRow and I can t find any equivalent method to replace the functionality .", "Replied at stackoverflow.com questions 25750812 http : stackoverflow.com questions 25750812 cannot-find-wijmo-grid-wijgrid-control-on-component-one-studio-enterprises-stu", "And in the off chance that anyone has what solutions have you come up with", "ChartFX for .NET http : www.softwarefx.com sfxNetProducts ChartFX - Gallery of available charts http : www.softwarefx.com sfxGallery including 3D surface .. . 2 .", "I was able to figure out from their samples how to use data-binding to bind data from the ViewModel onto the view .", "In my case I want want to display multiple data series using one common axes .", "It looks like Plot Area does exactly that .", "But am unable to figure out the xaml that needs to be written to accomplish that .", "All the examples I have seen involves adding code in code-behind .", "Any ideas", "Thanks Kay", "Figured it out I can do something like this .. . .. . And on my view model ChartView is property of type ChartView to which I can add plot areas .. . .. . Thanks Kay", "What am I missing here", "Hi Satish did you ever find a solution for this problem", "I think you have answered your own question while it is completly possible to create such an app with Phonegap Apple isn t going to approve an app that doesn t have functionality when running unconnected though how much functionality with Apple is never clear .", "it shows ASP.NET MVC tools bin c1pdf and etc. . How can we use the things of wijmo javascripts html5 widgets in our HTML5 applications from the insatlled machine if the machine already had license activated .", "Run Visual Studio Developer Command Prompt as Administrator .. . 2 .", "Although the tools UISpy and Inspect.exe show the spread as part of the automation tree however the rows and the columns within the spread are not visible in these tools .", "As far as whether or not accessing the view from a viewmodel is compliant with MVVM theories -- technically it is not but sometimes you are forced to use controls that just cannot be automatically configured through XAML and you can t use the View s code-behind because of one reason or another .", "Instead of using the built-in C1 Printing functionality I was able to write some code to force bitmap printing .", "We can t now go around uninstalling security updates on customers computers.. . .. . .. . We have narrowed it down to an environmental problem but have no idea what to do next.. .", "My Client wants a native iPhone App that displays their mobile site optimized for iPhone developed using asp.net and ComponentOnes Studio for iPhone http : www.componentone.com SuperProducts StudioiPhone .", "UI Automation is much lower than .NET it s provided by Windows itself .", "The old spreadsheet uses CellTypeButton extensively but Spread for WTF doesn t provide this cell type .", "Note that F being a functional language and hence typically used for mathematical and scientific applications it is likely to be an excellent option for any functionality related to graph plotting - you may even want to consider writing the portion of program that does plotting in the language especially if it gets relatively complex .", "I am unable to spot documentation on adding a page header and or page footer to a Continuous Page Layout report .", "How is this done" ] }
{ "confidence": [ 54.31893539428711, 50.00999450683594, 48.42768478393555, 43.277435302734375, 42.12863540649414, 42.031593322753906, 40.75398254394531, 39.02191925048828, 39.00285339355469, 39.00285339355469, 38.534996032714844, 38.4072380065918, 37.225616455078125, 35.29786682128906, 35.289554595947266, 35.132240295410156, 34.81610107421875, 33.96973419189453, 33.712093353271484, 33.27806854248047 ], "content": [ "Question : I have been working on White Framework to automate the User Interface for one of my application build using WinForms . The application also uses a Third Party Control i.e . FPSpread7 for WinForms by ComponentOne Studio . Although the tools UISpy and Inspect.exe show the spread as part of the automation tree however the rows and the columns within the spread are not visible in these tools . I posted the query to the ComponentOne Studio team and they said that the UI automation provider is not implemented for their control and is in development pipeline . So is there any other way that I could automate this specific control Or is it possible to create a proxy provider for it or for any third party control for that matter using which I can automate the control Note : Link to the ComponentOne website : http : www.componentone.com Comment : In the general case you can t . For example suppose I write a super-secure control that displays protected information banking military etc . I don t want anyone to be able to automate anything form it . For specific cases it may be possible using various hacks and trics but if you see nothing in UISpy nor Inspects odds are it s probably not possible . Comment : So apart from UIAutomation Framework provided as part of .Net which is consumed by White Framework as well is there any other tool framework which I can look at that might help in such a scenario Comment : Or there is nothing that I can do except to wait for the development team of WinSpread to provide the required support for it . Comment : UI Automation is much lower than .NET it s provided by Windows itself . I don t think there s much to do at this stage if WinSpread doesn t provide anything . For example let s suppose what WinSpread does is only drawing unstructured bitmaps on the screen the only solution would be to write something that recognizes these bitmaps . This is the kind of limitation that one should take in account when choosing 3rd parties IMHO . Comment : Thanks for the information . i ll check if I can work something out with bitmaps . .. . Answer : Actually Spread is a very complex control and supporting UI automation in such complex controls requires a special custom property provider DLL . You can try implementing a custom extension to provide custom property classes for controls . Please check following MSDN article for more information : https : msdn.microsoft.com en-us library hh552522.aspx", "Question : Can we use component one studio enterprise to create stand alone HTML5 web application It seems like wijmo javascripts html5 widgets belongs-to Studio for ASP.Net of Studio enterprise package . After installed it we cannot find the related things to wijmo javascripts html5 widgets in C : Program Files x86 ComponentOne Studio for ASP.NET Wijmo folder . it shows ASP.NET MVC tools bin c1pdf and etc. . How can we use the things of wijmo javascripts html5 widgets in our HTML5 applications from the insatlled machine if the machine already had license activated . .. . Answer : Yes you can use Wijmo widgets to create HTML5 web application and can refer to the following link for more details : http : wijmo.com http : wijmo.com 5 Comment : Thanks Ashish . what my question is we have a license for Component One Studio Enterprise . It shows a list during install that Comment : Thanks Ashish . what my question is we have a license for Component One Studio Enterprise . It shows a below list during install 1.Studio for winforms v2 2.Studio for WPF 3.Studio for Silver light 4.Studio for ASP.Net wijmo 5 . Studio for WinRT XAML 8.1 6.Studio for windows-phone 7.Studio for compact-framework . 8.Studio for Activex 9.OLAP for winforms 10.Studio for LightSwitch 11.Intellispell 12 . xap optimizer . Anyone among the above list can use to create HTML5 application . The Studio for ASP.Net wijmo can be used for .Net . As like anything can use for HTML5 Comment : Studio for ASP.NET Wijmo includes Wijmo widgets which you can use for HTML5 application . Here is the link : componentone.com SuperProducts StudioASPNET http : www.componentone.com SuperProducts StudioASPNET Comment : Thanks Ashish . Studio for ASP.NET comes under ComponentOne studio enterprise package . We have installed and activated license . We are able to access c1 controls for ASP.NET . But we are not able to find any HTML5 widgets in C : Program Files ComponentOne Studio for ASP.NET Wijmo . So Where we can get the widget grid control for HTML5 I want to include the HTML5 widget control from the Tool box . So how to include the widgets in toolbox Comment : Replied at stackoverflow.com questions 25750812 http : stackoverflow.com questions 25750812 cannot-find-wijmo-grid-wijgrid-control-on-component-one-studio-enterprises-stu", "Question : I have installed the Studio for ASP.NET wijmo with license activated . I can use the c1 controls for ASP.NET applications . Now I wish to use the wijgrid and other widgets for HTML5 application . I looked into this folder C : Program Files x86 ComponentOne Studio for ASP.NET Wijmo to any subfolder available for HTML5 widgets . But I can see only the folders 1 . ASP.NET MVC Tools 2 . bin 3 . c1excel etc. . and not any folders for HTML5 widgets . And if I try to include tools in HTML tab in toolbox all the controls found in the name started with c1 . I searched in the internet it seems for wijmo grid widget we have to use wijmo.grid.wijgrid namespace . In which folder we get the HTML5 widgets and how to include in HTML5 application Thanks . .. . Answer : Wijmo widgets come under the Studio for ASP.NET package but these are jQuery based widgets . hence you won t see them in toolbox . You can download the from the following link http : wijmo.com downloads .. . .. . and start creating widgets with the help of following link : http : wijmo.com docs wijmo webframe.html Grid.html Comment : Thanks . We got a workable solution with dynamic data with wijgrid . Now how should we mapped the wijmo widgets downloads with our existing Studio enterprise license in order to implement in production", "Question : I am in the process of replacing old Component One data tools with out of the box funtionality . Now I ve come across a method which uses C1.Data.SimpleTableRow and I can t find any equivalent method to replace the functionality . The method in question looks similar to this : .. . .. . My first thought was to replace it with the TableRow class but TableRow has no DataRow property . Since I can t find any documentation to SimpleTableRow I am at a total loss here . How would I need to refactor this snippet so I do not have to use the C1 assembly here Comment : Try to cast e.Item.DataItem to DataRowView . Comment : C1 documentation referencing SimpleTableRow : helpcentral.componentone.com nethelp c1data http : helpcentral.componentone.com nethelp c1data C1.Data.2 C1.Data namespace hierarchy.html Comment : @TimSchmelter DataRowView was correct . Mind adding your comment as an answer so I can accept it .. . Answer : I m not familiar with componentone-controls but try to cast e.Item.DataItem to DataRowView :", "Question : null .. . Answer : I have a ComponentOne C1DBNavigator and on this line of the code in InitializeComponent .. . .. . it generates the following error .. . .. . A first-chance-exception of type C1.Data.DisabledOperationException occurred in C1.Data.2.dll An unhandled-exception of type C1.Data.DisabledOperationException occurred in C1.Data.2.dll Additional information : Adding a new row is not allowed with current property settings . .. . .. . No property setting change works . What am I missing here Comment : Hi Satish did you ever find a solution for this problem", "Question : I am using Component one FlexGrid in my silverlight Application and it is autogenerating columns in the grid . I want to make one of the column s data behave as a clickable hyperlink . Any help on this problem would be greatly appreciated . .. . Answer : The sample projects for ComponentOne FlexGrid include a Hyperlink sample . Should be part of your installed items . If not you can also access it via the ComponentOne website http : our.componentone.com samples winforms-hyperlink . Essentially you set up a style for the hyperlink cells columns and apply it . You can use OwnerDrawCell events to do it as the example shows .", "Question : I have used the below mentioned snippet to show text with image . However I am unable to display image with it . Is the path to image not accessible from code Comment : Not sure if Resources directory is accessible to your code . Try using var currentDirectory Directory.GetCurrentDirectory Comment : hi Nilay Vishwakarma this code worked for me offcourse we can use genral path like c : temp resource images Comment : I would recommend you to reach the componentone vendors site for quicker response . http : our.componentone.com groups . Provide a zipped sample and you would get the response . Also enlighten all of us with the answer from ComponentOne Forums by posting here . Comment : What was the error here Comment : it was not showing image only text was displaying .. . Answer : Please refer this . Answer posted by OP Comment : @Deepthi Krishna - you can answer your own question by posting an answer . But don t do it in the description . Comment : @AndreyPopov It seems like OP is banned from posting answers and question . Refer comments in the question post Comment : hi @AndreyPopov am in ban zone so i can t post", "Question : null .. . Answer : I am creating a PDF using componentOne library to create a PDF in my universal application this is creating a PDF fine for English but when I create a PDF in Arabic it starts giving garbage characters instead of Arabic characters . This looks like an encoding issue to me . Please let me know how do we solve such issues generally for creating PDF even if you do not know about componentOne library . I might pick the clue . EDIT : Download Stripped down code : .. . .. . http : 1drv.ms 1ABAuqi .. . .. . Code : .. . .. . What printed in document in case of Arabic http : i.stack.imgur.com AF1jw.jpg Comment : Please give an example of your code and output . Comment : edited the question. . please check", "Question : So I have a C1TrueDBGrid on my form which is a ComponentOne control and I give the user the option to print the contents of the grid . When printed I include a header with some text . This is my code for printing : .. . .. . txtDirectory.Text as I m sure you can imagine contains the path for a directory which includes back-slashes . What actually got printed turned the instances of S into 1 . For example : txtDirectory.Text Server02 Users Me J Star .. . .. . page that got printed 1erver02 Users Me J1tar .. . .. . Is S a printer command for 1 or something Is there a list somewhere of what all such commands are if that s the case Either way how do I get it to print the actual text Thank you .. . Answer : You are setting that text to a PageHeader and according to ComponentOne http : helpcentral.componentone.com nethelp truedbgrid8 default.htm pageheaderpropertyprintinfo.htm S is a special character that returns the total number of sub-pages or 1 in your example . You will need to double-escape any of the characters in the list on that page . Comment : Thank you for finding that Noob question though - I ll need to double-escape those kinds of characters...how exactly Comment : It would appear that C1 has not employed an obvious way to escape the characters . Monitor this forum post http : our.componentone.com groups topic pageheader-containing-special-characters-in-string for a possible solution .", "Question : So I have a C1TrueDBGrid on my form which is a ComponentOne control and I give the user the option to print the contents of the grid . When printed I include a header with some text . This is my code for printing : .. . .. . txtDirectory.Text as I m sure you can imagine contains the path for a directory which includes back-slashes . What actually got printed turned the instances of S into 1 . For example : txtDirectory.Text Server02 Users Me J Star .. . .. . page that got printed 1erver02 Users Me J1tar .. . .. . Is S a printer command for 1 or something Is there a list somewhere of what all such commands are if that s the case Either way how do I get it to print the actual text Thank you .. . Answer : Updates have been posted to this ComponentOne forum thread http : our.componentone.com groups topic pageheader-containing-special-characters-in-string post-670390 . So what I did was to simply assign the string I want to print to a variable printText and then replace those special-characters accordingly : .. . .. . Just note that the t is not yet working like the others...they are looking into it . Thanks @DonBoitnott for the original link", "Question : Am trying to use ComponentOne MVVM style I want to stay away from having to write code-behind . I was able to figure out from their samples how to use data-binding to bind data from the ViewModel onto the view . In my case I want want to display multiple data series using one common axes . It looks like Plot Area does exactly that . But am unable to figure out the xaml that needs to be written to accomplish that . All the examples I have seen involves adding code in code-behind . Any ideas Thanks Kay .. . Answer : Figured it out I can do something like this .. . .. . And on my view model ChartView is property of type ChartView to which I can add plot areas .. . .. . Thanks Kay", "Question : We are investigating alterntive control libraries for a new project we are working on . One of the requirements is to display data in the form of a surface map as per the ComponentOne Chart below . alt text http : i.stack.imgur.com 83QXo.jpg .. . .. . We ve used the C1 control in the past but are not entirely happy with it - so wondered if anyone can recommoned some alternatives . Having some trouble finding any so all help appreciated . NB : This is a .NET 3.5 WinForms application .. . Answer : You might also want to try : .. . .. . Telerik Chart http : www.telerik.com products winforms chart.aspx .. . DevExpress Chart http : www.devexpress.com Products NET Controls Charting .. . Perpetuum Software Chart ModelKit http : www.perpetuumsoft.com Product.aspx lang en pid 42 .. . Infragistics NetAdvantage WebChart http : www.infragistics.com dotnet netadvantage winforms winchart.aspx Overview Comment : Did not you read the question - In need of a surface chart . None of these have a surface chart .", "Question : We are investigating alterntive control libraries for a new project we are working on . One of the requirements is to display data in the form of a surface map as per the ComponentOne Chart below . alt text http : i.stack.imgur.com 83QXo.jpg .. . .. . We ve used the C1 control in the past but are not entirely happy with it - so wondered if anyone can recommoned some alternatives . Having some trouble finding any so all help appreciated . NB : This is a .NET 3.5 WinForms application .. . Answer : Here are some commercial providers that have the type of chart you re looking for : .. . .. . 1 . ChartFX for .NET http : www.softwarefx.com sfxNetProducts ChartFX - Gallery of available charts http : www.softwarefx.com sfxGallery including 3D surface .. . 2 . Nevron Chart for .NET http : www.nevron.com Products.ChartFor.NET.Overview.aspx - Gallery of available surface charts http : www.nevron.com Gallery.ChartFor.NET.ChartTypes.GridSurfaceChartGallery.aspx", "Question : How to allow editing the value in the combolist of C1FlexGrid in vb10 Is it not okay to type the value in the combolist of c1 flex grid I am using the following snippet Comment : It is okay for me to type the data in the combolist property.The code is.... . GridComboTransferStr dbRow RSPrice1 Trim GridComboTransferStr i got the solution from helpcentral.componentone.com nethelp c1flexgrid http : helpcentral.componentone.com nethelp c1flexgrid C1.Win.C1FlexGrid.4 C1.Win.C1FlexGrid.C1FlexGridBase ComboList.html quot .. . Answer : ComboList in C1FlexGrid in a ComponentOne Studio for Winforms works analogous to ComboList in DatGridView of MS Controls . ComboList can be editable in C1FlexGrig in VB10 . In fact it is an important and widely used functionality of C1FlexGrid . .. . .. . The ComboList property of C1FlexGrid enables this functionality . It specifies the type of editor to be used when editing a cell . You may use a text box drop-down list drop-down combo or an edit button to pop-up custom editor forms . To use the ComboList property set the AllowEditing property to true and respond to the BeforeEdit event by setting the ComboList property to a string that describes the type of editing you want to use for that cell . The options are described below : .. . .. . To edit the cell using a regular text box set the ComboList property to an empty string . For example : .. . .. . flex.ComboList string.Empty .. . .. . To edit the cell using a drop-down list set the ComboList property to a string containing the available options separated by pipe characters . For example : .. . .. . flex.ComboList Item 1 Item 2 Item 3 .. . .. . To edit the cell using a drop-down combo set the ComboList property to a string containing the available options separated by pipe characters and starting with a pipe character . For example : .. . .. . flex.ComboList Item 1 Item 2 Item 3 .. . .. . To display an edit button set the ComboList property to a string containing an ellipsis .. . . Edit buttons look like regular push buttons aligned to the right of the cell with an ellipsis as a caption . When the user clicks on the edit button the grid fires the CellButtonClick event . In this case the user can t edit the cell contents directly . For example : .. . .. . flex.ComboList .. . .. . .. . To display an edit button next to an editable cell set the ComboList property to a string containing a pipe and an ellipsis .. . . In this case you get a regular edit button but the user can also edit the cell contents directly . For example : .. . .. . flex.ComboList .. . .. . .. . Example : .. . .. . The code below handles the BeforeEdit event and assigns a value to the ComboList property so that the grid displays buttons on every other row .", "Question : We are investigating alterntive control libraries for a new project we are working on . One of the requirements is to display data in the form of a surface map as per the ComponentOne Chart below . alt text http : i.stack.imgur.com 83QXo.jpg .. . .. . We ve used the C1 control in the past but are not entirely happy with it - so wondered if anyone can recommoned some alternatives . Having some trouble finding any so all help appreciated . NB : This is a .NET 3.5 WinForms application .. . Answer : I would recommend using Scinet Chart from http : www.obacs.com . It has quite many charting options and much cheaper compared to alternatives .", "Question : I m having troubles to assign a datasource to a code-generated c1report . This is the datatable data http : www.subirimagenes.net i 150608045844330759.png . This is the output result pdf view http : www.subirimagenes.net i 150608045845234354.png . I m using Visual Studio 2008 with ComponentOne 2009 . The result pdf file as not the correct data only the titles repeated to bottom . Then this is the vb code : Comment : I m using this tutorial helpcentral.componentone.com nethelp c1report http : helpcentral.componentone.com nethelp c1report step1of4creatingarep.html Comment : DataTables are not enumerable . It would be best to convert it to a table format that works with C1Report I m not sure off the top of my head what that would be . I use C1Preview and with that it s a RenderTable ...possible a DataView and then make the DataView the source . .. . Answer : I think the issue is because you ve set the Calculated property of the fields added in the Detail section to False . You need to set it to True in order to bind data to the fields . Comment : thanks @AbdiasM works fine Comment : I m glad I could help :", "Question : My main report includes a subreport in the detail section . This subreport is designed as follow : .. . .. . Now my problem is that with this configuration when the second column is printed instead of adding a new group under the first printed column on the left of the page it creates a new page even if there is enough space to print the group on the same page . How can I make the next group print on the same page in the first column enter image description here http : i.stack.imgur.com 4WqFF.png .. . .. . I m using ActiveReports 7.1.7572 . Thanks . .. . Answer : It seems that the issue is being caused due to the setting of GroupKeepTogether property . If you will check the details about this property here http : helpcentral.componentone.com nethelp AR7Help OnlineEn GrapeCity.ActiveReports.v7 GrapeCity.ActiveReports.SectionReportModel.GroupHeader GroupKeepTogether.html you will notice that enabling this property attempts to fit the groupheader and its footer on the same page . If they do not fit then it moves the complete section to the next page . I tested this issue by creating a similar report but unfortunately could not reproduce the issue . Should you require further assistance you can post your issue over the GrapeCity support forums http : our.componentone.com groups forum reporting activereports-7 . Comment : Thanks for the answer but in the end as I know the position of each group I chose to add all the controls programmatically in the ReportStart event .", "Question : null .. . Answer : I am trying to figure out how to bind a a combo box to a parent data context from within a ComponentOne FlexGrid . I saw Tyler s question http : stackoverflow.com questions 29483761 winrt-xaml-databinding-how-to-bind-to-a-property-to-the-parents-data-context-w and tried this but when I run my WinRT app the combo box is empty . I was able to get it working by setting my ViewModel as a static resource on the page but I am unclear if there are any negative implications to doing this instead of setting the Page.DataContext . Any help would be appreciated . Working Example : .. . .. . And", "Question : null .. . Answer : I have a C Windows Phone 8 app with a ComponentOne RichTextBox contorl . How do I get the selected HTML that corresponds to the current value of a RichTextBox control s SelectedText property the current selection .. . .. . For example suppose I have the current HTML in the RichTextbox : .. . .. . And the user selects Some text and italicized text by tapping . The SelectedText property will be some text italicized text and what I want to back as the selected HTML is : .. . .. . Is there a way to do this without doing some really messy operation walking the HTML while accumulating tags until the accumulated text matches the SelectedText property Comment : have you tried rtb.GetTextRange rtb.SelectionStart rtb.SelectionLength .Html Comment : @ShawnKendrot I just tried that after highlighting some text and it returned the entire HTML document HTML .. . HTML . Comment : or rtb.Selection.Html Comment : @ShawnKendrot Same thing . It looks like they didn t enhance the Html property to be constrained by the current selection . Comment : That s what the TextRange is suppose to be a range of text.. . I have not worked with the controls just guessing based on docs . Can you debug and get any info from the TextRange object by opening it up", "Question : I started using ComponentOne s C1FlexGrid for my WPF Caliburn.Micro application . I wonder how I can set with of the columns to the maximum contents width . I tried to make it Auto but the width is still the same for all columns . I applied AutoSizeColumns like this : .. . .. . but this didn t help.. . Thanks Comment : changed this to be an answer .. . Answer : Using GridLength.Auto usually doesn t work for these column widths because of virtualization . FlexGrid has a couple methods to autosize the columns but the columns must be visible or they won t be calculated and will remain the static width . Here https : gist.github.com f5bdb54009b71466d271 is a very non-production-worthy example of how to do this . FWIW this is why I never liked ComponentOne controls -- it felt like they were stuck in WinForms mode . edit : Adding some code for CM-specific usages . As far as whether or not accessing the view from a viewmodel is compliant with MVVM theories -- technically it is not but sometimes you are forced to use controls that just cannot be automatically configured through XAML and you can t use the View s code-behind because of one reason or another . Comment : Thank you for your answer . But as I use Caliburn.Micro without code-behind is it possible to do it in xaml Comment : Although it deviates slightly from the loosely-coupled MVVM pattern you can still access your View from your ViewModel . CM supports this by passing in the View object in OnViewAttached or OnViewLoaded . Override one of these which best suits your needs and capture that instance of your View . Then you can access your FlexGrid by name . I will edit this response with some code . Comment : Skipped over your actual question in that comment -- it does not appear to be possible according to their documentation and rumblings on the internet . This is a fairly common issue with datagrids unfortunately . Comment : I tried it see my updated question but because of some reason it didn t work . I wonder why.. . Comment : @DavidShochet Try OnViewLoaded the columns might not be visible yet a requirement for this method to work ." ] }
[ "yes-answer-long", "yes-answer-short" ]
spreadsheet
UNK_RELATION
grunt-includes@php@79
grunt-includes -- a grunt task for including a file within another file think @placeholder includes .
{ "confidence": [ 58.97507858276367, 58.392818450927734, 56.73600769042969, 49.02437210083008, 42.666595458984375, 37.54828643798828, 35.318626403808594, 34.77730178833008, 32.503517150878906, 32.503517150878906, 32.31529235839844, 31.171302795410156, 30.131465911865234, 28.662490844726562, 28.307540893554688, 27.304933547973633, 22.02971076965332, 21.4877872467041, 20.60112190246582, 20.20807456970215, 19.0638370513916, 18.04396629333496, 18.04396629333496, 17.691022872924805, 16.221038818359375, 16.221038818359375, 16.221038818359375, 16.221038818359375, 16.221038818359375, 16.221038818359375, 16.221038818359375, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262, 14.036211967468262 ], "content": [ "I m using includes https : github.com vanetix grunt-includes with newer grunt plugin to combine html files .", "All of my other tasks run including the grunt-includes but not this one .", ".. . .. . edit to add : .. . .. . I had success for my very basic use-case using a different grunt task called appropriately grunt-includes https : github.com vanetix grunt-includes .", "When I m adding a string to the grunt-include-replace https : github.com alanshaw grunt-include-replace includes like shown below I get an unexpected token error in the console and the html file doesn t compile .", "All HTML is in the path src html with the includes being in a subfolder called includes : src html includes .", "How can it be done in grunt-include-source", "In grunt-contrib-copy there s a way to exclude files and folder .", "I m having problems with getting the newer plugin to work right with includes .", "I have looked at the docs and examples for grunt-html-build https : github.com spatools grunt-html-build and I m somehow coming up short .", "However I m still interested in the power for grunt-html-build questions tagged grunt-html-build for conditionally building dev or distribution packages .", "I tried to using the grunt-include-source plugin but not working .. . .. . index.html .. . .. . In Gruntfile.js .. . .. . in index.html .. . .. . my final index.html will be", "In the interest of DRY code I would like to do includes for the header and footer content .", "Note : I have considered using grunt-contrib-concat questions tagged grunt-contrib-concat instead but without globbing I would have to make 3 separate tasks to keep the unique content intact .", "Heres part of my gruntfile.js : .. . .. . If you would like to see the full grunt file just go to my github repo https : github.com aguynamedirvin F-C blob master Gruntfile.js", "Target dist here is mandatory - I guess grunt-html-build documentation has some issues .", "Here s the main sample I sourced : github.com spatools grunt-html-build blob master docs https : github.com spatools grunt-html-build blob master docs sections.md which shows that it doesn t HAVE to have a target .", "I would like for it to just compile the changed file .", "I think there are problems with the special-characters .", "The terminal console gives the following output : running includereplace : all includereplace task Processing app src index.html Warning : Unexpected token Use --force to continue .", "There is some sort of conflict within my fuller Gruntfile then .", "My first step was to strip out everything inside the initConfig object EXCEPT the htmlbuild task.. . and it works", "How to exclude files or folder .", "Read and include the mentioned css js files from Gruntfile.js .", "I have the newer task in my watch config which is suppose to combine only the html that has changed but instead it compiles all of them instead of just the one that changed .", "How can I make those characters work in the string", "Try with this : li a href home a li Btw usually the unexpected token error in Chrome says afterwards the character that breaks the thread .", "Something like this : Unexpected token . If you get that please post it .", "This is a JSON error .", "I solved the problem with escaping the quotes by adding backslashes .", "@@include components navigation.html list-elements : li a href home a li", "Please post that as an answer and mark it accepted .", "I have an application that has 3 pages which I would like to be self-contained .", "Here is the HTML sample : .. . .. . And then in my gruntfile questions tagged gruntfile I have the following : .. . .. . I m sure it s just syntax but I can t seem to get past this error : .. . .. . Warning : an error occurred while processing a template Unexpected identifier . .. . .. . The very fact that it s an unexpected identifier tells me I m not dotting an i or crossing a t properly .", "More experienced eyes are appreciated", "I was able to include my files appropriately .", "Any insight is still appreciated", "htmlbuild is a multitask so you need to define your files under a target :", "Thanks for taking the time to reply", "I got the code directly from their documentation .", "Be that as it may I gave it a go and it returned this error : Cannot read property dest of undefined .", "I am surprised I can t find more articles or samples for basic include functionality", "Hi I updated my answer with the exact Gruntfile I succesfully tested on my machine .", "Can you try it on your side", "Also I tried without defining the target and I got an error .", "OK so if I make a single Gruntfile.js with ONLY the above code it works .", "Can t tell where the conflict is but suffice it to say you have provided a correct answer", "Thanks for your time .", "Now it s eating at me that it doesn t just work in my Gruntfile .", "I am going to have to pick it apart and rebuild it until I discover what causes it to not work .", "Which seems to indicate that it s specific to the initConfig object .", "The Gruntfile.js passes JS Lint though not identifying any accidentally not-closed braces or trailing commas or anything like that .", "I might just be doing it wrong but if you have a different solution I would like to hear about it ." ] }
{ "confidence": [ 64.30750274658203, 63.40919876098633, 58.88892364501953, 40.613685607910156, 37.09819412231445 ], "content": [ "Question : null .. . Answer : I m using includes https : github.com vanetix grunt-includes with newer grunt plugin to combine html files . I m having problems with getting the newer plugin to work right with includes . I have the newer task in my watch config which is suppose to combine only the html that has changed but instead it compiles all of them instead of just the one that changed . I would like for it to just compile the changed file . I might just be doing it wrong but if you have a different solution I would like to hear about it . Heres part of my gruntfile.js : .. . .. . If you would like to see the full grunt file just go to my github repo https : github.com aguynamedirvin F-C blob master Gruntfile.js", "Question : I have an application that has 3 pages which I would like to be self-contained . In the interest of DRY code I would like to do includes for the header and footer content . I have looked at the docs and examples for grunt-html-build https : github.com spatools grunt-html-build and I m somehow coming up short . All HTML is in the path src html with the includes being in a subfolder called includes : src html includes . Here is the HTML sample : .. . .. . And then in my gruntfile questions tagged gruntfile I have the following : .. . .. . I m sure it s just syntax but I can t seem to get past this error : .. . .. . Warning : an error occurred while processing a template Unexpected identifier . .. . .. . The very fact that it s an unexpected identifier tells me I m not dotting an i or crossing a t properly . More experienced eyes are appreciated Note : I have considered using grunt-contrib-concat questions tagged grunt-contrib-concat instead but without globbing I would have to make 3 separate tasks to keep the unique content intact . .. . .. . edit to add : .. . .. . I had success for my very basic use-case using a different grunt task called appropriately grunt-includes https : github.com vanetix grunt-includes . I was able to include my files appropriately . However I m still interested in the power for grunt-html-build questions tagged grunt-html-build for conditionally building dev or distribution packages . Any insight is still appreciated .. . Answer : htmlbuild is a multitask so you need to define your files under a target : Comment : Thanks for taking the time to reply I got the code directly from their documentation . Here s the main sample I sourced : github.com spatools grunt-html-build blob master docs https : github.com spatools grunt-html-build blob master docs sections.md which shows that it doesn t HAVE to have a target . Be that as it may I gave it a go and it returned this error : Cannot read property dest of undefined . I am surprised I can t find more articles or samples for basic include functionality Comment : Hi I updated my answer with the exact Gruntfile I succesfully tested on my machine . Can you try it on your side Comment : Also I tried without defining the target and I got an error . Target dist here is mandatory - I guess grunt-html-build documentation has some issues . Comment : OK so if I make a single Gruntfile.js with ONLY the above code it works . There is some sort of conflict within my fuller Gruntfile then . All of my other tasks run including the grunt-includes but not this one . Can t tell where the conflict is but suffice it to say you have provided a correct answer Thanks for your time . Comment : Now it s eating at me that it doesn t just work in my Gruntfile . I am going to have to pick it apart and rebuild it until I discover what causes it to not work . My first step was to strip out everything inside the initConfig object EXCEPT the htmlbuild task.. . and it works Which seems to indicate that it s specific to the initConfig object . The Gruntfile.js passes JS Lint though not identifying any accidentally not-closed braces or trailing commas or anything like that .", "Question : null .. . Answer : When I m adding a string to the grunt-include-replace https : github.com alanshaw grunt-include-replace includes like shown below I get an unexpected token error in the console and the html file doesn t compile . I think there are problems with the special-characters . How can I make those characters work in the string Comment : Try with this : li a href home a li Btw usually the unexpected token error in Chrome says afterwards the character that breaks the thread . Something like this : Unexpected token . If you get that please post it . Comment : The terminal console gives the following output : running includereplace : all includereplace task Processing app src index.html Warning : Unexpected token Use --force to continue . Comment : This is a JSON error . I solved the problem with escaping the quotes by adding backslashes . @@include components navigation.html list-elements : li a href home a li Comment : Please post that as an answer and mark it accepted .", "Question : null .. . Answer : How to exclude files or folder . In grunt-contrib-copy there s a way to exclude files and folder . How can it be done in grunt-include-source", "Question : null .. . Answer : Read and include the mentioned css js files from Gruntfile.js . I tried to using the grunt-include-source plugin but not working .. . .. . index.html .. . .. . In Gruntfile.js .. . .. . in index.html .. . .. . my final index.html will be" ] }
[ "yes-answer-long", "yes-answer-short" ]
php
UNK_RELATION
branch.io@metrics@85
branch.io -- branch.io refers to the open-source mobile linking service from branch @placeholder .
{ "confidence": [ 49.42149353027344, 49.42149353027344, 49.42149353027344, 48.75878143310547, 46.74597930908203, 45.11955261230469, 43.93016815185547, 43.92133712768555, 43.42289733886719, 43.42289733886719, 43.41917037963867, 43.12184143066406, 43.04572296142578, 42.82883834838867, 42.604095458984375, 41.676815032958984, 41.676082611083984, 41.676082611083984, 41.502769470214844, 40.624420166015625, 40.17864227294922, 40.12370300292969, 39.28101348876953, 39.28101348876953, 39.28101348876953, 38.97996520996094, 38.97996520996094, 38.78911590576172, 38.6344108581543, 38.24015426635742, 38.24015426635742, 38.24015426635742, 38.1796875, 37.87863540649414, 37.696876525878906, 37.33185577392578, 36.54727554321289, 36.036766052246094, 36.036766052246094, 36.036766052246094, 36.036766052246094, 35.80865478515625, 35.80865478515625, 35.80865478515625, 35.80865478515625, 35.25245666503906, 35.010276794433594, 34.9354362487793, 34.09827423095703, 34.09827423095703, 34.09827423095703, 33.56052017211914, 33.56052017211914, 33.32688522338867, 33.32688522338867, 33.288482666015625, 33.134124755859375, 32.9969482421875, 32.9969482421875, 32.9969482421875, 31.9061279296875, 31.828889846801758, 31.666772842407227, 31.666772842407227, 31.666772842407227, 31.666772842407227, 31.110578536987305, 31.110578536987305, 30.565444946289062, 30.565444946289062, 30.565444946289062, 30.565444946289062, 30.13855743408203, 30.128585815429688, 30.00925064086914, 29.407588958740234, 29.245471954345703, 29.245471954345703, 28.992246627807617, 28.992246627807617, 27.959733963012695, 27.890918731689453, 27.890918731689453, 27.890918731689453, 27.76424789428711, 27.697084426879883, 27.697084426879883, 27.65679168701172, 27.65679168701172, 27.65679168701172, 27.155677795410156, 26.81716537475586, 26.089672088623047, 25.99667739868164, 25.99667739868164, 25.99667739868164, 25.99667739868164, 25.362207412719727, 25.362207412719727, 25.35321807861328 ], "content": [ "from the Branch.io team .. . .. . Great question .", "Alex from Branch.io here : sure is", "Alex from Branch.io here : .. . .. . Hi", "I have integrated branch.io https : branch.io in my app for deep-linking .", "Alex from Branch.io here : this is pretty easy to do", "Implemented the branch.io in the application .", "I am using branch.io for integrating the deep-linking in my Android App .", "You might try a service like Branch.io https : branch.io full disclosure : I work there to handle all of these different permutations", "Alex with Branch.io here : .. . .. . You sure can", "I am trying to use branch.io with android application .", "Branch.io for deeplinking .", "Alex from Branch.io here : .. . .. . This is strange and not something we have heard in the past .", "From my experience with Branch.io I realized that branch.io links will redirect to your app only once .", "I just implemented branch.io deep-linking in my android and ios application .", "Alex from Branch.io here : yes this is definitely possible", "Alex from Branch.io here : this exactly what the Branch service does if everything is set up and working correctly .", "Alex with Branch.io here : this is definitely odd", "We re using Branch.io deep links .", "Alex from Branch.io here : no definitely not expected behavior", "I was using branch.io but since there is delay in getting the response from branch.io I have to implement it .", "In May we created a proof of concept App using Branch.io .", "In AppDelegate and branch initSessionWithLaunchOptions .. . - will there be any round tripping to branch.io backend https : xxx.app.link xxxx when just opening the app not from a link", "Alex with Branch.io here : you can do this", "I am using https : branch.io in an iOS app .", "I think its a feature provided by branch.io .", "Alex from Branch.io here : this is usually a good place to start for symptoms like these .", "Alex from Branch.io here : this feature isn t available directly .", "If the user clicks the branch.io link then clicks Download then clicks on the downloaded app from the home screen as opposed to in the app-store then the branch.io link data is NOT present .", "Alex from Branch.io here : this should work .", "Alex from Branch.io here : the smart banner actually doesn t require the SDK to be integrated .", "Alex from Branch.io here : the branch match id is a unique ID we append to every link redirection as part of our matching algorithm .", "Alex from Branch.io here : this could be a key mismatch since the +clicked branch link param is returning false .", "And for app link I m using https : branch.io .", "Alex from Branch.io here : we ll need a bit more info to debug .", "Working fine except if app is not running in background and branch.io link clicked .", "If the user clicks on the link then clicks Download then clicks Open from within the App Store the branch.io link data is present as expected .", "But problem is coming as described above scrollview- UITextview- contains images and content doesn t scroll when open from branch.io link except first time .", "I want to use branch.io to create invite links within a cordova app .", "The documentation of branch.io is more less a rough install guide plus API documentation .", "I am integrating titanium branch.io module with enterprise client project .", "I will try to make it work by modify official branch.io module .", "I am trying to get Branch.io to work on Android but I am running into : .. . .. . .. . I then changed : .. . .. . .. . To : .. . .. . .. . .. . In onCreate of the Activity .", "Alex with Branch.io here : .. . .. . We recently made some changes to our tutorial and it looks like we missed a few things .", "Alex with Branch.io here : I believe we sanitize some deepview content and this may be one of the things that gets stripped out .", "Is there a way to disable branch.io smart banner for all non-ios and non-android platforms", "Alex from Branch.io here : what you are doing should work as you describe so there is probably some sort of configuration issue .", "I used Branch.io for my project to launch app from my website .", "Does Facebook App Invites as a content sharing mechanism integrate better with Branch.io", "Alex from Branch.io here : unfortunately we haven t added support for push notifications through Titanium yet .", "Alex from Branch.io here : if DEBUG is the best approach and you actually just need to switch out your singleton call .", "Alex from Branch.io here : what you re trying to do is Deep Link Routing .", "Just to chime in here from the Branch.io perspective : this isn t an error we ve seen before so it s likely not related to the Branch SDK", "Alex from Branch.io here : .. . .. . Short version .. . .. . Branch doesn t currently support multiple apps on the same domain so there will be some unavoidable unexpected behavior .", "If you don t want to post publicly go ahead and email it to support@branch.io and we ll get this all squared away", "branch.io redirects to empty content in app if app is not running in background This problem is solved there was initialisation issue .", "Full disclosure : I m the Branch.io team .. . .. . The way Firebase and Branch implement app indexing is fairly similar .", "When I set up a branch.io link I see that after the redirect it is something like http : www.bbc.co.uk branch match id 241114587404660876 .. . .. . What is the branch match id parameter", "Alex from Branch.io here : we don t currently have a WordPress plugin for the smart banner but this is a great idea", "Alex from Branch.io here : yes we accidentally pushed out a bad 1.14.1 release yesterday and withdrew it .", "Could some developer from branch.io please guide me through a legitimate solution and help me with the fix .", "Alex from Branch.io here : the webhooks system isn t designed to capture link data the way you re describing but there are a couple of ways you can build this yourself : .. . .. . 1 .", "Alex from Branch.io here : .. . .. . The Branch deepviewCta function works on iOS 9+ by triggering an automatic redirect to a Universal Link URL which opens the app and then going to a fallback URL if that fails .", "2 How do I detect in the other device whether the app was installed through such a branch.io invite link", "I m using both Google Analytics and branch.io in this website http : xiaobandeng.palmdrive.cn app discovery .", "console.log http : i.stack.imgur.com Jh5Gv.png .. . .. . Is my code wrong or is there an issue with Branch.Io cordova documentation implementation", "I m making the following call to branch.io .. . .. . It works fine in my local machine but fails in the server .", "Alex from Branch.io here : could you submit a ticket https : support.branch.io support tickets new to our Integration Engineering team for this issue", "Alex from Branch.io here : there may be some sort of issue with loadRewards on a custom bucket in Cordova it does seem to work with the default bucket when I test that .", "Branch.io also has a built-in native share sheet but I don t think its as advance nice as Google Invites .", "I would like to use the Branch.io deeplinks with Google Invites interface for content sharing .", "I have Branch.io links which direct the user to my app in the iOS app-store .", "We ve been trying to integrate branch.io into our Meteor app but so far we are stuck on step 1 .", "Thanks just to be even more precise - the code block closure andRegisterDeepLinkHandler is always called and therefore there is always a call to branch.io backend xxx.app.link xxxx https : xxx.app.link xxxx", "In didFinishLaunchingWithOptions this is what I have coded .. . .. . But the first screen is appearing before getting the response from branch.io .", "Alex from Branch.io here : you may want to submit a ticket https : support.branch.io support tickets new to our Integrations team to help debug this issue", "Alex from Branch.io here : Branch does support international phone numbers with the text-me-the-app feature and we re hoping to have a country selector like Intl-Tel-Input integrated at some point soon .", "How do I send to Intl numbers using branch.io and Intl-Tel-Input", "Am integrating branch.io to my iOS app which is being developed in Xamarin without Forms .", "questions 8756683 best-way-to-parse-url-string-to-get-values-for-keys 12 answers .. . .. . I started to use https : branch.io in an iOS app .", "We are using iOS 9.3 and Xcode 7.3.1 .. . Our app has been set up with the proper branch.io settings key schemes and URLs .", "take a look at the Android testbed app https : github.com BranchMetrics android-branch-deep-linking tree master Branch-SDK-TestBed", "Branch.io seems to excel at generating deeplinks and their shorturl would contain all the data needed by an app in their Embed key-value deep link metadata .", "Alex with Branch.io here : my first instinct is the same as MP23 it sounds like Universal Links may be disabled on the iPhone 6S Plus .", "Cannot compile branch.io on Android Gradle build error .. . .. . with the message .. . .. . Error : Failed to resolve : com.crashlytics.sdk.android : answers : 1.3.6 .. . .. . Last time its has no errors", "Alex from Branch.io here : .. . .. . It looks like the issue is with this line : .. . .. . The branch key parameter is actually specified without the character I know it s a bit confusing what belongs where .", "Does anyone know exactly what branch.io will index when you create a link", "Alex with Branch.io here : it sounds like Universal Links may not be completely configured in your app .", "Alex with Branch.io here : you can use the View Credits function to show the total number of credits available for the current user : https : dev.branch.io features referral-programs guide android viewing-credits .", "Alex with Branch.io here : the automatic open app : true setting actually doesn t work in iOS 9 with Safari due to some changes Apple made to Universal Links in iOS 9.3 .", "Would also like to mention that i debugged the same case just now branch.io bringing data with it and also assigning values to label and all but still not reflecting on screen .", "Take a look at the parameters here https : github.com BranchMetrics web-branch-deep-linking example-7 .", "The link is from Test and in code Branch branch Branch getTestInstance .. . .. . Have you come across something like this .", "Take a look at this section https : github.com BranchMetrics cordova-ionic-phonegap-branch-deep-linking blob 6ce246fe880ddc4ec2417768fc8a2d3ec1941f09 src android io branch BranchSDK.java L411-L418 and let me know how it goes", "Alex with Branch.io here : .. . .. . If I understand correctly you are putting the main Smart Banner snippet in the head section for your entire site and then also adding calling it a second time with position : bottom on certain pages .", "So basically when i write this in the deep view html window provided by branch.io the changes are seen on the preview window but as soon as i hit save the page refreshes and i lose my changes .", "We actually have a brand new one-click integration with Google Analytics which you can read about here https : branch.io data-integrations and here https : dev.branch.io third-party-integrations google-analytics .", "Fowllowing Branch.Io documentation https : dev.branch.io features referral-programs guide cordova I have implemented this code to get the reward credit balance of the current user : .. . .. . This code returns rewards 0 .. . .. . But there should be one credit .", "Here is a fairly fresh thread discussing the No resource identifier found for attribute autoVerify issue specifically in relation to Branch.io : github.com BranchMetrics https : github.com BranchMetrics Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK issues 50 So maybe this will be resolved we the next build", "My apologies for leading you astray in this issue http : stackoverflow.com questions 35870890 google-deep-linking I missed that you re developing in Meteor and after looking into things further it turns out that the Branch.io Cordova SDK is actually not yet officially compatible with the Meteor stack .", "Added the Branch Xamarin SDK as a NuGet package .. . branch key added in Info.plist .. . Added URL scheme in Xamarin .. . Enabled Universal Links in branch.io portal .. . Added code for initialization and delegates for branch.io .. . Enabled Associated Domains in developer portal .. . Enabled Associated Domains in xamarin-studio and added domains applinks : bnc.lt .. . .. . Ensure that the correct build target is checked in the right sidebar . Am not sure how to do that in xamarin ." ] }
{ "confidence": [ 64.44923400878906, 61.58565139770508, 60.84996795654297, 57.64817428588867, 57.62428665161133, 56.715057373046875, 55.8431396484375, 54.73610305786133, 54.23432159423828, 53.62565612792969, 52.32667541503906, 52.20790100097656, 51.71128463745117, 51.63587188720703, 51.18732452392578, 51.106048583984375, 50.61593246459961, 49.8650016784668, 49.409629821777344, 48.04742431640625 ], "content": [ "Question : Is there a way to disable branch.io smart banner for all non-ios and non-android platforms For eg . disabling smart banner for windows blackberry etc . .. . Answer : Alex from Branch.io here : sure is Take a look at the parameters here https : github.com BranchMetrics web-branch-deep-linking example-7 .", "Question : In AppDelegate and branch initSessionWithLaunchOptions .. . - will there be any round tripping to branch.io backend https : xxx.app.link xxxx when just opening the app not from a link Thanks in advance Alex .. . Answer : from the Branch.io team .. . .. . Great question . The initSessionWithLaunchOptions method will be called every time your app launches whether or not the open happened as a result-of the user clicking a Branch link . Hope that helps Comment : Thanks just to be even more precise - the code block closure andRegisterDeepLinkHandler is always called and therefore there is always a call to branch.io backend xxx.app.link xxxx https : xxx.app.link xxxx Comment : @ChrisG That is correct", "Question : Implemented the branch.io in the application . Working fine except if app is not running in background and branch.io link clicked . It will open the app and redirect to the screen where shared content to be shown but showing the empty screen or no content on screen.If app is running in background it works fine . Why so is it the limitation or i am missing something . Please guide thanks in advance . Posting some code for clarity . Comment : its working in both condition for me . . can you show some code Comment : and without internet it ll not work Comment : @Jogendra.Com Please check now . .. . Answer : I believe the issue may be that you re registering your deep linked view controller before defining the Branch singleton . Try rearranging your didFinishLaunchingWithOptions method as follows : .. . .. . There is also a working TestBed app https : github.com BranchMetrics iOS-Deferred-Deep-Linking-SDK blob master Branch-TestBed Branch-TestBed AppDelegate.m you might find useful for reference . Comment : No Alex that s not the issue it doesn t reflect any change . Comment : Are you using the Facebook SDK or any other libraries that could be interrupting the app launch queue Comment : Actually i am using UITextView to display the html content . So the issue is when app redirected to the content if html contains images to display in UITextView it doesn t scroll . But if i go to same screen within the app from normal flow it works fine . So i am not getting the reason for this as the code is same working in one case not in another case . Hope i made my point clear . Comment : So just to clarify : this is working correctly if you open the app normally without using a Branch link and it s also working correctly if the app is already running in the background and then you open a Branch link but it is NOT working if you open a Branch link when the app is not running in the background Comment : branch.io redirects to empty content in app if app is not running in background This problem is solved there was initialisation issue . But problem is coming as described above scrollview- UITextview- contains images and content doesn t scroll when open from branch.io link except first time .", "Question : I just implemented branch.io deep-linking in my android and ios application . The link is opening perfectly in android however as and when the link is shared from android to ios the safari opens the link and displays - Cannot open the page because the address is invalid . I am able to open the same link in the ios from the chrome and it successfully shows me the apple store link . Could some developer from branch.io please guide me through a legitimate solution and help me with the fix . Thanks in advance Comment : Alex from Branch.io here : we ll need a bit more info to debug . Let s start with an example link that isn t working as expected and we can take it from there : .. . Answer : I submitted a ticket for this too my links worked from my landing page for all platforms I tested except Mac Desktop with Safari . This worked for me in the meantime - although I would prefer the link opening in the same tab . Add target blank to your link .. . .. . a href link-to branch target blank .. . .. . This opens the branch link in a new tab and the link directs to my SMS-landingpage .", "Question : Branch universal link working in 9.3 device with live app but not working in iOS 8 device live and test app.In iOS 8 device when i clicking a universal link it redirect through Safari . .. . Answer : Universal Linking is a new feature that only works in iOS 9+ . For iOS 8 you ll need to use old-fashioned URL schemes . Since Universal Links don t work everywhere even in iOS 9 you d want URL scheme links anyway as a fallback . You might try a service like Branch.io https : branch.io full disclosure : I work there to handle all of these different permutations", "Question : Cannot compile branch.io on Android Gradle build error .. . .. . with the message .. . .. . Error : Failed to resolve : com.crashlytics.sdk.android : answers : 1.3.6 .. . .. . Last time its has no errors .. . Answer : Just change from .. . .. . or .. . .. . to .. . .. . Because they remove version 1.14.1 .. . .. . https : github.com BranchMetrics android-branch-deep-linking releases Comment : Alex from Branch.io here : yes we accidentally pushed out a bad 1.14.1 release yesterday and withdrew it . Updating as suggested here should resolve the issue...let me know if it does not", "Question : I am integrating titanium branch.io module with enterprise client project . I used OneSignal for push-notification . When push-notification received OneSignal module launch app and fire event getNotificationData . From this event I fired branch.initSessionWithData Branch-URL .. . .. . This issue only in Android . iOS I have managed with handlePushNotification method . Most of the time I got response and I not able navigate particular page . but when I force kill the app and launch again Now got response from branch and Navigate to particular page . .. . Answer : Alex from Branch.io here : unfortunately we haven t added support for push notifications through Titanium yet . However since you figured out how to do it with iOS we also support the same mechanism with the core Android SDK . Please see this document for an example https : github.com BranchMetrics android-branch-deep-linking deeplink-via-push-notification . I hope you can get this working for your client . It ll be a while before we add support on Titanium most likely . Comment : I will try to make it work by modify official branch.io module . Thanks for the response .", "Question : In May we created a proof of concept App using Branch.io . Back then it worked but now coming back to prepare for release it does not work . We dont get any Deep Link Data . We do get the following : .. . .. . The link is created in Marketing . The link is from Test and in code Branch branch Branch getTestInstance .. . .. . Have you come across something like this . Could it have something to do with dates .. . Answer : Alex from Branch.io here : this could be a key mismatch since the +clicked branch link param is returning false . Could you check and make sure you are using the right test live Branch key for the link Also note if you hit the base domain directly e.g . 2elk.test-app.link there won t be any link data because that isn t technically a Branch link .", "Question : I was able to get the Marketing links working once but the Smart Banner never worked . The Marketing links would open in our app . Then this broke when I tapped the Smart Banner link and installed the live app from the App Store . Even after deleting both apps reinstalling the test app from Xcode Marketing links will no longer work redirection always happens to the App Store even if the app is installed . The test app has the same bundle-identifier as the live app so integration should be and was working . More details : .. . .. . Clicking on a Marketing link or banner opens up the App Store via Safari every time .. . Then I go to my app manually and if I scroll thus refreshing the output on Xcode debug panel I can see the link details coming from Branch . Seems the link is making it to the app but in a deferred manner after the redirection to the App Store is happening . And our app is not being recognised as it is never opened from either a link in Notes or the banner from Safari on the iPhone . Universal linking is enabled . We are using iOS 9.3 and Xcode 7.3.1 .. . Our app has been set up with the proper branch.io settings key schemes and URLs . Any ideas would be appreciated . Comment : Have you create URL schemes .. . Answer : From my experience with Branch.io I realized that branch.io links will redirect to your app only once . I think its a feature provided by branch.io . To test again you need regenerate new links . Comment : This is not so . When everything was working the links would redirect each time . Comment : check this link https : support.branch.io support solutions articles 6000039872-why-does-my-link-always-redirect-to-the-app-store-play-store- Comment : Thanks @hammad I do have the option to Always try to open the app turned on . Comment : Are you using sandbox mode We have noticed that in the recent few months the links in Production mode behave OK but the links in sandbox mode behave in the way that you have described . Comment : No sandbox mode .", "Question : I m using both Google Analytics and branch.io in this website http : xiaobandeng.palmdrive.cn app discovery . The website is designed for mobile . The problem is that when clicking the banner with text OPEN the app cannot be opened . Here is the code for the click : .. . .. . If I get rid of the GA code it works fine : .. . .. . The reason I put open in hitCallback is to make sure GA sends out the hit because open will redirect to another page . Can you help me .. . Answer : Alex from Branch.io here : .. . .. . The Branch deepviewCta function works on iOS 9+ by triggering an automatic redirect to a Universal Link URL which opens the app and then going to a fallback URL if that fails . But Apple is very specific about the situations in which a Universal Link is allowed to launch the app including things like how long of a pause is allowed before redirection . Of course these restrictions are not public so all we can do is guess . My suspicion is that putting the deepviewCta function inside a GA callback is falling outside of Apple s rules so the app never opens and you are instead being sent to the fallback URL . I can think of two options here : .. . .. . 1 . You can build some way to trigger the GA and Branch functions separately so that they don t conflict with Apple s requirements . 2 . We actually have a brand new one-click integration with Google Analytics which you can read about here https : branch.io data-integrations and here https : dev.branch.io third-party-integrations google-analytics . If you set that up you ll get all Branch-related events automatically instead of needing to manually collect link click data . Hopefully that helps", "Question : I am using branch.io for integrating the deep-linking in my Android App . If the app was installed on device it will redirect to an app along with parameter Deep Link Data . If the app was not installed on device it will redirect to the Playstore page correctly . But after install the app and open it the parameter wasn t sent into the app . My question is how can I pass the parameter through the Playstore or is it even possible .. . Answer : Alex from Branch.io here : yes this is definitely possible It s called deferred deep-linking and in fact it s one of our main features . Any data you attach to the link when it is created will be retrievable inside the app . See this guide https : dev.branch.io getting-started deep-link-routing overview for more into on how to set it up .", "Question : I have integrated branch.io https : branch.io in my app for deep-linking . Here the response that I am getting in the branch handler has a slight delay . Once I get the response I do some other processing and then decide whether to navigate to first screen or the second screen . The problem is even before getting the branch response the first screen is displayed . I want to delay the splash-screen for a while which is not good as most of the people say but I do not have any option probably . I referred to various links How can I display a splash-screen for longer on an iPhone http : stackoverflow.com questions 553336 how-can-i-display-a-splash-screen-for-longer-on-an-iphone where they suggest to add a splash view . But this is not working . I donot know for what reason . I also used NSThread sleepForTimeInterval : 6.0 But this blocks the main thread . I also used GCD which didn t help . In didFinishLaunchingWithOptions this is what I have coded .. . .. . But the first screen is appearing before getting the response from branch.io . Kindly help... . This is major problem in my app without which I cannot test anything. . Please help me.. . Let me know if I have not made myself clear. . .. . Answer : You can run webservice in main thread in didFinishLaunchingWithOptions . The splash-screen will wailt until the service finished . After that you can choose with screen will be pushed to . Remember handle the case the API is failed . Comment : Alex from Branch.io here : this should work . As a side note the API call is actually handled via our SDK which is guaranteed to return a value in every situation even when the network is out or the API callback otherwise fails . Comment : OK understood Wait until the completion block of fetching web service call self.window makeKeyAndVisible", "Question : null .. . Answer : I have Branch.io links which direct the user to my app in the iOS app-store . If the user clicks on the link then clicks Download then clicks Open from within the App Store the branch.io link data is present as expected . If the user clicks the branch.io link then clicks Download then clicks on the downloaded app from the home screen as opposed to in the app-store then the branch.io link data is NOT present . Is this expected behavior If not any idea what might be wrong Thanks Comment : Alex from Branch.io here : no definitely not expected behavior Would you mind sending in a support ticket https : support.branch.io for this so that we can debug what s going on from the back end", "Question : I was reading up on Google Invites : https : developers.google.com app-invites android guides app and also branch.io : https : dev.branch.io recipes content sharing android routing-to-content-within-your-android-app .. . .. . Google Invites seems to excel at Content Sharing providing an interface to select from Google all the people you want to send the deep link-to your app . Branch.io seems to excel at generating deeplinks and their shorturl would contain all the data needed by an app in their Embed key-value deep link metadata . Branch.io also has a built-in native share sheet but I don t think its as advance nice as Google Invites . I would like to use the Branch.io deeplinks with Google Invites interface for content sharing . What I m struggling with is to merge the two . When someone clicks on the Google Invites link the android app opens and inside the onCreate method the following code runs to intercept the intent : .. . .. . Branch.io tells android to intercept the intent in the onStart method : .. . .. . If I use both Branch.io and Google Invites which code should I use to intercept the intent that would start the android app when I click on the deeplink .. . Answer : I dropped the branch SDK into google s app invite example and tried a few things . It seems that you can t feed a branch URL into the AppInviteInvitation IntentBuilder as a deep link without the link being turned into a google deep link . You could set the message itself to a Branch URL setMessage url and possibly feed in a NULL URI for the deep link but that s a bit hackish . I tried this myself the e-mail feature half worked but texting did not . The default way to generate and share a branch link without the share sheet is as follows : .. . .. . As for which should you use to intercept the intent : use Branch.initSession for Branch links and use AppInviteReferral.hasReferral intent for google links . Intertwining the services for the point of a better share dialog is not the direction that I would take . Instead use a branch link they pass data through install faster than the Android SDK can with a custom share dialog there are many ways to build custom dialogs google around checkout github . Please let me know if you have any other questions or require additional information I m happy to help . Comment : Thanks for your help . This is useful info . Does Facebook App Invites as a content sharing mechanism integrate better with Branch.io Comment : I just dropped the FB SDK into an app with Branch . Sent out a few invites and nothing seems to be showing up for people no push notif and I m not even sure where FB houses app invites . Conversion rates for App Invites - sign-ups are notoriously bad again I would suggest a custom share dialog .", "Question : On BranchUniversalObj.showShareSheet it shows up facebook link on the top can we reorganize it to Whatsapp BranchUniversalObj.showShareSheet Screenshot http : i.stack.imgur.com xQdda.jpg .. . Answer : Alex with Branch.io here : .. . .. . You sure can When you re configuring your ShareSheetStyle object just set WHATS APP as the preferred sharing option like so : .. . .. . That will put WhatsApp at the top of the list if it is installed on the device . Comment : I am using Cordova Ionic . can you help with this @Alex Bauer Comment : @SandeshBSuvarna this is not a method we surface in the Cordova SDK . I m not really fluent on the Cordova Ionic platform but I believe it should work if you customize the underlying SDK . Take a look at this section https : github.com BranchMetrics cordova-ionic-phonegap-branch-deep-linking blob 6ce246fe880ddc4ec2417768fc8a2d3ec1941f09 src android io branch BranchSDK.java L411-L418 and let me know how it goes", "Question : We ve been trying to integrate branch.io into our Meteor app but so far we are stuck on step 1 . Trying to follow https : start.branch.io integrate-sdk steps under Cordova we ve been unable to install the Cordova plugin successfully . We ve tried various commands including : .. . .. . as instructed here How to add cordova plug that haven t registration on plugins.cordova.io http : stackoverflow.com questions 26624649 how-to-add-cordova-plug-that-havent-registration-on-plugins-cordova-io for plugins not registered on plugins.cordova.io even though this one does appear to be see https : www.npmjs.com package branch-cordova-sdk . All of these commands cheerfully claim to have added the plugin to Meteor but when debugging we consistently find that branch is undefined . It would therefore seem that nothing has been installed at all . In fact it doesn t seem to matter much what one puts after meteor add cordova : .. . Meteor will claim to have added a plugin which will be visible when one does meteor list . E.g . : .. . .. . So.. . it s pretty hard to tell if anything is actually being done . EDIT : .. . .. . The correct command was simply the first one : .. . .. . Of course the branch variable would only be defined when the app is running on a device not in Chrome on the desktop . Also it was necessary to add to mobile-config.js the following lines : .. . .. . Now we can.. . .. . .. . which results in : .. . .. . This despite having modified cordova-build-override AndroidManifest.xml according to https : dev.branch.io getting-started universal-app-links guide adobe search pathPrefix add-intent-filter-to-manifest .. . but we appear to be confronting this same issue again : .. . .. . https : github.com meteor meteor issues 5840 issuecomment-186184372 .. . .. . It seems that Meteor ignores our override file and instead uses the AndroidManifest.xml that is generated by the build . So.. . any advice Has anybody found a way to override the AndroidManifest.xml successfully Comment : It seems that I m not alone in seeing this error after all . Here is a fairly fresh thread discussing the No resource identifier found for attribute autoVerify issue specifically in relation to Branch.io : github.com BranchMetrics https : github.com BranchMetrics Cordova-Ionic-PhoneGap-Deferred-Deep-Linking-SDK issues 50 So maybe this will be resolved we the next build .. . Answer : My apologies for leading you astray in this issue http : stackoverflow.com questions 35870890 google-deep-linking I missed that you re developing in Meteor and after looking into things further it turns out that the Branch.io Cordova SDK is actually not yet officially compatible with the Meteor stack . There have been a couple of requests for it recently so I ll pass this along as something to consider supporting officially in future . If you do have any luck with the Cordova SDK based on the results from that GitHub issue please let me know", "Question : So i want to test an unreleased version of the app for deferred deep links . How do i do it As the changes made will not be there in the app i download from the play store after redirecting . .. . Answer : Alex from Branch.io here : this is pretty easy to do On your Branch dashboard https : dashboard.branch.io settings link under Settings - Link Settings - Android select Custom URL and put in the information requested . Alternatively you can delete the app from your phone open the link install a side-loaded build of the app directly from Android Studio and then manually launch the app . You ll still be deep linked to the correct place .", "Question : I d like to use branch smart banner because it can open app if it was installed . But i ve understood how it work . I need install ios sdk in my app and use setIdentity .. . Answer : Alex from Branch.io here : the smart banner actually doesn t require the SDK to be integrated . setIdentity is a completely separate method used for tracking individual users and isn t used at all for the smart banner . However integrating the SDK is definitely the easiest way to get things working because even without it you would still need to set up a Branch account configure all your link routing rules in the Branch dashboard and then enable Universal Links in your app if it s iOS . Since that is 90 of the SDK set up process you might as well do the whole thing so you can also take advantage of things like install attribution and analytics", "Question : I have integrated Branch in my app to keep track of my referrals . But I am confused how to show the user his referrals inside the application . Kindly help . .. . Answer : Alex with Branch.io here : you can use the View Credits function to show the total number of credits available for the current user : https : dev.branch.io features referral-programs guide android viewing-credits . If you are wanting to show a list of all users who have been referred by a given user that isn t a built-in function . But you could create your own tracking and display system by using data from the Credit History method : https : github.com BranchMetrics android-branch-deep-linking get-credit-history", "Question : I was able to get the Marketing links working once but the Smart Banner never worked . The Marketing links would open in our app . Then this broke when I tapped the Smart Banner link and installed the live app from the App Store . Even after deleting both apps reinstalling the test app from Xcode Marketing links will no longer work redirection always happens to the App Store even if the app is installed . The test app has the same bundle-identifier as the live app so integration should be and was working . More details : .. . .. . Clicking on a Marketing link or banner opens up the App Store via Safari every time .. . Then I go to my app manually and if I scroll thus refreshing the output on Xcode debug panel I can see the link details coming from Branch . Seems the link is making it to the app but in a deferred manner after the redirection to the App Store is happening . And our app is not being recognised as it is never opened from either a link in Notes or the banner from Safari on the iPhone . Universal linking is enabled . We are using iOS 9.3 and Xcode 7.3.1 .. . Our app has been set up with the proper branch.io settings key schemes and URLs . Any ideas would be appreciated . Comment : Have you create URL schemes .. . Answer : This can happen if you by any chance tap the bnc.lt link at the status bar of your iPhone while the app is running . Once you do that the links will always redirect to AppStore . Try long-tapping the deep link and in the menu that pops up choose Open in your app . Comment : Thanks I read that but this is not the case . Long-pressing doesn t give me the option to open in app . Comment : Alex from Branch.io here : this is usually a good place to start for symptoms like these ." ] }
[ "yes-answer-long", "yes-answer-short" ]
metrics
UNK_RELATION
mask@bitmap@28
mask -- an image mask is a @placeholder that specifies an area to paint but not the color .
{ "confidence": [ 37.673240661621094, 36.945674896240234, 36.03941345214844, 35.556541442871094, 35.556541442871094, 34.93145751953125, 34.44425964355469, 34.44425964355469, 34.43457794189453, 34.23716735839844, 33.841915130615234, 33.659793853759766, 33.340293884277344, 33.31266784667969, 33.17094802856445, 33.17094802856445, 33.164825439453125, 32.98115539550781, 32.98115539550781, 32.98115539550781, 32.98115539550781, 32.977725982666016, 32.669132232666016, 32.47332763671875, 32.40806198120117, 32.28599166870117, 32.06695556640625, 32.05867004394531, 32.05311584472656, 32.05311584472656, 31.988346099853516, 31.988346099853516, 31.97332000732422, 31.85955810546875, 31.85955810546875, 31.472553253173828, 31.472553253173828, 31.472553253173828, 31.364032745361328, 31.357952117919922, 31.244136810302734, 31.207035064697266, 30.940837860107422, 30.940837860107422, 30.940837860107422, 30.940837860107422, 30.940837860107422, 30.940837860107422, 30.79674530029297, 30.787967681884766, 30.569091796875, 30.569091796875, 30.569091796875, 30.569091796875, 30.544513702392578, 30.544513702392578, 30.433006286621094, 30.433006286621094, 30.43154525756836, 30.422149658203125, 30.303573608398438, 30.26099395751953, 30.26099395751953, 30.26099395751953, 30.26099395751953, 30.26099395751953, 30.26099395751953, 30.239776611328125, 30.092552185058594, 29.932998657226562, 29.81924057006836, 29.81924057006836, 29.675689697265625, 29.64105224609375, 29.64105224609375, 29.64105224609375, 29.64105224609375, 29.64105224609375, 29.494110107421875, 29.432235717773438, 29.432235717773438, 29.432235717773438, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.397842407226562, 29.33295440673828, 29.33295440673828, 29.33295440673828, 29.33295440673828, 29.33295440673828, 29.33295440673828 ], "content": [ "But the mask just not working I got a red color background not masks to mask image .", "If the empty mask area the fuchsia area in the sample mask is transparent then you ll need a different method .", "It should be easy to mask an image but I want to mask any UIView .", "A binary image is a mask .", "A mask goes over an image .", "Use color keys to mask in the Graphics.DrawImage call .", "Even if the mask is a greyscale image .", ".. . .. . Example image of a mask :", "Mask image with a triangle at the bottom http : i.stack.imgur.com Q3SGG.jpg .. . .. . I ve seen lots of tutorials out there on how to mask an image with a circle shape but none on how you would mask the border of a div like the red area .", "I have a mask bitmap with a half is red color and ones is transparent like this https : www.dropbox.com s 931ixef6myzusi0 s 2.png .. . .. . I want to use mask bitmap to draw content on canvas only visible in red area code like this : .. . .. . Paint paint new Paint .. . .. . public void draw Canvas canvas draw content here .. . .. . .. . and mask bitmap here paint.setXfermode new PorterDuffXfermode android.graphics.PorterDuff.Mode.DST IN canvas.drawBitmap maskBitmap 0 0 paint .. . .. . .. . .. . The result as my expecting content only visible in red area BUT THE TRANSPARENT AREA BECOME BLACK IS PROBLEM", "Suppose my mask is this note that my mask is NOT a rectangle .. . .. . then I would like to have the parts where mask 1 untouched and the rest blended with a color .", "The black area become the transparent part of the mask .", "enter image description here http : i.stack.imgur.com XhnfE.jpg .. . .. . I have implemented the clipping mask effect and the image is draggable but the issue is that image and mask image is moving simultaneously I want to drag the image which is below the mask layer and mask layer should not move .", "before the mask :", "Another question I have - what exactly is the difference between -webkit-mask-image and -webkit-mask-box-image", "This function takes in an image file and a mask file and interpolates the original image wherever the mask file pixels are nonzero .", "According to MDN you can just use mask for Firefox as of Firefox 3.5 : .. . .. . https : developer.mozilla.org en CSS mask .. . .. . However mask requires an SVG image to act as the mask .", "It seems -moz-mask-image is not supported in Firefox .", "Can I mask a CALayer with a grayscale image at all", "With it you provide a drawable to use as a mask for your image .", "5 . drawing using CGContextClipToMask with mask image .", "From the docs for CGImageCreateWithMask .. . .. . If the mask is not the same size as the image specified by the image parameter then Quartz scales the mask to fit the image .. . .. . If that is not the case check the scale properties of the image and mask .", "Then mask the latest raster to acquire the targeting variables limited in specific area .", "I m trying to mask a UIImageView in such a way that it would allow the user to drag the image around without moving its mask .", "Rect Mask 2D works instead Mask .", "I would like to take the small mask image given and position it onto the video further I would actually like to take this mask image and put it onto a video as a mask in few different locations at once .", "Mask : .. . .. .", "If your mask image is not a grayscale image you might need to convert it to grayscale before you can use it as a mask in CGContextClipToMask .", "no my image is 640x480 and my mask is 20x15 .", "You are not really trying ot mask an image .", "then you could use some kind of multiply between mask and blue color", "It must have transparent half and it absolutely need to mask the parent background-color .", "I m using jQuery-Mask-Plugin http : igorescobar.github.io jQuery-Mask-Plugin to mask a time input .", "The mask image will contain green keys where the image should be painted .", "Then you could draw the mask image over the original image .", "When a mask is specified the results matchTemplate are unchanged from when no mask is used .", "How could I use the jQuery Mask to make this kind of mask", "Is it possible to create a new clipping mask inside a other clipping mask in Three.js", "I thought the black color would show through when applied as a mask but when I set the mask the whole view is cleared .", "Since you have a fixed size container I would try using the -webkit-mask-position to move the mask image note that it works only together with -webkit-mask-image .", "0 : Number parts 1 var mask 0xffffffff 32 - prefix var maskStr mask 24 mask 16 0xff mask 8 0xff mask 0xff .join .", "if I remove the mask no any mask appears in the text field then", "I am trying to mask an image something like this : .. . .. .", "You don t apply a binary mask to an image .", "I then multiply this mask by the pixels of the image element-wise .", "Or is it possible to place mask directly from image", "thanks. . but it is possible to set image as a uiview s mask", "So can I set image as a mask", "mask http : i.stack.imgur.com JOzj5.png", "Any suggestions for A . how to get a mask out of this binary image and B . how to use this mask to apply a filter to that part of the greyscale image", "@OliverCharlesworth where is the mask here", "My mask string :", "No need any mask at all .", "This mask works perfectly .", "Firefox only supports mask urls that point to a mask element .", "Do I need to add the mask around it or create a new one with the mask", "I have applied the clipping mask effect using the MaskImage + OriginalImage Clipping mask effect image .. . .. .", "The binary mask should be preferably permanent- as in I don t want to reapply the mask to the image every time I call a function .", "You can draw the mask onto a fuchsia background to get the mask above then color key the output above onto a transparent bitmap - one extra color key operation basically .", "Refer this for negative numbers .. . .. . jQuery Mask Plugin : mask for negative integers http : stackoverflow.com questions 34660995 jquery-mask-plugin-mask-for-negative-integers .. . .. . I have modified the script based on the above link :", "So this can be your mask :", "And how do I convert from a whole image to the format the mask needs", "ie : img src images myimage.jpg id image-mask .", "This results in both the image and mask moving together as you see below .", "This approach nests a UIImageView within a UIScrollView and uses the UIScrollView to mask the image .", "a3 http : i.stack.imgur.com c4zI3.png .. . .. . input image a4 mask : .. . .. .", "Which i want to draw a background-image clip to a text mask .", "In my code the older clipping mask is getting ignored after I try to create a new clipping mask inside the older clipping mask .", "mask is resizable .", "@Richard Try this for example : pic0.mask box.m0 pic1.mask box.m1 pic2.mask box.m2 .. .", "The mask image is just a simple greyscale image I created in photoshop .", "Image 1 http : i.stack.imgur.com gkarj.jpg .. . .. . The Image after applying the mask .", "I use the following code to mask the image .. . .. . And then i use this code to save my composed image : .. . .. . EDIT : This applies the mask correctly", "Is your mask of constant colour", "Here it is without the mask : .. . .. .", "See some sample mask .. . .. .", "Mask length is missing though .", "The input-mask is showing up .", "You really dont need regex for this all you re doing is 3 substrings .. . .. . string start to the mask start 1 .. . mask start to mask end 2 .. . mask end to string end .", "I would like mask a bitmap with another bitmap depending on a mask like this :", "The mask lead us to think that the user input will always match this mask .", "Basically adding your mask layer as a sublayer of the view you want to mask .", "Texturing follows : .. . .. . For example using a mask : .. . .. .", "Then the router tells him your mask is .. .", "you are setting wrong edit mask .", "The mask is a black bitmap with a transparent object in it .", "Unfortunately I need to use a mask .", "Which mask I should use", "anybody used mask for date input", "I use jquery-mask plugin .", "Is there way to make date + numbers mask", "so you still want a mask .", "I m playing with the -webkit-mask-box-image css property .", "I end up with a red element in the shape of the mask image .", "I have an image cv : : Mat and a ROI that can be seen as a mask .", "Assuming mask is the same dimension as the image you can easily scale it : -", "I have a base64 .svg image as a mask background applied to an element .", "So you might want to try -webkit-mask-image : url the bg image.png" ] }
{ "confidence": [ 56.31068420410156, 53.801849365234375, 48.884403228759766, 47.703285217285156, 41.49817657470703, 40.13440704345703, 39.58857345581055, 39.36682891845703, 39.269927978515625, 39.26642608642578, 39.23102951049805, 38.54286575317383, 38.54286575317383, 38.52082061767578, 38.48875045776367, 38.13528823852539, 37.93876647949219, 37.63977813720703, 37.26433563232422, 37.223976135253906 ], "content": [ "Question : I have a mask bitmap with a half is red color and ones is transparent like this https : www.dropbox.com s 931ixef6myzusi0 s 2.png .. . .. . I want to use mask bitmap to draw content on canvas only visible in red area code like this : .. . .. . Paint paint new Paint .. . .. . public void draw Canvas canvas draw content here .. . .. . .. . and mask bitmap here paint.setXfermode new PorterDuffXfermode android.graphics.PorterDuff.Mode.DST IN canvas.drawBitmap maskBitmap 0 0 paint .. . .. . .. . .. . The result as my expecting content only visible in red area BUT THE TRANSPARENT AREA BECOME BLACK IS PROBLEM this image result : https : www.dropbox.com s mqj48992wllfkiq s 2 20copy.png Anyone help me .. . Answer : Here is solution which helped me to implement masking .. . .. . the mask should be white image with trasparency . It will work like this : .. . original image http : i.stack.imgur.com NA93J.png + mask http : i.stack.imgur.com JOzj5.png result image http : i.stack.imgur.com Ss1Tz.png Comment : this will be quite slow because the off screen canvas is not hardware accelerated", "Question : I have a mask bitmap with a half is red color and ones is transparent like this https : www.dropbox.com s 931ixef6myzusi0 s 2.png .. . .. . I want to use mask bitmap to draw content on canvas only visible in red area code like this : .. . .. . Paint paint new Paint .. . .. . public void draw Canvas canvas draw content here .. . .. . .. . and mask bitmap here paint.setXfermode new PorterDuffXfermode android.graphics.PorterDuff.Mode.DST IN canvas.drawBitmap maskBitmap 0 0 paint .. . .. . .. . .. . The result as my expecting content only visible in red area BUT THE TRANSPARENT AREA BECOME BLACK IS PROBLEM this image result : https : www.dropbox.com s mqj48992wllfkiq s 2 20copy.png Anyone help me .. . Answer : I encountered the same problem in my custom view and instead of decoding the bitmap from a resource I had created the original bitmap and the masking bitmap from the scratch via canvas.draw methods since both the original and mask are basic shapes . I was getting the blank opaque space instead of a transparent one . I fixed it by setting a hardware layer to my view . More info on why this is to be done here : http : stackoverflow.com a 33483016 4747587", "Question : Trying to figure out the most elegant way to render an image inside of a specific color of mask in C via System.Drawing or equivalent that will work in both desktop and ASP.NET applications . The mask image will contain green keys where the image should be painted . Desired Result image below is not perfect hand lasso d.. . .. . .. . Desired Result http : i.stack.imgur.com 7OfF2.png .. . Answer : There are various techniques for this : .. . .. . 1 . Scan pixel data and build a mask image as already suggested by itsme86 and Moby Disk .. . .. . 2 . A variant of scanning that builds a clipping region from the mask and uses that when drawing refer to this article http : bobpowell.net region from bitmap.aspx by Bob Powell .. . .. . 3 . Use color keys to mask in the Graphics.DrawImage call . I ll focus on the third option . Assuming that the image color that you want to eliminate from your mask is Color.Lime we can use ImageAttributes.SetColorKey to stop any of that color from being drawn during a call to Graphics.DrawImage like this : .. . .. . And the results : Results http : imgur.com LEIdRsE.png .. . .. . You can use the same technique with color key on Color.Fuchsia if you want to put those bits of tree into another image . Comment : Awesome and straightforward . The only flaw I see here which I should have addressed in the question is if I wanted a transparent background instead of Fuschia it would draw the image inside the Lime area as well as the transparent area correct Comment : If the empty mask area the fuchsia area in the sample mask is transparent then you ll need a different method . You can draw the mask onto a fuchsia background to get the mask above then color key the output above onto a transparent bitmap - one extra color key operation basically . For small bitmaps it s probably better to build a clipping region - see Bob Powell s article I linked in my answer .", "Question : null .. . Answer : I was draing a text area using CGContextClipToMask . Which i want to draw a background-image clip to a text mask . 1 . I drawing a clear background . 2 . I drawing a text with black color . 3 . get image from current context . 4 . draw a red color background . 5 . drawing using CGContextClipToMask with mask image . After that I want to get a red color text drawn in the screen . But the mask just not working I got a red color background not masks to mask image . The Demo project can be found here : https : github.com 6david9 TextMask .. . .. . The result : enter image description here http : i.stack.imgur.com WgeGs.png", "Question : Trying to figure out the most elegant way to render an image inside of a specific color of mask in C via System.Drawing or equivalent that will work in both desktop and ASP.NET applications . The mask image will contain green keys where the image should be painted . Desired Result image below is not perfect hand lasso d.. . .. . .. . Desired Result http : i.stack.imgur.com 7OfF2.png .. . Answer : You could probably read in the mask and translate it into an image that has the alpha channel set to 0 when the pixel is green and the alpha channel set to 0xFF when the pixel is any other color . Then you could draw the mask image over the original image .", "Question : I have an image cv : : Mat and a ROI that can be seen as a mask . I want to show the original image with the ROI blended over it . My mask is smaller than my origiginal image : each element represents a block in the image . Suppose my mask is this note that my mask is NOT a rectangle .. . .. . then I would like to have the parts where mask 1 untouched and the rest blended with a color . This is the code I have .. . .. . How can I do this without the extra clone command since that is not very performant.. . .. . .. . to make it more clear this is an example of what I want the color doesn t really matter enter image description here http : i.stack.imgur.com 11yGD.png Comment : Do you have a set of masks than merged together have the same dimension as the original image Comment : no my image is 640x480 and my mask is 20x15 . But I could transform it to 640x480 if necessary . I just want to do addWeighted for a certain zone of the image and its stupid having to clone the image before.. . .. . Answer : Based on your comment if you can make a mask with the same dimensions as the original image you could directly modify original image pixel values using iterators . Here is a standalone example :", "Question : It seems -moz-mask-image is not supported in Firefox . I am attempting a foreground gradient . I can t use an image as i need the text to be selectable . Does anyone have any ideas for Firefox This version http : lustlab.net projects dev tijdexp grad.php works in chrome and safari .. . .. . css : Comment : Is your background a solid color You could place a pseudo-element on top of the text going from transparent to the background-color . Comment : Hi Duopixel - yeah I tried this but this results in unselectable text . Comment : add pointer-events : none to the gradient element . Comment : perfect thanks for the advice . .. . Answer : According to MDN you can just use mask for Firefox as of Firefox 3.5 : .. . .. . https : developer.mozilla.org en CSS mask .. . .. . However mask requires an SVG image to act as the mask . You might be able to base-64 encode your SVG image into your stylesheet http : stackoverflow.com questions 1124149 embedding-background-image-data-into-css-as-base64-good-or-bad-practice or you can use an SVG image file . Comment : Except you can t use it with gradient you have to use SVG instead https : developer.mozilla.org En Applying SVG effects to HTML content . Comment : Aha yes I see .", "Question : The Problem : .. . I have a set of tabs for navigation that I want to add a mask class to the tab that is active..My goal is to reveal the BODY s background-color and or background-image of the page but only with this active tab . Since the body s background page is dynamic and always changing I can t simply add a background-color to the active tab and call it a day . I have to use a different technique javascript is last resort I want to do this w CSS only . Requirments : .. . .. . .. . I can t use an image for the mask because the tab widths are css displayed w flexbox and stretch across the page . I have to use a solution that masks ELEMENTS only.. . In this case : div class mask div .. . I can t rearrange the HTML structure below. . I have to work w this layout . .. . .. . Fiddle : https : jsfiddle.net oneeezy 7mj8voL8 .. . .. . .. . .. . CODE : .. . .. . .. . margin : 0 padding : 0 box-sizing : border-box .. . .. . Body .. . body background-color : rgb 0 121 191 .. . .. . Header .. . h1 color : white .. . header background-color : rgba 0 0 0 .15 padding : 20px 20px 0 .. . header nav display : flex .. . header nav div flex : 1 color : white background : rgba 0 0 0 .1 margin : 10px 10px 0 padding : 10px border-radius : 10px 10px 0 0 .. . .. . Mask without image .. . header nav div.mask background : rgba 0 0 0 .1 Can mask reveal background-color .. . .. . Main .. . main padding : 20px 20px 0 .. . h2 color : rgba 0 0 0 .54 .. . .. . .. . header .. . h1 Logo h1 .. . .. . nav .. . div class mask Link mask div .. . div class Link div .. . div class Link div .. . nav .. . header .. . .. . main .. . h2 CSS Masking h2 .. . p Possible to css mask without an image Hmmmmmm...... . p .. . .. . p I want to reveal the color of the BODY s background on the DIV that has the class mask p .. . main Comment : If your body s background is a solid colour you simply have to assign the same colour to the .mask class . However it s difficult if you have a background-image since you are also setting a background for the header element a CSS mask would not work at least at the level of the div class mask because it will only reveal the parent background the dimmed header background instead of the root background body background . You might have to reconsider your design and or markup options . Comment : This is actually being created for a Trello extension. . It would be awesome if I could re-write some of there HTML but not an option . I see what you mean with it only revealing the parents dimmed background color. . hmm... . Comment : Your only chance is javascript you have to listen to every change that affect the position of the div and the background css resize scroll and recalculate the offset for the background clip . It s quite easy to do so but the performance might not be as expected . Comment : yeah..that might be a little performance intense . One technique I tried.. . in theory seemed like would work but failed : applying a white tranpsarent rgba 255 255 255 .15 the opposite black dim color for the tab background in order bring it s natural color back. . though it s close my knowledge of how transparency and colors operate has fallen short haha. . Comment : You know what I could do though Use margin to push the tab layer onto the BODY . It s a bit hacky and I hate that idea really...but If I could use the mask effect on the element this might could work . .. . Answer : If there is always an active element and only one active element you can set a shadow on it that gets the desired effect instead of the background on the header .. . .. . .. . margin : 0 padding : 0 box-sizing : border-box .. . .. . Body .. . body background : repeating-linear-gradient 90deg lightblue 0px lightgreen 100px .. . .. . Header .. . h1 color : white .. . header padding : 20px 20px 0 .. . header nav display : flex .. . header nav div flex : 1 color : white background : rgba 0 0 0 .1 margin : 10px 10px 0 padding : 10px border-radius : 10px 10px 0 0 .. . .. . create a shdow on the underlying element reset the default bkg .. . header nav div.mask .. . box-shadow : 0px -1000px 0px 1000px rgba 0 0 0 .1 .. . background-color : transparent .. . .. . .. . Main .. . main padding : 20px 20px 0 .. . h2 color : rgba 0 0 0 .54 .. . .. . .. . header .. . h1 Logo h1 .. . .. . nav .. . div class mask Link mask div .. . div class Link div .. . div class Link div .. . nav .. . header .. . .. . main .. . h2 CSS Masking h2 .. . p Possible to css mask without an image Hmmmmmm...... . p .. . .. . p I want to reveal the color of the BODY s background on the DIV that has the class mask p .. . main Comment : Your code produced a repeating gradient over the entire page..I think I understand your approach but I m not sure your code result matches what your saying : i.imgur.com mTl20Ap.png http : i.imgur.com mTl20Ap.png Comment : I changed the background in the body to make clearer what the body was . just change it back to the original and the result should be ok", "Question : null .. . Answer : Dear stack-overflow community .. . .. . I have a problem concerning the mask property of a CAShapeLayer in iOS Swift . What I am trying to achieve is an eraser that erases parts of a image-layer by masking it . The problem comes in when I try to invert it . I found some good answers on inverting a path but these were only useful when using a filled path . What I try to do is stroke a path and use the inverted one to mask an image . The line width on the stroke should by around 30.0 so it looks like an eraser . I tried different things . My current version looks like this : .. . .. . 1 . Create a CAShapeLayer which holds the path of the eraser-stroke .. . 2 . Set the fill-color of the layer to nil .. . 3 . Set the stroke-color and line width .. . 4 . Add the layer as the mask of the image-layer .. . .. . This is working fine but it only makes the parts of the image visible that are within the stroke . I want to do it reversed . I thought of a black and white mask but this does not work because the mask is delivered through the alpha channel . Does anyone has an idea how to solve the problem", "Question : I ve seen similar questions but haven t found workable answers . I want to mask a UIView using a grey image need to convert to alpha scale for masking . The UIView has background . It should be easy to mask an image but I want to mask any UIView . Any clues will be appreciated . .. . Answer : I ve been working on this problem for a couple of hours and have a solution that I think will do what you want . First create your masking image using whatever means you see fit . Note that we only need the alpha values here all other colours will be ignored so make certain that the method you use supports alpha values . In this example I m loading from a .png file but don t try it with .jpg files as they don t have alpha values . Next create a new layer assign your mask to its contents and set this new layer to your UIView s own layer like so : you should find that this masks the UIView and all its attached subviews : .. . .. . With this done you can set the UIView s background colour to whatever you like and the mask will be used to create a coloured filter . EDIT : As of iOS8 you can now mask a view simply by assigning another view to its maskView property . The general rules stay the same in that the maskView s alpha layer is used to determine the opacity of the view it is applied to . Comment : Thanks for your answer . The problem is that I only have images with grey scale alpha 1 for all points . I want to convert the grey scale image to an alpha image . Do you have any idea Comment : Well the best way to do it is to take it into an image-editing suite like Photoshop and do the conversion there . The alternative would be to do it programmatically by making a new image context then going through pixel-by-pixel on the old image reading the grey component and converting that into the alpha component for your new colour before plotting it into your new image . This is laborious and a waste of time though as you d use less processor time by doing it in a paint package . Comment : In photoshop this is easily done : 1 create a new layer 2 fill a portion of it with black 3 give it a layer mask 4 past your greyscale image into the mask . Black transparent White Opaque greys are varying degrees of transparency . 5 Apply the layer mask right-click on the mask itself in the layers panel and click apply layer mask 6 crop out the portion of the layer you need . Comment : I want to say I downvoted on accident and now it won t let me undownvote : This is a great answer", "Question : How can I detect the difference between 2 images creating a mask of the area that s different in order to process the area that s common to both images gaussian blur for example sketch http : i.stack.imgur.com dICyo.png .. . .. . EDIT : I m currently using this code to get the RGBA value of pixels : .. . .. . The problem is the images are being captured from the iPhone s camera so they are not exactly the same position . I need to create areas of a couple of pixels and extracting the general color of the area maybe by adding up the RGBA values and dividing by the number of pixels . How could I do this and then translate it to a CGMask I know this is a complex question so any help is appreciated . Thanks . .. . Answer : Every pixel which does not have a suitably similar pixel in the other image within a certain radius can be deemed to be part of the mask . It s slow though there s not much that would be faster but it works fairly simply .", "Question : I want to draw on a bitmap using another bitmap as mask . The mask is a black bitmap with a transparent object in it . I want this transparent part to be filled with an arbitrary color and added to my original image . How can this be done enter image description here http : i.stack.imgur.com tcWUu.png .. . .. . + .. . .. . enter image description here http : i.stack.imgur.com qATOJ.png .. . .. . + blue color .. . .. . enter image description here http : i.stack.imgur.com 3GBqD.png Comment : do you have any choice possibility to change the masks e.g . using white object on transparent background then you could use some kind of multiply between mask and blue color Comment : in either case this guide could help you to do what you d like kevindion.com 2011 01 android-bitmap-blending-color-channels http : kevindion.com 2011 01 android-bitmap-blending-color-channels Comment : Yes I believe I could change the masks . The link provided is great Thanks .. . Answer : I had to change the masks as described by @Christian . Then the wanted result could easily be produced :", "Question : I want to draw on a bitmap using another bitmap as mask . The mask is a black bitmap with a transparent object in it . I want this transparent part to be filled with an arbitrary color and added to my original image . How can this be done enter image description here http : i.stack.imgur.com tcWUu.png .. . .. . + .. . .. . enter image description here http : i.stack.imgur.com qATOJ.png .. . .. . + blue color .. . .. . enter image description here http : i.stack.imgur.com 3GBqD.png Comment : do you have any choice possibility to change the masks e.g . using white object on transparent background then you could use some kind of multiply between mask and blue color Comment : in either case this guide could help you to do what you d like kevindion.com 2011 01 android-bitmap-blending-color-channels http : kevindion.com 2011 01 android-bitmap-blending-color-channels Comment : Yes I believe I could change the masks . The link provided is great Thanks .. . Answer : If you re setting this to an ImageView a quick way is to set the background to the gradient drawable and a blue T with a transparent background as the ImageView s source . Not fancy but fast and simple", "Question : I have an image cv : : Mat and a ROI that can be seen as a mask . I want to show the original image with the ROI blended over it . My mask is smaller than my origiginal image : each element represents a block in the image . Suppose my mask is this note that my mask is NOT a rectangle .. . .. . then I would like to have the parts where mask 1 untouched and the rest blended with a color . This is the code I have .. . .. . How can I do this without the extra clone command since that is not very performant.. . .. . .. . to make it more clear this is an example of what I want the color doesn t really matter enter image description here http : i.stack.imgur.com 11yGD.png Comment : Do you have a set of masks than merged together have the same dimension as the original image Comment : no my image is 640x480 and my mask is 20x15 . But I could transform it to 640x480 if necessary . I just want to do addWeighted for a certain zone of the image and its stupid having to clone the image before.. . .. . Answer : Is your mask of constant colour Assuming mask is the same dimension as the image you can easily scale it : - Comment : I like your solution.. . I was just hoping thinking there might be and openCV function for this that I didn t know about.. . Comment : I don t know much about OpenCV perhaps there is a way . Alternatively you could store all pixel positions you need to modify once in a vector and do the processing later .", "Question : I m currently looking for a way to use a black and white bitmap to mask the alpha channel of another bitmap or Drawable on Android . I m curious as to what the best way to do this is . I certainly have a couple of ideas for how to do this but they are not optimal . I need to be able to apply a new mask to the image every so often the black and white bitmap will-change every few seconds . Any feedback on how to achieve this would be greatly appreciated . Comment : I m trying to use the black portions of the mask bitmap to set the alpha channel of the corresponding pixel on the other bitmap Drawable to 0 . .. . Answer : Using the Xfermodes example in the API Demo I was able to use a PorterDuffXfermode applied to a Paint object to blend together two bitmaps on a canvas . This works exactly how I need it to . Comment : Could you add more details", "Question : Trying to figure out the most elegant way to render an image inside of a specific color of mask in C via System.Drawing or equivalent that will work in both desktop and ASP.NET applications . The mask image will contain green keys where the image should be painted . Desired Result image below is not perfect hand lasso d.. . .. . .. . Desired Result http : i.stack.imgur.com 7OfF2.png .. . Answer : You want something like this :", "Question : null .. . Answer : I m using http : www.igorescobar.com blog 2012 05 06 masks-with-jquery-mask-plugin http : www.igorescobar.com blog 2012 05 06 masks-with-jquery-mask-plugin .. . .. . Example : .. . .. . I m trying to see if there is a way for the mask to remove 1 if its the first character of the area code . The issue happens when you use a number for example like . 1-212-967-4456 When using the mask like it is now it will show . 121-296-744 So the idea is to not allow the mask to add a 1 as the first number of the area code . Anyone know how to do this .", "Question : I have an image cv : : Mat and a ROI that can be seen as a mask . I want to show the original image with the ROI blended over it . My mask is smaller than my origiginal image : each element represents a block in the image . Suppose my mask is this note that my mask is NOT a rectangle .. . .. . then I would like to have the parts where mask 1 untouched and the rest blended with a color . This is the code I have .. . .. . How can I do this without the extra clone command since that is not very performant.. . .. . .. . to make it more clear this is an example of what I want the color doesn t really matter enter image description here http : i.stack.imgur.com 11yGD.png Comment : Do you have a set of masks than merged together have the same dimension as the original image Comment : no my image is 640x480 and my mask is 20x15 . But I could transform it to 640x480 if necessary . I just want to do addWeighted for a certain zone of the image and its stupid having to clone the image before.. . .. . Answer : Basically you want to have a check if your are inside the roi . Then it should return a pointer to your original image . If your are not inside you want to have some kind of colour . Your could do that with your own wrapper for Mat . I don t think you can point a subImage of an image onto another image . That means that i don t think you can redirect the pixel in your blue image onto your original image Comment : as I put in my title and in my image but this was not clear by my code example my ROI is NOT a rectangle.. . it can be any shape.. . I do want to blend addweighted or something like that but I would like to avoid the extra copy.. . Comment : I edited my question to make it more clear.. . Comment : Sorry but i have no idea if it is possible without a clone .", "Question : How can I detect the difference between 2 images creating a mask of the area that s different in order to process the area that s common to both images gaussian blur for example sketch http : i.stack.imgur.com dICyo.png .. . .. . EDIT : I m currently using this code to get the RGBA value of pixels : .. . .. . The problem is the images are being captured from the iPhone s camera so they are not exactly the same position . I need to create areas of a couple of pixels and extracting the general color of the area maybe by adding up the RGBA values and dividing by the number of pixels . How could I do this and then translate it to a CGMask I know this is a complex question so any help is appreciated . Thanks . .. . Answer : There are three reasons pixels will-change from one iPhone photo to the next the subject changed the iPhone moved and random noise . I assume for this question you re most interested in the subject changes and you want to process out the effects of the other two changes . I also assume the app intends the user to keep the iPhone reasonably still so iPhone movement changes are less significant than subject changes . To reduce the effects of random noise just blur the image a little . A simple averaging blur where each pixel in the resulting image is an average of the original pixel with its nearest neighbors should be sufficient to smooth out any noise in a reasonably well lit iPhone image . To address iPhone movement you can run a feature-detection algorithm on each image look up feature-detection on Wikipedia for a start . Then calculate the transforms needed to align the least changed detected features . Apply that transform to the blurred images and find the difference between the images . Any pixels with a sufficient difference will become your mask . You can then process the mask to eliminate any islands of changed pixels . For example a subject may be wearing a solid colored shirt . The subject may move from one image to the next but the area of the solid colored shirt may overlap resulting in a mask with a hole in the middle . In other words this is a significant and difficult image-processing problem . You won t find the answer in a stackoverflow.com post . You will find the answer in a digital image-processing textbook . Comment : Thanks for your answer Mr . Berna . I know this is a complex question and appreciate your tips . I ll definitely do some image-processing research in order to tackle this problem .", "Question : I am trying to mask an image something like this : .. . .. . enter image description here http : i.stack.imgur.com 0PeR9.png .. . .. . I found this tutorial but it did not mention where I can find Image.png or mask.png TUTORIAL http : iphonedevelopertips.com cocoa how-to-mask-an-image.html comment-47347 .. . .. . Would you please help me EDIT : Comment : I am the person that wrote the original tutorial . The mask image is just a simple greyscale image I created in photoshop . Nothing special about it . The black area become the transparent part of the mask . Keep in mind that any shade of gray is interpreted as a degree of opacity . In this manner masks can be gradients as well which is useful for creating softer borders around a mask . Comment : This have to be same sized right Comment : hyper-elegant code thanks . just a useful link if anyone needs to crop an image before masking.. . stackoverflow.com questions 17712797 http : stackoverflow.com questions 17712797 ios-custom-uiimagepickercontroller-camera-crop-to-square Comment : Any idea about this. . stackoverflow.com questions 28122370 http : stackoverflow.com questions 28122370 masking-and-reverse-masking-in-imageview-ios .. . Answer : This works for me . Comment : thank you this answer is better then other s speaking about performance with more and bigger images . Comment : Any idea about the reverse masking . Reverse of above process .Means I want to remove the fill area make it transparent and Transparent area with fill . Comment : Thanks this code work better than first But i have two troubles : Warning on kCGImageAlphaPremultipliedLast i cast to CGBitmapInfo for fix it AND does not work for retina images can you help me .. . Comment : @Milanpatel The easy solution is to simply invert your colors in the mask image . :" ] }
[ "yes-answer-long", "yes-answer-short" ]
bitmap
UNK_RELATION
dojo.xhrget@api@88
dojo.xhrget -- dojo request xhr deprecates dojo base xhr and is part of dojo s request @placeholder .
{ "confidence": [ 57.452945709228516, 49.93438720703125, 44.68512725830078, 44.68512725830078, 37.38532638549805, 37.38532638549805, 27.126178741455078, 25.22553253173828, 24.581525802612305, 19.806015014648438, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 14.029838562011719, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 12.612445831298828, 10.913662910461426, 10.913662910461426, 10.913662910461426, 10.913662910461426, 10.913662910461426, 10.913662910461426, 10.913662910461426, 10.913662910461426, 10.913662910461426 ], "content": [ "Like the title says I am using the new dojo syntax for the dojo request xhr http : dojotoolkit.org reference-guide 1.10 dojo request xhr.html but this doesn t seem to work and throws an error while loading data while the old syntax with the same url gives the wanted result .", "This is the current syntax which doesn t load data correctly : .. . .. . As you can see I am printing the data to the console and I am getting the right data but the xhr request throws this Error : .. . .. . SyntaxError : Unexpected token o at Object.parse native at l.json http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 228 : 250 at m http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 227 : 277 at j as handleResponse http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 151 : 351 at XMLHttpRequest.e http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 154 : 393 .. . .. . While the following old syntax works perfectly : .. . .. . EDIT : .. . .. . This is my JSON data : .. . .. . Note : I am using dojo 1.8.1 version but I tested it with dojo 1.9.2 too but it still doesn t work .", "dojo request on the other hand uses JSON.parse if available which expects JSON to be well formed e.g .", "Try pasting one of your JSON responses into http : jsonlint.org - if it doesn t validate there then it won t validate with dojo request .", "I am using 1.9.2-20140219-IBM version of dojo which comes with Rational Application Developer .", "As per the xhrPost http : dojotoolkit.org reference-guide 1.9 dojo xhrPost.html document the argument to xhrArgs for data is postData and not data .", "Currently they are independent async xhr calls .. . .. . I want to put these two calls in dojo.all and use the combined results to process the results .", "dojo.xhrGet actually uses eval when handleAs is set to json which will by definition be more permissive than a strict JSON parser .", "The rest service responds correctly when using RESTClient and building the request manually .", "The reason dojo.xhrGet uses eval even though it s potentially unsafe is that it was written prior to widespread JSON.parse support and changing it would have broken backwards compatibility - in other words even without switching APIs developers would run into the problem you re running into right now .", "xhrPost seems to be modifying the URL resulting in either 404 or 405 .", "This is from a custom widget and attempting to go to a REST service on a WebSphere Liberty server .", "I am using var jsonData JSON.stringify domForm.toObject TaskTemplate so I can verify the data is correct and sending the data as that string : data : jsonData .. . .. . the URL is hardcoded in the form and no substitution is currently being used : .. . .. . I also have a GET with a URL of http : localhost : 9080 test2 rm tasks 64 that is working fine .", "Seems to be associated with PUT or POST.. .", "When I do the xhrPost I am getting the following error : NetworkError : 404 Not Found - http : localhost : 9080 test2 undefined .. . .. . since undefined is seen it is like xhrPost is doing some substitution in the hardcode URL.. .", "I have tried both xhrPost and xhrPut with the same results .", "Here is the method that is invoked when the button is pushed : .. . .. . In the server logs I am seeing WARNING SRVE0190E : File not found : undefined and that is coming from the webcontainer makes sense given the error msg above So this means it is not related to my rest service never gets to it .", "This is really starting to delay our project so any ideas about why this might be occurring would be greatly appreciated", "Try to change the attribute of xhrArgs from data to postData .", "In the code you provided url is commented out which would result in xhrPost stringifying undefined and requesting that relative to the same path of the page you re viewing .", "Are you sure that isn t your problem", "I would like to thank both Frank and Ken .", "I am now getting the correct URL and I am getting to my REST service", "I have 3 files under my application folder - Index.html Main.js and state.json .", "The following javascript codes are from the Main.js .", "What is correct url format to fetch data from the state.json", "Apparently url : state.json didn t work .", "Use directly url : state.json", "Use this quick reference to find the right path .", "You should use .. . .. . To reply your question try to use the following if Index.html Main.js and state.json are on the same folder :", "I can t figure out what s the problem .", "Is there something wrong with my code or it s another problem", "Any help whould be appreciated .", "You haven t provided an example of what your original JSON response looks like but I am guessing it is not valid JSON .", "all keys are quoted strings all strings use double quotes .", "Edit : The JSON provided in the question now is valid and works with both the old and new APIs .", "The question is why is the old syntax working perfectly with my json data and not the new one", "I ve already passed my json to jsonlint.org http : jsonlint.org and jsonformat.com http : jsonformat.com too and it was not validated because it was missing the double quote wrapping inside keys but I don t think this was the problem because even when I corrected it it still doesn t work .", "Can you edit your question to include the corrected JSON or a subset of it if it s long", "The invalid JSON likely is the problem since as I explained the old API was more tolerant due to how it processes the data .", "It s the only thing that easily comes to mind given that everything else in your scenario remains constant .", "Thanks for your response I included a subset of my json data as you requested .", "I tested with your JSON and both the old and new APIs seemed to work fine for me .", "gist.github.com kfranqueiro f89ffeb1f41ace33ea68 https : gist.github.com kfranqueiro f89ffeb1f41ace33ea68", "Thanks for this test it works for me too with this valid JSON but the problem is with the old JSON that works with the old syntax but not the new one .", "All in my below scenrio currentroles role1 role2 .. . .. . Currently the code is like below .", "I did something below but getting error .. . .. . Can you please help me how to use in this case", "Error : uncaught TypeError : callback is not a function - this is the error I am getting .", "I think retrieveWorklists method expectiing callback method as one of parameter from calling .", "so how to handle this type of cases .", "retrieveWorklists method is framework code and I cant change it .", "What s the structure of role1 and role2 object .", "retrieveWorklists must be a function of role1 2", "we would need to know how retrieveWorklists is contructed does it use promises because dojo.all is to wait for two deferreds to come back" ] }
{ "confidence": [ 86.0916519165039, 44.95986557006836, 27.24242401123047, 13.969603538513184 ], "content": [ "Question : Like the title says I am using the new dojo syntax for the dojo request xhr http : dojotoolkit.org reference-guide 1.10 dojo request xhr.html but this doesn t seem to work and throws an error while loading data while the old syntax with the same url gives the wanted result . This is the current syntax which doesn t load data correctly : .. . .. . As you can see I am printing the data to the console and I am getting the right data but the xhr request throws this Error : .. . .. . SyntaxError : Unexpected token o at Object.parse native at l.json http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 228 : 250 at m http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 227 : 277 at j as handleResponse http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 151 : 351 at XMLHttpRequest.e http : ajax.googleapis.com ajax libs dojo 1.8.1 dojo dojo.js : 154 : 393 .. . .. . While the following old syntax works perfectly : .. . .. . EDIT : .. . .. . This is my JSON data : .. . .. . Note : I am using dojo 1.8.1 version but I tested it with dojo 1.9.2 too but it still doesn t work . I can t figure out what s the problem . Is there something wrong with my code or it s another problem Any help whould be appreciated . .. . Answer : You haven t provided an example of what your original JSON response looks like but I am guessing it is not valid JSON . dojo.xhrGet actually uses eval when handleAs is set to json which will by definition be more permissive than a strict JSON parser . dojo request on the other hand uses JSON.parse if available which expects JSON to be well formed e.g . all keys are quoted strings all strings use double quotes . Try pasting one of your JSON responses into http : jsonlint.org - if it doesn t validate there then it won t validate with dojo request . The reason dojo.xhrGet uses eval even though it s potentially unsafe is that it was written prior to widespread JSON.parse support and changing it would have broken backwards compatibility - in other words even without switching APIs developers would run into the problem you re running into right now . Edit : The JSON provided in the question now is valid and works with both the old and new APIs . Comment : The question is why is the old syntax working perfectly with my json data and not the new one I ve already passed my json to jsonlint.org http : jsonlint.org and jsonformat.com http : jsonformat.com too and it was not validated because it was missing the double quote wrapping inside keys but I don t think this was the problem because even when I corrected it it still doesn t work . Comment : Can you edit your question to include the corrected JSON or a subset of it if it s long The invalid JSON likely is the problem since as I explained the old API was more tolerant due to how it processes the data . It s the only thing that easily comes to mind given that everything else in your scenario remains constant . Comment : Thanks for your response I included a subset of my json data as you requested . Comment : I tested with your JSON and both the old and new APIs seemed to work fine for me . gist.github.com kfranqueiro f89ffeb1f41ace33ea68 https : gist.github.com kfranqueiro f89ffeb1f41ace33ea68 Comment : Thanks for this test it works for me too with this valid JSON but the problem is with the old JSON that works with the old syntax but not the new one .", "Question : null .. . Answer : xhrPost seems to be modifying the URL resulting in either 404 or 405 . This is from a custom widget and attempting to go to a REST service on a WebSphere Liberty server . The rest service responds correctly when using RESTClient and building the request manually . I am using var jsonData JSON.stringify domForm.toObject TaskTemplate so I can verify the data is correct and sending the data as that string : data : jsonData .. . .. . the URL is hardcoded in the form and no substitution is currently being used : .. . .. . I also have a GET with a URL of http : localhost : 9080 test2 rm tasks 64 that is working fine . Seems to be associated with PUT or POST.. . When I do the xhrPost I am getting the following error : NetworkError : 404 Not Found - http : localhost : 9080 test2 undefined .. . .. . since undefined is seen it is like xhrPost is doing some substitution in the hardcode URL.. . I am using 1.9.2-20140219-IBM version of dojo which comes with Rational Application Developer . I have tried both xhrPost and xhrPut with the same results . Here is the method that is invoked when the button is pushed : .. . .. . In the server logs I am seeing WARNING SRVE0190E : File not found : undefined and that is coming from the webcontainer makes sense given the error msg above So this means it is not related to my rest service never gets to it . This is really starting to delay our project so any ideas about why this might be occurring would be greatly appreciated Comment : As per the xhrPost http : dojotoolkit.org reference-guide 1.9 dojo xhrPost.html document the argument to xhrArgs for data is postData and not data . Try to change the attribute of xhrArgs from data to postData . Comment : In the code you provided url is commented out which would result in xhrPost stringifying undefined and requesting that relative to the same path of the page you re viewing . Are you sure that isn t your problem Comment : I would like to thank both Frank and Ken . I am now getting the correct URL and I am getting to my REST service", "Question : null .. . Answer : All in my below scenrio currentroles role1 role2 .. . .. . Currently the code is like below . Currently they are independent async xhr calls .. . .. . I want to put these two calls in dojo.all and use the combined results to process the results . I did something below but getting error .. . .. . Can you please help me how to use in this case Comment : Error : uncaught TypeError : callback is not a function - this is the error I am getting . I think retrieveWorklists method expectiing callback method as one of parameter from calling . so how to handle this type of cases . retrieveWorklists method is framework code and I cant change it . Comment : What s the structure of role1 and role2 object . retrieveWorklists must be a function of role1 2 Comment : we would need to know how retrieveWorklists is contructed does it use promises because dojo.all is to wait for two deferreds to come back", "Question : I have 3 files under my application folder - Index.html Main.js and state.json . The following javascript codes are from the Main.js . What is correct url format to fetch data from the state.json Apparently url : state.json didn t work . Comment : Use directly url : state.json .. . Answer : Use this quick reference to find the right path . You should use .. . .. . To reply your question try to use the following if Index.html Main.js and state.json are on the same folder :" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
human-language@human-language@75
human-language -- select this tag when you are specifically referencing a @placeholder which can be important with sorting interpretation grammar and other features that are not one-to-one related to a computer language .
{ "confidence": [ 19.026836395263672, 16.608251571655273, 13.57719612121582, 12.55025577545166, 12.55025577545166, 12.55025577545166, 12.55025577545166 ], "content": [ "I have found the frequecny of bigrams in certain sentences using : .. . .. . On printing out the bigrams with the most common frequencies one occurs 7 times wheras all 95 other bigrams only occur 1 time .", "However when comparing the bigrams to my sentences I can see no logical order to the way the bigrams all of frequency 1 are printed out .", "For details look at the source code : .. . https : github.com nltk nltk blob develop nltk compat.py .. . .. . In conclusion without checking all possible version configurations you cannot expect words with equal frequency to be ordered .", "Does anyone know if there is any logic to the way .most common prints the bigrams or is it randomly generated .. . .. . Thanks in advance", "Short answer based on the documentation of collections.Counter.most common https : docs.python.org dev library collections.html collections.Counter.most common : .. . .. . Elements with equal counts are ordered arbitrarily : .. . .. . In current versions of NLTK nltk.FreqDist is based on nltk.compat.Counter .", "On Python 2.7 and 3.x collections.Counter will be imported from the standard-library .", "On Python 2.6 NLTK provides its own implementation ." ] }
{ "confidence": [ 17.163068771362305 ], "content": [ "Question : I have found the frequecny of bigrams in certain sentences using : .. . .. . On printing out the bigrams with the most common frequencies one occurs 7 times wheras all 95 other bigrams only occur 1 time . However when comparing the bigrams to my sentences I can see no logical order to the way the bigrams all of frequency 1 are printed out . Does anyone know if there is any logic to the way .most common prints the bigrams or is it randomly generated .. . .. . Thanks in advance .. . Answer : Short answer based on the documentation of collections.Counter.most common https : docs.python.org dev library collections.html collections.Counter.most common : .. . .. . Elements with equal counts are ordered arbitrarily : .. . .. . In current versions of NLTK nltk.FreqDist is based on nltk.compat.Counter . On Python 2.7 and 3.x collections.Counter will be imported from the standard-library . On Python 2.6 NLTK provides its own implementation . For details look at the source code : .. . https : github.com nltk nltk blob develop nltk compat.py .. . .. . In conclusion without checking all possible version configurations you cannot expect words with equal frequency to be ordered ." ] }
[ "yes-answer-long", "yes-answer-short" ]
human-language
UNK_RELATION
repoze.who@authentication@51
repoze.who -- repoze.who is an identification and @placeholder framework for arbitrary wsgi applications .
{ "confidence": [ 47.38573455810547, 47.38573455810547, 44.0272216796875, 44.0272216796875, 44.0272216796875, 42.348731994628906, 42.348731994628906, 40.432594299316406, 40.432594299316406, 40.432594299316406, 40.432594299316406, 39.161415100097656, 37.259986877441406, 35.59064483642578, 35.59064483642578, 35.59064483642578, 35.59064483642578, 35.59064483642578, 35.59064483642578, 34.3194694519043, 34.3194694519043, 34.3194694519043, 34.3194694519043, 34.3194694519043, 34.3194694519043, 31.57569122314453, 31.356096267700195, 31.356096267700195, 31.356096267700195, 29.30818748474121, 29.30818748474121, 29.30818748474121, 28.037010192871094, 28.037010192871094, 28.037010192871094, 25.70466423034668, 24.433486938476562, 21.97815704345703, 21.739307403564453, 20.77305030822754, 18.551990509033203, 17.45042610168457, 17.45042610168457, 16.823457717895508, 16.121231079101562, 15.55228042602539, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.498690605163574, 14.08764934539795, 14.045124053955078, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758, 12.582551956176758 ], "content": [ "repoze.who is also implicated here .", "This seems to be a problem with repoze.who 1.0.19 .", "It s standard quickstarted app using repoze.who .", "I m using repoze.who FriendlyFormPlugin to handle login logout. .", "Is pyramid who repoze.who the preferred way to do authentication", "I m trying to access the Pylons configuration from inside a repoze.who authenticator . .", "Repoze.who is not logging anything at all so I don t know what s up .", "How do you integrate SPNEGO SSPI with repoze.who and repoze.what", "I have a working repoze.who what setup on a Pylons app .", "pyramid who is the best way to utilize repoze.who v2 for doing authentication .", "What am I supposed to do with repoze.who to make the logout function work", "pip install -U repoze.who 2.2 in the virtualenv gets rid of the problem .", "I m writing a repoze.who plugin http : repozewho.readthedocs.org en latest plugins.html writing-repoze-who-plugins and want to return JSON from the repoze.who authentication middleware and still controll the HTTP status code .", "However I can t figure out how to convince repoze.who that the user is indeed authenticated .", "When the REMOTE USER variable is set beforehand e.g . by the web server repoze.who won t do anything not even call the registered plugins .", "Mister Daniel Holth pointed out the post-logout http : code.gustavonarea.net repoze.who-friendlyform post-logout-action parameter of FriendlyFormPlugin .", "Typically repoze.who is the best solution for doing SSO single sign-on solutions where you need to connect to a service like LDAP .", "if you still want to do it the unpreferred way in old repoze.who v1 following worked for me :", "I m looking around through forums and SO too and I ve fond a solution that could fit : repoze.who what .", "One way to accomplish this is to implement a repoze.who Challenger http : repozewho.readthedocs.org en latest plugins.html challenger-plugins interface .", "After a quick look at authlogic s homepage I would say it can be compared to repoze.who because they both handle authentication .", "PS : Neither repoze.who or repoze.what use Zope it s the wider Repoze project that is related to Zope http : docs.repoze.org hacking overview.html .", "repoze.who uses zope.interface but that s a Zope-independent library which was born within the Zope project .", "It seems like repoze.who should provide something similar but I can t seem to find the magic words .", "Weirdly you can then do pip install -U repoze.who 1.0.19 and downgrade it and the pylint crash is still gone .", "I m using turbogears 2.2 for writing web application like it seems to be really powerful framework however there are many blackboxes like authentication as I don t understand them well repoze.who plugin here .", "Standard ApplicationAuthMetadata.authenticate implementation looks like : .. . .. . If you cannot upgrade TurboGears you must implement a custom repoze.who authenticator which is a bit more complex .", "Alternatively is their any documentation on how to use repoze.who in any way other than the usual approach of asking for a login and password and then submitting that data to login handler .", "But if I then pip install repoze.who 1.0.19 in the virtualenv then the pylint crash above reappears when running : pylint --version in vim but not when running it in my shell .", "As for repoze.what v1 because it is set up from a repoze.who plugin this means the repoze.what credentials won t be available and therefore the user would always be anonymous this won t be a problem in repoze.what 2 under development .", "I ve browsed the repoze.who docs and source code and maybe I m just missing it but I can t find out how to set the logged-in user from code without a new post request going through the middleware .", "I m trying to make bottle.py work with repoze.who and so far have managed to put together the following very simplistic program to get it working using a combination of various examples I ve found .", "Anyway still don t know how it is really working as I m missing any proper documentation in 2.2 as well in 2.3.. . repoze.who don t tell me much in way using in TG.. . Any idea. .", "more specifically i m trying to understand the idea behind repoze.who plugins and so far i get that this should be the way to go about it but i haven t found any examples to achieve what i need .", "I never got to the bottom of what exactly is causing it but I suspect it may be something to do with this item from the repoze.who 2.0a1 changelog : Remove ez setup.py and dependency on it in setup.py support distribute .", "Obviously this isn t something I d run in production I m just trying to make the least complicated code I can so that I can learn how to use this - but unfortunately tutorials for using bottle.py with repoze.who are very few and far between .", "They are listed on turbogears.readthedocs.org en latest turbogears http : turbogears.readthedocs.org en latest turbogears authentication.html adavanced-customizations In your case you need a custom authenticator for which you can look at the repoze.who documentation docs.repoze.org who 2.0 http : docs.repoze.org who 2.0 plugins.html writing-an-authenticator-plugin", "I have been with similar issue all the morning and this is what I found : You must know that right now there s two versions of repoze.who 1 and 2 : .. . .. . In v 1.x : .. . .. . In v 2.x it s easier because it provide and api : .. . .. . Resources : For v1 : http : www.deanlee.cn programming repoze-who-perform-login-programmatically For v2 : http : docs.repoze.org who 2.0 api.html", "I ve tried that but I think I ve narrowed down the problem to an issue with WSGI it works properly if the page is served via ckan serve .", "Authentication framework", "The following solution takes advantage of the fact that the WebOb http : webob.org exceptions in webob.exc http : docs.webob.org en latest modules exceptions.html can be used as a WSGI application .", "I am just starting to learn Pyramid Framework http : docs.pylonsproject.org docs pyramid.html .", "thank you of course I m going to try it but maybe you didn t have clear what a framework is .", "I tried creating an Identifier that looks like this : .. . .. . And registering the middleware later on like this : .. . .. . But it seems that my identifier s identify method is never called by the framework .", "Perhaps you re not clear what a framework is a buzzword referring to a general purpose library for a group of functions code that can be re-used and adapter in order to achieve a desired software product .", "repoze packages seems to use the zope modules at some level. . .. . .. . Are there any equivalent or easier authentication framework like authlogic available in python", "I m using from pylons import config but it looks like it returns a configuration with default values not the ones from production.ini. . What am I missing", "You must using pylons.config after calling load environment global conf app conf in config middleware.py or use direct app conf", "Well the authenticator gets called by the login process so AFAIK I am after the load environment call", "Found a thread http : groups.google.com group pylons-discuss browse thread thread 4462c515178c742a that suggests two options : .. . .. . 1 .", "Passing the config directly to the authenticator instance during middleware setup .. . 2 .", "Adding a pylons.config.update config at the bottom of load environment", "I installed CKAN from the package then reconfigured it to serve only through Apache .", "Everything worked great at first but now I can t log into the web interface .", "I can create a user but they get an error : .. . .. . Login failed .", "Bad username or password .", "Password reset works but they still can t log in .", "The weird thing is I can use the REST API with the api-key for the user obtained through paster and get a response .", "This is very tough to answer without more information .", "There is a real possibility that the password is somehow being submitted wrong .", "One suggestion would be to reset the password from the command-line with a specific password and see what happens use paster user -h to see options for managing users from command-line .", "I m using the standard configuration that comes with the package except with the port value changed to 80 and ServerName changed to my FQDN", "Are you proxying the app", "You may need to make sure credentials are forwarded appropriately .", "Just remembered that I never actually posted to this when I figured it out .", "It turns out the server was mangling requests due to hardware issues .", "An install on a different box worked perfectly .", "I have setup my own pypi server using the ClueReleaseManager framework https : pypi.python.org pypi ClueReleaseManager and I defined a user for testing purposes only as follows : .. . .. . Then I started the server with .. . .. . and tried to login on the site localhost : 8081 as test with password test .", "The following example shows how this can be used in a hypothetical Facebook plugin where the 2.x API https : developers.facebook.com docs graph-api reference v2.0 user-permissions lets users not grant access to their email which might be required for a successful registration authentication : .. . .. . A central point here is that response an instance of a sub-class of webob.exc.WSGIHTTPException is used as a WSGI application but also that if response s body attribute is set then it is not automatically generated a fact we use to explicitly set the response s body to a JSON-formatted string representation of our dictionary .", "I m interested in improving security of my TurboGears 2.2 application so that when user changes his password it logs him out from all sessions and he must login again .", "The goal is when user changes password on browser 1 he must relogin on browser 2 too .", "Experiments show that this is not the case especially if browser 2 had remember-me enabled .", "It seems maybe I need to change AuthTktCookiePlugin but don t see a way to do it without much rewiring .", "Storing a timestamp of the last time password got changed inside request.identity userdata should make possible to check it whenever the user gets back and log him out if it s different from the last time the password got changed for real .", "im using FriendlyFormPlugin but would like to retrieve the username that was input as part of the request.params but its no longer there when i check .", "this way i can set the default for username if the password is incorrect .", "thanks", "I think what you need to do is to setup a post login handler action when you setup the middleware .", "In that action you can then check params set a session var etc .", "I had to hook into here in order to create a message to the user that their login had failed .", "I check for a login failed param on the login form .", "In response for more details too big to add as another comment : .. . .. . So I ve got a few things you can look at .", "First this is my docs I m writing as a repoze summary to help explain to other devs how this stuff works terminology used : .. . .. . http : 72.14.191.199 docs morpylons auth overview.html .. . .. . I started out using the repoze sql quickstart plugin : http : code.gustavonarea.net repoze.what-quickstart .. . .. . I then ripped out their setup sql auth and modified it for our own needs since we do both SQL and LDAP auth in our apps .", "Go make sure to look at the plugin source for setup sql auth and go through it until you really understand what it s doing .", "and since you asked on middleware config.. .", "can u show how to handle it in middleware.py in python", "im new", "Ok updated the answer to include more notes details on setting it up .", "thanks will do", "I ve been working on renaming TurboGears 2 s Repoze groups field to roles to free the namespace and db tables for other purposes .", "Also roles makes much more sense to me then groups because I have a strong Drupal background .", "Now I have found some of the docs to do this such as these : .. . .. . http : www.turbogears.org 2.1 docs main Auth Customization.html customizing-the-model-structure-assumed-by-the-quickstart .. . .. . http : code.gustavonarea.net repoze.what-quickstart customizing-the-model-definition .. . .. . However these only go part of the way .", "I have made I m pretty sure at least I ve double checked a few times .", "all the changes required as you can see in this diff http : bazaar.launchpad.net biosinteractive biosin-haven main revision 2 .", "This seems to work fine however I ve ran into a rather major issue with the TurboGears Admin system .", "I ve tried http : turbogears.org 2.0 docs main Extensions Admin index.html and it didn t seem to make any difference however I m not 100 sure I did it correctly .", "The problem occurs when I attempt to go to localhost admin permissions .", "It causes a Internal Server Error and outputs the following error .", "http : pastebin.com YWMH3SiU This error does not happen on the Roles Users pages and the permissions edit 1 also works .", "I m running kubuntu 10.04 with TG 2.1b2 ." ] }
{ "confidence": [ 57.77709197998047, 56.49605941772461, 54.462791442871094, 53.3587532043457, 53.081199645996094, 50.795658111572266, 50.35756301879883, 47.57685089111328, 47.32914352416992, 46.91374588012695, 44.840755462646484, 44.827919006347656, 44.827919006347656, 43.28017044067383, 39.83612823486328, 38.86539840698242, 36.211509704589844, 34.481101989746094, 15.06972885131836, 12.174057960510254 ], "content": [ "Question : I m writing a repoze.who plugin http : repozewho.readthedocs.org en latest plugins.html writing-repoze-who-plugins and want to return JSON from the repoze.who authentication middleware and still controll the HTTP status code . How can this be done .. . Answer : One way to accomplish this is to implement a repoze.who Challenger http : repozewho.readthedocs.org en latest plugins.html challenger-plugins interface . The following solution takes advantage of the fact that the WebOb http : webob.org exceptions in webob.exc http : docs.webob.org en latest modules exceptions.html can be used as a WSGI application . The following example shows how this can be used in a hypothetical Facebook plugin where the 2.x API https : developers.facebook.com docs graph-api reference v2.0 user-permissions lets users not grant access to their email which might be required for a successful registration authentication : .. . .. . A central point here is that response an instance of a sub-class of webob.exc.WSGIHTTPException is used as a WSGI application but also that if response s body attribute is set then it is not automatically generated a fact we use to explicitly set the response s body to a JSON-formatted string representation of our dictionary . If the above challenger is invoked during the handling of a request to a URL ending in .json or the Accept header includes application json the body of the response might render as something like : .. . .. . and if not then the body will be rendered as HTML :", "Question : I am just starting to learn Pyramid Framework http : docs.pylonsproject.org docs pyramid.html . Is pyramid who repoze.who the preferred way to do authentication What other options do I have .. . Answer : pyramid who is the best way to utilize repoze.who v2 for doing authentication . Whether this is the best authentication solution for you or not is dependent on your needs . Typically repoze.who is the best solution for doing SSO single sign-on solutions where you need to connect to a service like LDAP . If SSO is not a requirement it is typically very simple to either use the pre-baked authentication solutions in pyramid such as AuthTkt or to implement your own authentication policy .", "Question : I m trying to do single sign-on SSO with an intranet web application written in Pylons and I d like to use repoze.what for authorization . I have Apache configured with mod sspi and it correctly authenticates the user and sets the REMOTE USER environment variable . However I can t figure out how to convince repoze.who that the user is indeed authenticated . I tried creating an Identifier that looks like this : .. . .. . And registering the middleware later on like this : .. . .. . But it seems that my identifier s identify method is never called by the framework . How do you integrate SPNEGO SSPI with repoze.who and repoze.what .. . Answer : When the REMOTE USER variable is set beforehand e.g . by the web server repoze.who won t do anything not even call the registered plugins . As for repoze.what v1 because it is set up from a repoze.who plugin this means the repoze.what credentials won t be available and therefore the user would always be anonymous this won t be a problem in repoze.what 2 under development . To make everything work as you expect you can keep the identifier you wrote and pass the remote user key argument to setup auth : .. . .. . HTH . Comment : Brilliant Thanks a bunch :", "Question : I am trying to understand architecture of authlogic and repoze.what who libraries but I could get the first level architectural definition . repoze packages seems to use the zope modules at some level. . .. . .. . Are there any equivalent or easier authentication framework like authlogic available in python I do not use Django. . I use Pylons .. . .. . Anyone has more insight into these libraries .. . Answer : After a quick look at authlogic s homepage I would say it can be compared to repoze.who because they both handle authentication . On the other hand repoze.what handles authorization . For more information you may want to see this : http : gustavonarea.net blog posts repoze-auth .. . .. . HTH . PS : Neither repoze.who or repoze.what use Zope it s the wider Repoze project that is related to Zope http : docs.repoze.org hacking overview.html . repoze.who uses zope.interface but that s a Zope-independent library which was born within the Zope project .", "Question : I m trying to make bottle.py work with repoze.who and so far have managed to put together the following very simplistic program to get it working using a combination of various examples I ve found . Obviously this isn t something I d run in production I m just trying to make the least complicated code I can so that I can learn how to use this - but unfortunately tutorials for using bottle.py with repoze.who are very few and far between . This example below works and allows someone to login with username password of admin admin . What am I supposed to do with repoze.who to make the logout function work I gather there s a forget function that might be for this purpose but I can t work out how I m meant to call it . Thanks . .. . Answer : if you still want to do it the unpreferred way in old repoze.who v1 following worked for me :", "Question : I have a working repoze.who what setup on a Pylons app . I now want to automatically log new users in after signup without them having to use the login form . I ve browsed the repoze.who docs and source code and maybe I m just missing it but I can t find out how to set the logged-in user from code without a new post request going through the middleware . Is this possible .. . Answer : I have been with similar issue all the morning and this is what I found : You must know that right now there s two versions of repoze.who 1 and 2 : .. . .. . In v 1.x : .. . .. . In v 2.x it s easier because it provide and api : .. . .. . Resources : For v1 : http : www.deanlee.cn programming repoze-who-perform-login-programmatically For v2 : http : docs.repoze.org who 2.0 api.html", "Question : I m having a problem with running pylint from inside vim which you need to do if you are using the syntastic https : github.com scrooloose syntastic plugin . For example : pylint --version crashes with this traceback : .. . .. . I ve also seen the same error prospector http : prospector.readthedocs.org en latest running inside Vim . But I cannot reproduce the error from outside of Vim . In a shell . If I activate my Python virtual environment in a shell then run pylint --version I get : .. . .. . If I then run vim in the same shell and do : pylint --version in Vim I get the traceback above . Quit Vim and run pylint --version in the shell again and it s fine . There must be something different between the environment that vim runs the command in and my shell environment that is triggering the crash . But I don t know how to investigate this hence this question with the vim tag . repoze.who is also implicated here . If I destroy my virtualenv and create a new virtualenv with nothing but pylint and other syntax checkers installed in it then everything works fine both inside and outside of vim . But if I then pip install repoze.who 1.0.19 in the virtualenv then the pylint crash above reappears when running : pylint --version in vim but not when running it in my shell . Vim version 7.4 installed from package on Ubuntu 14.04 . .. . Answer : This seems to be a problem with repoze.who 1.0.19 . pip install -U repoze.who 2.2 in the virtualenv gets rid of the problem . Weirdly you can then do pip install -U repoze.who 1.0.19 and downgrade it and the pylint crash is still gone . I never got to the bottom of what exactly is causing it but I suspect it may be something to do with this item from the repoze.who 2.0a1 changelog : Remove ez setup.py and dependency on it in setup.py support distribute .", "Question : In TG1 you could change the logged in user by doing something like : .. . .. . Is it possible to do something similar in TG2 It seems like repoze.who should provide something similar but I can t seem to find the magic words . Alternatively is their any documentation on how to use repoze.who in any way other than the usual approach of asking for a login and password and then submitting that data to login handler . Where is the code that processes login handler Thanks .. . Answer : You can use the identifier to remember a new user . By default in TurboGears2 users are identified by their username so you can switch them using the username .", "Question : I am just starting to learn Pyramid Framework http : docs.pylonsproject.org docs pyramid.html . Is pyramid who repoze.who the preferred way to do authentication What other options do I have .. . Answer : I prefer to write my own since it is so simple but there are a couple other options . Here is a nice tutorial on how pyramid authentication works tutorial http : docs.pylonsproject.org projects pyramid en latest tutorials wiki2 authorization.html .", "Question : I m trying to list online users of my Pylons app by analyzing Beaker s sessions directly from the sessionstore type sqla in my case . By online user I mean session has been accessed in the last 30 minutes and it works nicely . My current problem is that when a user logs out the session doesn t get deleted so she still results as online.. . Is there a way to intercept the logout process and remove the session I m using repoze.who FriendlyFormPlugin to handle login logout. . I tried to subclass it and override identify or challenge but when I try to gain access to the session I get a No object name : session has been registered for this thread . Am I going the wrong way .. . Answer : Mister Daniel Holth pointed out the post-logout http : code.gustavonarea.net repoze.who-friendlyform post-logout-action parameter of FriendlyFormPlugin .", "Question : I m trying to make bottle.py work with repoze.who and so far have managed to put together the following very simplistic program to get it working using a combination of various examples I ve found . Obviously this isn t something I d run in production I m just trying to make the least complicated code I can so that I can learn how to use this - but unfortunately tutorials for using bottle.py with repoze.who are very few and far between . This example below works and allows someone to login with username password of admin admin . What am I supposed to do with repoze.who to make the logout function work I gather there s a forget function that might be for this purpose but I can t work out how I m meant to call it . Thanks . .. . Answer : If you can I would use RedirectingFormPlugin rather than FormPlugin . RedirectingFormPlugin allows you to register a logout URL . With it you do not have to implement the logout handler as such as the RedirectingFormPlugin intercepts the request and handles the calls to forget etc . for you . I have used this with Bobo and appengine and it works well . Comment : Thanks that looks like a better way of doing it although now I m stuck in a different way.. . Comment : let me know if your stuck I might be able to help I have used it extensively for custom auth on appengine . though not with bottle I used bobo for url-mapping .", "Question : I m trying to access the Pylons configuration from inside a repoze.who authenticator . . I m using from pylons import config but it looks like it returns a configuration with default values not the ones from production.ini. . What am I missing .. . Answer : You must using pylons.config after calling load environment global conf app conf in config middleware.py or use direct app conf Comment : Well the authenticator gets called by the login process so AFAIK I am after the load environment call", "Question : I m trying to access the Pylons configuration from inside a repoze.who authenticator . . I m using from pylons import config but it looks like it returns a configuration with default values not the ones from production.ini. . What am I missing .. . Answer : Found a thread http : groups.google.com group pylons-discuss browse thread thread 4462c515178c742a that suggests two options : .. . .. . 1 . Passing the config directly to the authenticator instance during middleware setup .. . 2 . Adding a pylons.config.update config at the bottom of load environment", "Question : I m using turbogears 2.2 for writing web application like it seems to be really powerful framework however there are many blackboxes like authentication as I don t understand them well repoze.who plugin here . Requirements .. . .. . User password has to be saved in different table .. . Decrease database queries and not to load user by every request however solve update user e.g . permissions when needed .. . Do not load password by every user query .. . Be ready for openID and similar login .. . Have control during authentication suspended user etc . Current state .. . .. . I have defined basic models in model.auth - user group permission - and model.company as foreign key from user . I m including the user model as most important : .. . .. . Here is current state how I get data in app cfg.py : .. . .. . And the login action in root.py controller piece of code I somewhere get : .. . .. . However these is getting user information by every request as well the user password with it : .. . .. . Final question .. . .. . Please tell me how to understand authentication in Turbogears and fix it to fullfill all the requirements in clean way Thank you in advance . UPDATE .. . .. . Please provide solution for TG 2.2 as upgrade is not possible . .. . Answer : I suggest you to upgrade to TurboGears 2.3 more recent versions support an authenticate method in ApplicationAuthMetadata which makes easy to provide custom check of username and password validity . Standard ApplicationAuthMetadata.authenticate implementation looks like : .. . .. . If you cannot upgrade TurboGears you must implement a custom repoze.who authenticator which is a bit more complex . You can find some documentation on it at http : turbogears.readthedocs.org en latest turbogears authentication.html Comment : Thank you for your reply it means that authenticate method is not there in version 2.2 that I cannot find it Maybe possible to use AuthenticationForgerPlugin class in 2.2 I m not sure about upgrading gearbox is not a problem but I m using sqlalchemy-migrate with sqlalchemy 0.8 well as I have fixed one problem in it using postgres everything working fine.. . Anyway still don t know how it is really working as I m missing any proper documentation in 2.2 as well in 2.3.. . repoze.who don t tell me much in way using in TG.. . Any idea. . Comment : Gearbox has sqlalchemy-migrate still available through the sqla-migrate command I really suggest you to try upgrading it makes a lot easier to do what you need . If you are stuck with 2.2 there are a bunch of configuration options where to add custom authenticators identifiers and so on . They are listed on turbogears.readthedocs.org en latest turbogears http : turbogears.readthedocs.org en latest turbogears authentication.html adavanced-customizations In your case you need a custom authenticator for which you can look at the repoze.who documentation docs.repoze.org who 2.0 http : docs.repoze.org who 2.0 plugins.html writing-an-authenticator-plugin Comment : Thank you will check this out and return back to this little bit later.. .", "Question : I installed CKAN from the package then reconfigured it to serve only through Apache . Everything worked great at first but now I can t log into the web interface . I can create a user but they get an error : .. . .. . Login failed . Bad username or password . Password reset works but they still can t log in . Repoze.who is not logging anything at all so I don t know what s up . The weird thing is I can use the REST API with the api-key for the user obtained through paster and get a response . .. . Answer : This is very tough to answer without more information . There is a real possibility that the password is somehow being submitted wrong . One suggestion would be to reset the password from the command-line with a specific password and see what happens use paster user -h to see options for managing users from command-line . Comment : I ve tried that but I think I ve narrowed down the problem to an issue with WSGI it works properly if the page is served via ckan serve . I m using the standard configuration that comes with the package except with the port value changed to 80 and ServerName changed to my FQDN Comment : Are you proxying the app You may need to make sure credentials are forwarded appropriately . Comment : Just remembered that I never actually posted to this when I figured it out . It turns out the server was mangling requests due to hardware issues . An install on a different box worked perfectly .", "Question : I m interested in improving security of my TurboGears 2.2 application so that when user changes his password it logs him out from all sessions and he must login again . The goal is when user changes password on browser 1 he must relogin on browser 2 too . Experiments show that this is not the case especially if browser 2 had remember-me enabled . It s standard quickstarted app using repoze.who . It seems maybe I need to change AuthTktCookiePlugin but don t see a way to do it without much rewiring . .. . Answer : Storing a timestamp of the last time password got changed inside request.identity userdata should make possible to check it whenever the user gets back and log him out if it s different from the last time the password got changed for real .", "Question : I m developing a REST API in python with tornado and I m going to implement the authentication and authorization trying to avoid lock-in to other big projects i.e django . I m looking around through forums and SO too and I ve fond a solution that could fit : repoze.who what . It seems a good solution but I m a bit scared about the activity of the projects repoze.what last release seems to be 1.0.9 2010-03-04 and if it can work with async IO . Anyone have tried it and or knows something else Comment : How about you test it And what something else are you looking for Authentication framework How about OAUTH LDAP MySQL backend Comment : thank you of course I m going to try it but maybe you didn t have clear what a framework is . Comment : Perhaps you re not clear what a framework is a buzzword referring to a general purpose library for a group of functions code that can be re-used and adapter in order to achieve a desired software product . In other words an API for an authentication mechanism and there s plenty of them they are called OAUTH and LDAP for instance they are frameworks on which you base your authentication and there s plenty of API modules for them . Comment : i wrote a simple session manager by redis to authentication authorization users . .. . Answer : Few months ago I wrote python-auth http : auth.readthedocs.org en latest . It s simple to use with a RESTFul API . Install : .. . .. . Run : .. . .. . Usage : .. . .. . In your code : .. . .. . Or use RESTFul API http : auth.readthedocs.org en latest restful-api-helpers", "Question : i want to modify authentication behaviour so that the whole process can be done on the client-side through xhr . so for example when i sumbit the login form login handler would return a some json data on success and error instead of loading up new html pages or having a redirect of any sort . what should i look into to do this .. . Answer : If you extract the username and password and send them to a login script as parameters you could then validate the user and return results accordingly . Where the script would look something like this : .. . .. . I would suggest against this though since the process itself is riddled with security issues and vulnerabilities . If you can get away with posting credentials securely to a server and allowing the web server to handle the session setting the cookie and properly authenticating then try to do so . Comment : even though what you said can be adapted to python and therefore tg2 what i m looking for is how i would go about modifying repoze.who s preconfigured behaviour . Comment : more specifically i m trying to understand the idea behind repoze.who plugins and so far i get that this should be the way to go about it but i haven t found any examples to achieve what i need .", "Question : I have setup my own pypi server using the ClueReleaseManager framework https : pypi.python.org pypi ClueReleaseManager and I defined a user for testing purposes only as follows : .. . .. . Then I started the server with .. . .. . and tried to login on the site localhost : 8081 as test with password test . It does not work I am unable to login as user test - the login window just pops up again . ClueReleaseManager seems to use werkzeug 0.4.1 and repoze-who 1.0.19 . Any idea on how to fix this problem are welcome . .. . Answer : I ran into the same issue whilst playing around with ClueReleaseManager . The solution was as simple as restarting the server and clearing the cache . FYI this is the list of packages and their versions that I used", "Question : im using FriendlyFormPlugin but would like to retrieve the username that was input as part of the request.params but its no longer there when i check . this way i can set the default for username if the password is incorrect . thanks .. . Answer : I think what you need to do is to setup a post login handler action when you setup the middleware . In that action you can then check params set a session var etc . I had to hook into here in order to create a message to the user that their login had failed . I check for a login failed param on the login form . In response for more details too big to add as another comment : .. . .. . So I ve got a few things you can look at . First this is my docs I m writing as a repoze summary to help explain to other devs how this stuff works terminology used : .. . .. . http : 72.14.191.199 docs morpylons auth overview.html .. . .. . I started out using the repoze sql quickstart plugin : http : code.gustavonarea.net repoze.what-quickstart .. . .. . I then ripped out their setup sql auth and modified it for our own needs since we do both SQL and LDAP auth in our apps . Go make sure to look at the plugin source for setup sql auth and go through it until you really understand what it s doing . and since you asked on middleware config.. . Comment : can u show how to handle it in middleware.py in python im new Comment : Ok updated the answer to include more notes details on setting it up . Comment : thanks will do" ] }
[ "yes-answer-long", "yes-answer-short" ]
authentication
UNK_RELATION
weblogic@server@54
weblogic -- weblogic server is a java-ee application @placeholder from oracle .
{ "confidence": [ 52.033626556396484, 52.033626556396484, 51.02385330200195, 47.52545928955078, 46.5904655456543, 44.501224517822266, 43.77989959716797, 43.484188079833984, 43.38616180419922, 42.2935791015625, 42.03373336791992, 41.514183044433594, 40.75492858886719, 40.7392692565918, 40.64680862426758, 40.175079345703125, 39.743473052978516, 39.448272705078125, 39.394432067871094, 39.394432067871094, 38.98428726196289, 38.60142135620117, 38.60142135620117, 38.47673034667969, 38.317848205566406, 38.23444366455078, 38.076393127441406, 38.072757720947266, 37.79300308227539, 37.6298828125, 37.601402282714844, 37.586448669433594, 37.586448669433594, 37.565940856933594, 37.514041900634766, 37.5069465637207, 37.47099685668945, 37.47099685668945, 37.47099685668945, 37.44365310668945, 37.22954177856445, 37.116756439208984, 37.065914154052734, 36.97834014892578, 36.71558380126953, 36.71558380126953, 36.67814636230469, 36.67814636230469, 36.64052200317383, 36.614906311035156, 36.614906311035156, 36.60152053833008, 36.590911865234375, 36.456024169921875, 36.37162399291992, 36.339149475097656, 36.215118408203125, 36.214569091796875, 36.214569091796875, 36.142173767089844, 36.12214279174805, 36.00779342651367, 35.89694595336914, 35.89694595336914, 35.89694595336914, 35.850399017333984, 35.84402084350586, 35.802032470703125, 35.752532958984375, 35.71281433105469, 35.701820373535156, 35.701820373535156, 35.687557220458984, 35.66626739501953, 35.64061737060547, 35.64061737060547, 35.64061737060547, 35.64061737060547, 35.64061737060547, 35.58924102783203, 35.53167724609375, 35.28139877319336, 35.21479415893555, 35.08474349975586, 35.05009841918945, 35.04973602294922, 35.02098846435547, 34.9870491027832, 34.91404724121094, 34.84980010986328, 34.816322326660156, 34.816322326660156, 34.816322326660156, 34.816322326660156, 34.600162506103516, 34.59202194213867, 34.589683532714844, 34.589683532714844, 34.589683532714844, 34.589683532714844 ], "content": [ "EDIT : We are using WebLogic Portal from Oracle", "We are using WebLogic Portal from Oracle", "I have a Java EE application running on Weblogic Java Application server .", "In WebLogic there is a shared Java EE library that is included with WebLogic for JSF 2.0 .", "BEA WebLogic or Oracle WebLogic", "I want to migrate database server from Oracle 9i to Oracle 11g WebLogic version is 8.1 SP5 .", "The application server is WebLogic 10 .", "I am using WebLogic 10.3 with a Java EE application .", "Oracle WebLogic .", "I have a Java EE 5 Web Application running on WebLogic 10.3.0 .", "I want to know if Struts2 can be deployed to an Oracle Weblogic application server .", "I use JDeveloper 12.1.2.0.0 with Oracle Weblogic Server .", "OWC is similar to Weblogic Portal and runs on Weblogic Server", "I have a java application which needs to be deployed in the weblogic server .", "Since my application uses weblogic 10.3.6 i tried installed the oracle enterprise pack oracle weblogic tools .", "I m new to oracle and trying to start a web application using oracle weblogic .", "I am not sure how to deploy this simple java application to WebLogic server or there is a way to configure the WebLogic server to call a jar file .", "Is there a way to run an OSGi container in the Weblogic Application Server", "install on the weblogic server and netscaler .", "The server is weblogic 10.3 .", "There will therefore still be a product called Oracle Application Server but from version 11g onwards the J2EE server will be WebLogic .", "Set the default application for the server in Weblogic .. . 1 .", "I deployed my web application to Weblogic Server .", "I use Oracle Weblogic Server 10.3.6 EJB 3.0 .", "Stop the weblogic server .. . 2 .", "We are using Oracle Weblogic Server 11g 10.3.6 on a solaris box .", "WebLogic Server comes with a built-in adapter for Tuxedo call the WebLogic Tuxedo Connector .", "We developed a Seam 2 based Java EE 5 application and it runs on Weblogic 11g .", "I have been in the process of upgrading from WebLogic 10 to WebLogic 12c .", "I want to deploy the same on the Oracle Weblogic Server Administration Console .", "Weblogic will undeploy the application .", "I have a web application deployed in Weblogic server .", "Will they retire their previous application server in favor of WebLogic", "WebLogic Server Version : 10.3.0.0 .. . .. . I face the below issue while trying to deploy my application in WebLogic .. . .. .", "When you deploy a resource or an application to a WebLogic cluster all cluster members weblogic server instances will serve the resource or the application .", "Oracle has put BEA Weblogic on the Strategic Products list and the Oracle Application Server on the Continue and Converge list .", "the app server runs weblogic .", "Start WebLogic Server .. . 2 .", "Stop WebLogic Server .. . 5 .", "From Oracle documentation http : docs.oracle.com cd E15523 01 web.1111 e14140 intro.htm WLDCW101 : .. . .. . A domain is the basic administrative unit of WebLogic Server .", "At the weblogic.xml appears : .. . .. . Also at the weblogic-application.xml : .. . .. . My version of Weblogic Server is 9.2 .", "i recently upgraded from BEA Weblogic3 to Oracle Enterprise Weblogic 12 .", "I am migrating application from WebLogic to Tomcat .", "I am using weblogic server and was trying to get the JFRs for my Weblogic Server .", "Now we tried to migrate the application to Oracle WebLogic 10.3.5 .", "Oracle announced Coherence application will support library-ref in WebLogic 12.2.1 .", "Environment : Weblogic Server 12c JSF2", "WebLogic Server does not provide this feature .", "Does anybody knows how to verify the supported versions of Sybase by a particular version of Oracle Weblogic Application server", "We are developing web app deployed on Oracle WebLogic Server .", "Oracle has announced that their new strategic J2EE server is WebLogic .", "Remove all war files from the autodeploy folder in weblogic 3.Then start the weblogic server again .. . 3 .", "Oracle will release a 11g version oc4j but after that Oracle WebLogic Server https : en.wikipedia.org wiki Oracle WebLogic Server WLS will be the preferred Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition server .", "The server is WebLogic 8.1 .", "DB : Oracle Database EE 11.2.0.4.0 Appserver : Weblogic 10.3.6 .. . .. . My use-case is to log ECID being propagated from Weblogic inside database for a particular UI operation .", "Possible duplicate of List all the user in weblogic by java http : stackoverflow.com questions 24650838 list-all-the-user-in-weblogic-by-java", "Possible duplicate of WebLogic clientgen doesn t work from WebLogic http : stackoverflow.com questions 11283489 weblogic-clientgen-doesnt-work-from-weblogic", "The Weblogic Admin Server manages both the JMS and App Weblogic servers .", "Right click on the Weblogic server and navigate to Properties - Weblogic - Publishing .", "Does anybody knows a URL where Oracle mentions the list of Sybase versions that is supported by weblogic 11g 10.3.6 version of weblogic", "I am new in Weblogic server I am using Jdeveloper along with weblogic but after launch the weblogic server i got the following error .", "You will need import the certificate from the WebLogic server to the local keystore being used by your local Java client JVM .", "I deployed a simple web application .war file on Weblogic Server .", "Please note the application works fine in the Integrated weblogic server .", "I ve got the below code working on Weblogic Application Server 10.3.2 .", "Do you have the 64 bit version of Java installed and running on your Weblogic application server as well as the 64 bit Oracle client", "PS : I have a weblogic server hitting this apache proxy server and weblogic server will timeout in 90s.The Idea is weblogic server to timeout before apache proxy server does .", "Weblogic 10.2", "I am using weblogic server 11gR1 .", "When the profiler starts it collects data from the managed weblogic server .", "Please any one advise me How to enable Weblogic server to support partition administrator connect to Weblogic server", "The weblogic server on the testing machine and the weblogic server on the production machine use the same version of jdk 1.6.0 .", "If you happen to hit this issue on Weblogic Server I solved this problem on Weblogic 10.3.0.0 with placing the package org.hibernate to prefer-application-packages at weblogic-application.xml in the EAR : .. . .. . With a properly built application this will prevent Weblogic Server loading the older conflicting library from the server s classpath and make it work as expected .", "We have an old application running on a WebLogic 8.1.5.0 .", "Yes I am using Oracle Workshop for Weblogic .", "I use Oracle Weblogic 12.1.2 as JavaEE container .", "There should be Oracle-provided patches for WebLogic 12.1.1 .", "Oracle purchased BEA and their WebLogic suite of tools .", "Take a look to Oracle Weblogic 10g : S : S", "I assume because you are using weblogic you deploy a java application .", "-- Update 1 -- .. . .. . Found the following in the document Fusion Middleware Securing Oracle WebLogic Server .. . .. . How WebLogic Server Locates Trust .. . .. . WebLogic Server uses the following algorithm when it loads its trusted CA certificates : .. . .. . If the keystore is specified by the -Dweblogic.security.SSL.trustedCAkeystore command-line argument load the trusted CA certificates from that keystore .", "But it s one JVM per CPU for WebLogic and JBOSS and other Java EE app servers that I use .", "I have three options for integrating my appliation with Weblogic : .. . .. . Transforming my application as WebLogic adapter .. . Transforming my application as servlets which will be hosted on WebLogic .", "I am using Java Weblogic postgressql and sql2o .", "The application I m trying to learn is based on BEA Weblogic Portal Server .", "You will find that Weblogic 12.2.1 is not supported for ATG 11.0 but Weblogic 12.1.2 is .", "We have weblogic application servers and oracle http web servers OHS which is basically a modified apache web server .", "I get the following exception in the Weblogic server from the logs it is definitely something internal to the weblogic but not sure which part of the application the weblogic is trying to archive do you know why it is happening", "@duffymo : It surely isn t one JVM per CPU for WebLogic or any other Java EE server for that matter or can you show us any proof of that", "Note : JDK 1.6 Weblogic 10.3.5 is used and SSL is enabled in weblogic .", "No error message on the weblogic server log", "I configured Weblogic server on Netbeans .", "This does not require restart of weblogic server .", "I deploy on WebLogic Server 12.1.3 .", "OSGi has also been used to deliver products like Oracle Complex Event Processor CEP in Oracle SOA Suite from WebLogic Server .", "Yes we are able to write files of any format to the server from java program running in weblogic server .", "I deployed a legacy application on WebLogic 11g .", "I have deployed a GWT application in Weblogic 10 .", "We are using weblogic to deploy our application .", "I m currently working on a prebuilt application running on weblogic ." ] }
{ "confidence": [ 61.936012268066406, 60.03749084472656, 56.887794494628906, 56.656776428222656, 55.36663818359375, 55.335784912109375, 54.9047737121582, 54.09678649902344, 53.460289001464844, 52.945369720458984, 52.389774322509766, 51.48121643066406, 51.44689178466797, 51.40972137451172, 50.849796295166016, 50.137779235839844, 49.79014587402344, 48.82564163208008, 48.748565673828125, 48.62425231933594 ], "content": [ "Question : Oracle purchased BEA and their WebLogic suite of tools . They still have a competing product in their own 10gAS Application Server . Both are Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition enterprise grade servers . While it make take some time due to maintenance agreements it would be unusual for them to continue to produce two products within the same architectural space . So.. . .. . .. . 1 . Will they retire their previous application server in favor of WebLogic 2 . Is WebLogic the one that will be retired 3 . How long of a process is this likely to be Years .. . .. . What have they done with PeopleSoft vs . Oracle Applications Likely the same pattern will be followed . .. . Answer : You can go through a rather long PDF strategy briefing http : download.oracle.com products middleware oracle-middleware-strategy-briefing-072008.pdf from Oracle . The key slide though is probably 48 . Oracle has put BEA Weblogic on the Strategic Products list and the Oracle Application Server on the Continue and Converge list . So Oracle has indicated that the Oracle App Server will be going away in marketing-ese that it will be converged with the BEA products and that BEA Weblogic is the strategic direction going forward . As to question 3 I m sure it ll be at least a few years depending on your definition of retired .", "Question : We are trying to build a Tuxedo adapter in Weblogic 11g to connect to Tuxedo 6.5 . Does anyone know any good tutorial out there that can show us how to do this We found a some tutorials in Oracle website but unfortunately the tutorial files are not downloadable broken-links : .. . .. . https : tuxedo-connector.samplecode.oracle.com index.html .. . .. . http : www.oracle.com technetwork middleware tuxedo usingosbtuxedotransport-086034.html .. . Answer : Why are you trying to build what already exists WebLogic Server comes with a built-in adapter for Tuxedo call the WebLogic Tuxedo Connector . There is also a separate product from Oracle called the Oracle Tuxedo JCA Adapter that provides a JCA style adapter for pretty much any Java EE server that supports JCA 1.5 .", "Question : Oracle purchased BEA and their WebLogic suite of tools . They still have a competing product in their own 10gAS Application Server . Both are Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition enterprise grade servers . While it make take some time due to maintenance agreements it would be unusual for them to continue to produce two products within the same architectural space . So.. . .. . .. . 1 . Will they retire their previous application server in favor of WebLogic 2 . Is WebLogic the one that will be retired 3 . How long of a process is this likely to be Years .. . .. . What have they done with PeopleSoft vs . Oracle Applications Likely the same pattern will be followed . .. . Answer : In Oracle terms the product Oracle Application Server contains much more than just the J2EE server . One component is the J2EE server which used to be OC4J . Oracle has announced that their new strategic J2EE server is WebLogic . There will therefore still be a product called Oracle Application Server but from version 11g onwards the J2EE server will be WebLogic .", "Question : Oracle purchased BEA and their WebLogic suite of tools . They still have a competing product in their own 10gAS Application Server . Both are Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition enterprise grade servers . While it make take some time due to maintenance agreements it would be unusual for them to continue to produce two products within the same architectural space . So.. . .. . .. . 1 . Will they retire their previous application server in favor of WebLogic 2 . Is WebLogic the one that will be retired 3 . How long of a process is this likely to be Years .. . .. . What have they done with PeopleSoft vs . Oracle Applications Likely the same pattern will be followed . .. . Answer : Oracle will release a 11g version oc4j but after that Oracle WebLogic Server https : en.wikipedia.org wiki Oracle WebLogic Server WLS will be the preferred Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition server . WLS is much better with clustering and has a lot of JMS https : en.wikipedia.org wiki Java Message Service JDBC http : en.wikipedia.org wiki Java Database Connectivity options .", "Question : Oracle purchased BEA and their WebLogic suite of tools . They still have a competing product in their own 10gAS Application Server . Both are Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition enterprise grade servers . While it make take some time due to maintenance agreements it would be unusual for them to continue to produce two products within the same architectural space . So.. . .. . .. . 1 . Will they retire their previous application server in favor of WebLogic 2 . Is WebLogic the one that will be retired 3 . How long of a process is this likely to be Years .. . .. . What have they done with PeopleSoft vs . Oracle Applications Likely the same pattern will be followed . .. . Answer : Yes that is a fact . Oracle explained it in the product road map earlier in this year . The new product is called Oracle Weblogic Server and that s what all sales men should offer to new customers from now on . The PDF file posted by Justin shows that . Take a look to Oracle Weblogic 10g : S : S alt text http : img266.imageshack.us img266 2200 oracleweblogic10guk4.png", "Question : I am a Java developer and I am pretty new in web application development using Java and I have the following doubts . We are developing web app deployed on Oracle WebLogic Server . What exactly is the weblogic domains From what I understand each application use a definied domain . But what it exactly does .. . Answer : This link from oracle docs has precisely defined weblogic domain.It has detailed the various ways of dividing your application may be logically physically or based on size.Specifically below sections from the link might answer your question .. . .. . What Is a Domain Organizing Domains .. . .. . https : docs.oracle.com cd E13222 01 wls docs103 domain config understand domains.html .. . .. . I found the below link useful as well : .. . .. . http : middlewaremagic.com weblogic p 1914", "Question : Oracle purchased BEA and their WebLogic suite of tools . They still have a competing product in their own 10gAS Application Server . Both are Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition enterprise grade servers . While it make take some time due to maintenance agreements it would be unusual for them to continue to produce two products within the same architectural space . So.. . .. . .. . 1 . Will they retire their previous application server in favor of WebLogic 2 . Is WebLogic the one that will be retired 3 . How long of a process is this likely to be Years .. . .. . What have they done with PeopleSoft vs . Oracle Applications Likely the same pattern will be followed . .. . Answer : Yes . They have already announced their position . OC4J Orion will continue to be supported however the weblogic release is the future of the platform .", "Question : null .. . Answer : I have Java EE application web and ejb modules in one ear and OmniFaces and CDI is used in web part . Everithing fine in Weblogic 12.1.2+ versions but i neet to deploy this app to Weblogic 12.1.1 . And there is issue exists with OmniFaces and old CDI implementation in weblogic - https : github.com omnifaces omnifaces issues 46 . OmniFaces authors said that ti is CDI bug . So is it possibly to take newer CDI implementation version with my application And if possibly how Comment : There should be Oracle-provided patches for WebLogic 12.1.1 . Have you tried contacting Oracle support on this Needless to say it s strongly recommended to upgrade entire server itself 12.1.1 has just too many bugs . Comment : No way . We already have tried to ask customer to update server and it is impossible in this year . Comment : Well that s awkward . As far as we see know it s not possible to provide a custom CDI implementation via webapp for WebLogic . The server itself really has to be patched upgraded in some way . Comment : What about prefer-application-package settings in weblogic-application.xml or other deployment descriptors Is it possibly to initialize custom weld through them", "Question : I am a Java developer and I am pretty new in web application development using Java and I have the following doubts . We are developing web app deployed on Oracle WebLogic Server . What exactly is the weblogic domains From what I understand each application use a definied domain . But what it exactly does .. . Answer : From Oracle documentation http : docs.oracle.com cd E15523 01 web.1111 e14140 intro.htm WLDCW101 : .. . .. . A domain is the basic administrative unit of WebLogic Server . It consists of one or more WebLogic Server instances and logically related resources and services that are managed collectively as one unit . Weblogic Domain img http : i.stack.imgur.com b40od.gif .. . .. . So it s an administrative container you should think of the following : 1 domain equals 1 Administration Server . The Administration Server : .. . .. . A domain includes one WebLogic Server instance that is configured as an administration server . All changes to configuration and deployment of applications are done through the administration server . .. . The administration server provides a central point for managing the domain and providing access to the WebLogic Server administration tools . These tools include the following : .. . .. . WebLogic Server Administration Console : Graphical user-interface to the administration server . .. . WebLogic Server Node Manager : A Java program that enables you to start and stop server instances both administration servers and managed servers remotely and to monitor and automatically restart them after an unexpected failure . .. . Note that the node manager is installed on all the machines that host any server instance both administration server and managed servers .", "Question : Oracle purchased BEA and their WebLogic suite of tools . They still have a competing product in their own 10gAS Application Server . Both are Java EE http : en.wikipedia.org wiki Java Platform Enterprise Edition enterprise grade servers . While it make take some time due to maintenance agreements it would be unusual for them to continue to produce two products within the same architectural space . So.. . .. . .. . 1 . Will they retire their previous application server in favor of WebLogic 2 . Is WebLogic the one that will be retired 3 . How long of a process is this likely to be Years .. . .. . What have they done with PeopleSoft vs . Oracle Applications Likely the same pattern will be followed . .. . Answer : As you say it would be unusual for them to maintain two products within the same architectural space . I don t know Java application servers but given the climate of financial markets and that it would probably take lots of money to maintain two such application servers I would say it s a foregone conclusion that one of the products will be cut and sooner rather than later at that as soon as the cost of settling breach of maintenance contracts falls below what it costs to maintain the outgoing product . As for which one will go my bet will be on WebLogic because it wasn t invented here .. .", "Question : In summary method with @PostConstruct is not call by JSF on WebLogic12c on managed-bean . I have a very basic application . Technologies used : JSF2.0 .. . .. . Application Server : WebLogic 12c .. . .. . Java .. . .. . XHTML .. . .. . When the managed-bean is instance for JSF The managed-bean beanTest is create Enter at normal constructor but don t enter ignore don t call method with PostConstruct . The text displayed with WebLogic : Enter to Construct The expected text but not displayed with WL : Enter to Construct - Enter to PostConstruct .. . .. . The application has been deployed on other application servers : .. . .. . GlassFish 3.1.1 .. . GlassFish 3.1.2 .. . Tomcat 7.0.22 .. . .. . And show the expected result . The problem only happens with JSF managed beans request session view application if use CDI the PostConstruct is called . But I need to use the JSF ViewScoped annotation . Someone with any idea Comment : This problem is Weblogic specific . I can t tell from own experience but I ve read from earlier posts references that Weblogic will somehow fail to invoke @PostConstruct on JSF artifacts whenever the JSF libraries are supplied along with the web application in the WEB-INF lib folder instead of that the web application uses Weblogic s own supplied JSF libraries . Comment : It s interesting because in fact my application does not use the libraries in WEB-INF lib you are instructed to use the application server . Weblogic 12c gives me JSF libraries now and these are what I use to avoid problems that occurred in previous versions of weblogic 10.3g and 11g . I also do test adding to libraries in WEB-INF lib and no good result was observed . Comment : Well Weblogic is an odd beast . Sorry that I can t be of more assistance . Have never really used Weblogic . Comment : Really it is true . WebLogic does not behave like other application servers . Thanks for you assistance. . .. . Answer : Well the problem is solved . .. . .. . This is a bug reported and already has a patch . Bug : 13703600 .. . Patch : SU Patch UXPH : WLS12C - POSTCONSTRUCT NOT CALLED ON @MANAGEDBEAN BEANS IN JSF APP . I apply the patch and the problem was fixed.. . Comment : can you show me how to apply this patch Comment : First download the patch from Oracle . I think you must have a Oracle account for do this . Then be sure the weblogic is shutdown unzip the patch in path : C : Oracle Middleware utils bsu cache dir . Run bsu.cmd or bsu.sh the smart update window open select the patch that appears and follow de instructions next.. . next.. . next.. . accept etc etc .. . Start the weblogic server and ready . Patch has been applied.. . More info here SmartUpdateManual http : docs.oracle.com cd E14759 01 doc.32 e14143.pdf See section 3.3.1 for unzipping patch and section 4 for applying patch.. .", "Question : Related : Load external properties files into EJB 3 app running on WebLogic 11 http : stackoverflow.com questions 6540693 load-external-properties-files-into-ejb-3-app-running-on-weblogic-11 .. . .. . Using Oracle Enterprise Pack for Eclipse I created an Enterprise Project and named it : .. . .. . PropertiesDemoEAR .. . .. . Also created a PropertiesDemoEARWeb module in which I put this code .. . .. . inside PropertiesDemoEARWeb Java Resources src com.project.util : .. . .. . Inside PropertiesDemoEAR EarContent META-INF weblogic-application.xml .. . .. . I added the following listener declaratively : .. . .. . Right clicked on the PropertiesDemoEAR Export EAR file Destination : .. . .. . C : Oracle Middleware user projects domains MyDomain autodeploy .. . .. . When I run WebLogic 11g through Eclipse I get this error message in the console : .. . .. . Question s : .. . .. . 1 What am I possibly doing wrong Why can t it find my PropertiesFileHandler class 2 Is the location c : etc error.properties of my properties file suitable or should it be inside MyDomain directory 3 Is there a default directory or just simple configuration area that WebLogic loads properties files which are accessible to any application that runs in WebLogic Comment : From my perspective it seems that you are significantly over-complicating the problem . Are you just trying to get preStart to work or are there specific requirements that you have to make it work this way Comment : Do you really want to tie the way that you load properties in your application to the way that WebLogic handles the EJB lifecycle or is this purely an academic exercise Comment : No this is a real professional task.. . We have a bunch of different app servers and we are seeing the best way to deploy an EAR file which would read different properties files from different app servers . Not the same properties file is used by all . It might have the same name but different contents . .. . Answer : Got it working.. . The issue was that I had it set up as Web Project rather than a Java EE Utility Project in Oracle Enterprise Edition for Eclipse . As a web project it was putting .class files inside WEB-INF classes instead of APP-INF . Also needed to put error.properties inside my actual domain . C : Oracle Middleware user projects domains MyDomain .. . .. . In regards to my own question : .. . .. . Is there a default directory or just simple configuration area that WebLogic loads properties files which are accessible to any application that runs in WebLogic If -Dweblogic.ext.dirs is not set it defaults to DOMAIN lib WL HOME common lib ext WL HOME server lib ext .. . .. . So if you store error.properties in DOMAIN lib it will be on the CLASSPATH and you should be able to load it using getResourceAsStream error.properties", "Question : I have a question about configuring Apache Flume with Oracle AQ using JMS . In order to set JMS between Oracle AQ and a remote-server Flume for instance do I need to configure WebLogic datasource Flume throws me an exception that the datasource is not configured . I have read Oracle documentation and it says that in order for a 3-rd party server to work with AQ JMS I need WebLogic datasource . I don t want to work with WebLogic so I want to be sure that I have understand it correctly and there is no other way . So I want to set a source for flume to receive messages from Oracle AQ do I have to create a WebLogic datasource or can I work directly with the queue .. . Answer : You should be able to configure Flume directly to Oracle AQ as there is JMS interface to Oracle AQ . You can configure Flume to have source JMS queue or topic .", "Question : I am new to J2EE frameworks . I want to know if Struts2 can be deployed to an Oracle Weblogic application server . If so how can I do it Comment : Please clarify your specific problem or add additional details to highlight exactly what you need . As it s currently written it s hard to tell exactly what you re asking . See the How to Ask page for help clarifying this question . .. . Answer : J2EE is up to Java 1.4 . From Java 1.5 it s called Java EE . Yes Struts2 web-applications as every other technologies EAR WAR can be deployed on Oracle WebLogic formerly Bea WebLogic servers . The deployment can be done by selecting and uploading the ear through the Web Console deployments section or through IDE plugins or with Ant tasks Maven tasks etcetera . The exact way depends on the environment you re working on but the Web Console approach is what you probably want at first when you simply need to test the hello word and you haven t automatized anything yet . enter image description here http : i.stack.imgur.com vwZtp.gif", "Question : I am using WebLogic 10.3 with a Java EE application . Can anyone please tell me how to debug this application .. . Answer : What I did to get the Eclipse Debugger working with Weblogic 10 was to lookup the startWeblogic.cmd file in the folder weblogic.10.3.3.0 user projects domains base domain bin and modify the following line around line 95 : .. . .. . to .. . .. . Then I stopped any weblogic server that was running from within Eclipse and started Weblogic using the startWebLogic.cmd file . Then I created a new debug configuration in Eclipse . Go to debug configurations choose Remote Java Application it should recognize your project use Standard Socket attach for the connection type and specify port 8453 in the connection properties . Now apply and run . Set some breakpoints in a piece of code that will regularly run and see if it is working . Comment : This did not work for me and in fact WebLogic would not start after I tried it .", "Question : null .. . Answer : I have developed one Telephony application in Java which I have to integrate with WebLogic server . This application monitors telephones and fetches real-time information regarding calls . I have three options for integrating my appliation with Weblogic : .. . .. . Transforming my application as WebLogic adapter .. . Transforming my application as servlets which will be hosted on WebLogic . Using socket communication between my application and Weblogic where my application will work standalone application . I want to know which is better way by which my application can run forever and get information of calls and send it to Weblogic . I dont know much about WebLogic adapters . Are Weblogic adapters useful in getting real-time information Can adapters work continuously like standalone application Please guide me . Regards .. . .. . Ashish Comment : Added new tags as Java and java-ee Comment : Can you simply put your application in an .ear file that starts when the weblogic servers comes up and make EJB calls to it This is a pretty concise example : vipan.com htdocs ejb.html http : www.vipan.com htdocs ejb.html Otherwise if you re considering hosting a web application that isn t servicing requests you really shouldn t be creating a web app for that purpose", "Question : I have 64 bit Weblogic 11g installed on 64 bit Linux and trying to connect to a DB by creating a JDBC data source for Oracle 10g on 32-bit . I have connected another Weblogic 32-bit successfully to this DB instance . However for the 64 bit Weblogic I am getting exception .. . .. . I am wondering does it need 64 bit Oracle database as well My username and password are correct . .. . Answer : Do you have the 64 bit version of Java installed and running on your Weblogic application server as well as the 64 bit Oracle client", "Question : null .. . Answer : I have a Java EE application running on Weblogic Java Application server . The Application uses Java Security : authenticator authorizer .. . .. . .. . Question : .. . I would like to dynamically switch the username depending on some internal conditions . So the application should authenticate with some username and retrieves some other username from Java EE security . How is that possible in Java EE Security Do I use credentials-mapper for that Because in my understanding credentials-mapper are used to map credentials for remote calls .", "Question : I am using WebLogic 10.3 with a Java EE application . Can anyone please tell me how to debug this application .. . Answer : The best approach to enable debug on weblogic server is as follows : .. . .. . create a script file .. . put these lines into your script for windows : .. . .. . set debugFlag true .. . .. . set DEBUG PORT 9001 .. . .. . call the start script e.g . : C : Oracle Middleware user projects domains domain1 bin startWebLogic.cmd .. . .. . So there will be 3 lines on the script that s all you need.. . There are also more variables you can use... . .. . .. . WLS REDIRECT LOG log path - redirect output to a file instead of console window.. . .. . .. . JAVA OPTIONS - more options for the JVM .. . .. . EXTRA JAVA PROPERTIES - define aditional properties you may need", "Question : I want to migrate database server from Oracle 9i to Oracle 11g WebLogic version is 8.1 SP5 . After migration WebLogic version will remain the same . Only database gets changed . How can I achieve this Is taking DB dump before migration and importing dump after migration enough for this task Or do I need to do other things as well Thanks . Comment : So you will keep your app server as-is and will upgrade your database server version Do they reside on the same machine or in different machines Comment : Application server and DB Server are on different machines . .. . Answer : Yes most likely a DB dump will do the trick . Oracle data types are backward compatible so you are covered ." ] }
[ "yes-answer-long", "yes-answer-short" ]
server
UNK_RELATION
translation@website@85
translation -- translation is the process of replacing strings in an application or @placeholder to make interfacing with the application or website easier for people from countries with different languages .
{ "confidence": [ 35.86201858520508, 34.06949234008789, 33.7550048828125, 33.502288818359375, 33.502288818359375, 33.43549728393555, 33.43549728393555, 32.53773880004883, 32.51334762573242, 32.488807678222656, 32.43379592895508, 31.944507598876953, 31.839378356933594, 31.782958984375, 31.664810180664062, 31.090415954589844, 30.95645523071289, 30.947181701660156, 30.672626495361328, 30.61815643310547, 30.506683349609375, 30.45931625366211, 30.45931625366211, 30.45931625366211, 30.456287384033203, 30.151771545410156, 30.022302627563477, 29.968788146972656, 29.727413177490234, 29.572162628173828, 29.572162628173828, 29.572162628173828, 29.572162628173828, 29.343387603759766, 29.208879470825195, 29.208879470825195, 29.133010864257812, 29.08926773071289, 29.08926773071289, 28.865859985351562, 28.865859985351562, 28.780677795410156, 28.774131774902344, 28.774131774902344, 28.7686767578125, 28.526321411132812, 28.465923309326172, 28.409976959228516, 28.345474243164062, 28.253490447998047, 28.253490447998047, 28.131637573242188, 28.131309509277344, 28.131309509277344, 27.990108489990234, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.949050903320312, 27.76361846923828, 27.677562713623047, 27.496646881103516, 27.480239868164062, 27.423625946044922, 27.295909881591797, 27.286678314208984, 27.286678314208984, 27.286678314208984, 27.286678314208984, 27.270137786865234, 27.270137786865234, 27.270137786865234, 27.270137786865234, 27.251789093017578, 27.251789093017578, 27.251789093017578, 27.251789093017578, 27.11327362060547, 27.11327362060547, 27.11327362060547, 26.73324203491211, 26.73324203491211, 26.712825775146484, 26.61835479736328, 26.587848663330078, 26.572498321533203, 26.460132598876953, 26.460132598876953, 26.460132598876953, 26.45090103149414, 26.45090103149414, 26.45090103149414, 26.43436050415039, 26.43436050415039 ], "content": [ "Parallelizing the translation process .", "different translation for the same app .", "I m currently in the process of translating a C++ Qt application into different languages .", "The translation strings would then also include the HTML directly .", "This approach complicates the code and breaks the independence of translation strings .", "Learn about those languages and do manually translation .", "it s not useful for automatic translation to other languages .", "You can use countries gem to get the translation .. . .. . Just install the gem and add require countries to your ruby file .", "This can greatly simplify the translation process .", "Writing translation rules directly in the surface syntax of the languages of interest makes them easier to write inspect debug and maintain .", "The languages models and translation models are about 200GB in total .", "Entity .. . .. . Entity Translation .. . .. . Config", "I am using Jed for my language-translation in my website .", "In the pdf.phtml I have a translation based on translation files .", "Have you marked your strings for translation", "You couldn t make a direct translation .", "The easiest way in your case seems to be to just add a translation for yes and no by adding a YAML or XLIFF translation file to your application e.g .", "Welcome user is a translation string specified in a translation resource .", "To make the translation of a specific part in the footer I used that code : .. . .. . The thing is now I wanna make my website trilingual .", "You need a file called fa.txt with the translation strings inside .", "Accounts on the website will be available for people from the company to put translation and manage their own content based on their own language BUT we need some users can have ability to access all of the translation with one login .", "If you want to support languages dynamically I d add the translation into it s own table and have entries for each language and translation-id .", "UPDATE Gives the translation found in the SyliusUserBundle for English as it exists in the original bundle but gives the key in other languages where the original bundle doesn t contain the translation .", "I once saw a free translation management software that was used to publish the original software texts and allow translation to other languages in a collaborative way .", "I work with Symfony 2.4 KnpLabs DoctrineBehaviors bundle for translation in database and A2LiX Translation Form for fields translation .", "Now for your category translation .", "I was searching for free translation dictionaries .", "I use the A2lix Translation Form Bundle to realize database translation of entities .", "I am using Yii s translation functionality to translate characters from English to other languages .", "how to efficiently implement a translation process once the extract is made", "JavaLikeToAstTest.java .. . .. . Here are two simple StringTemplate group files to handle the translation process .", "Parallelizing the translation process : the moses server lags behind on the moses-cmd binary .", "There are some features that can improve the quality of collaborative translation process .", "I m not sure how this affects the semantics of the translation but at least the resulting translation doesn t break my templating code .", "When finished the translation was still not working .", "We are getting the error in google Translation .", "And to finish the translation files : .. . .. . Translation Files .. . .. . What do you guys think", "Scaling and translation work perfectly .", "It also has a translation UI .", "Remove the reference to product from the translation table and put a reference to translation where you need it the other way around .", "From qt documentation : .. . .. . QCoreApplication : : installTranslator : Adds the translation file translationFile to the list of translation files to be used for translations .", "In my views and HTMLs I have marked for translation strings in polish .", "Block translation", "The translation is horrible : -", "I have a model with a translation that can be pluralized : .. . .. . If I call this translation directly I get these results : .. . .. . Is there a way to get this last translation to default to User", "This means that the application soon will have about 3 or 4 different languages .", "I m currently migrating a web application from a database-based internationalization approach each word having an entry in the translation table and the actual translation to one based on Zend Translate http : framework.zend.com manual en zend.translate.html and CSV files .", "Can anyone tell the correct way to make the translation system .", "I mean I wrote portlet in English but people from other country may want to use it with their own language and they can want to make translation .", "That s not disassembly that s translation", "THIS EXAMPLE IS A TRANSLATION to DEUTCH .", "I understand that machine-translation is not so great but I am wanting to only test my translation strings on my test pages .", "Treat one sentence as the reference translation and the other as the candidate translation .", "This is caused by tokenization prior to translation followed by detokenization after translation i.e .", "I m using KnpLabs DoctrineBehaviors Translatable and A2LiX Translation Form to translate my entities in a Symfony application .", "the problem is that I don t have the translation .. .", "please provide your translation entity .", "This seems to be the best choice for translation anyway .", "Edit : Noticed it should be translator not translation .", "as it should be implicit by the existence of translation choices .", "The only animation that is of importance is the translation animation .", "As a result there cannot be a reverse translation algorithm .", "Consider the following machine-translation problem .", "This is the translation : AddHandler br.DocumentCompleted AddressOf browser DocumentCompleted", "Assuming I m not able to change where the translation key is coming from is there a proper way to get the translation key from the controller to the helper", "The command succeeded but I still can t see the translation .", "I m currently working on the translation aspect of a eZPublish5 website witch will contain 4 languages : french english russian and chinese with french as original language and locale fallback .", "Is anyone aware of a machine-translation service that works like this", "Automated translation services tend to not work well due to the huge amount of information required to translate text other than just the text itself and issues that arise when there isn t an accurate translation for something between 2 languages .", "using string-concatenation would force the translation of remaining to the end which mightn t be appropriate for some languages .", "How can I use the first available translation from ANY file", "I am using a translation api to translate text from English to others .", "I want my convertedtext from systran translation external tool .", "Completely unambiguous translation from Pig Latin into English is impossible .", "You could take a look at a similar project : Machine Translation http : blogs.msdn.com translation", "There are many platforms for translation software applications that allow community collaboration but there is still the question on how to create and maintain a translation glossary .", ".. . .. . Desired architecture .. . .. . Client - DTO translation - transport WAN internet - DTO translation - Server - Service Call", "In .po file I can see translation such as : .. . .. . and .. . .. . but it does not show the translation at the back-end .", "But they will not update after changing the translation. .", "Automatic translation will be awful .", "Thanks for the deep insight into translation", "Translation is very context sensitive .", ".. . Multiple translation files can be installed .", "This requires manual inspection of the translation results .", "In your opinion is there a standard way for this translation", "Finally I realized that the strings you write between aren t being recognized by the translation files .", "Looks good but how can you parse the sourcecode to get all the translation-source-strings", "If you don t save the exact Google translation text to your DB for every on the fly translation there is no way to track what the user has committed to in their language .", "I am trying to upload image in each translation but it is not working my translation entity is .. . .. . i am beginner in symfony so not getting any help even in internet how to upload image in each translation .", "you just need to add it to your translation file : .. . .. . The translation file is in my case danish : . . wp-content languages plugins woocommerce-da DK.po .. . .. . Open the file in your texteditor e.g .", "Does anyone know how to make a translation package work on lfs", "Any translation table should support multiple-languages either add a language key or don t use the database at all .", "With about 20 tables that would need translation so that would increase to around 120 tables with five languages .", "I need something which parse all my xml and propose me a translation for the languages of my choices", "I created a function in the entity and got the translation from the transnationals table .", "Is there a relatively simple way to extract translation phrases from a Magento app", "Yeah just use from django.utils import translation translation.activate language code", "Thanks I made something that user the local with the translation variable to get the default language if the translation for the current local doesen t exist .", "You need to define relation between your entity and translation entity : .. . .. . Accessory : .. . .. . Accessory Translation :" ] }
{ "confidence": [ 46.11171340942383, 40.687015533447266, 40.65114212036133, 40.49660110473633, 39.06039047241211, 38.55877685546875, 38.478424072265625, 38.176963806152344, 38.086692810058594, 37.524574279785156, 37.26579284667969, 37.00245666503906, 36.828643798828125, 36.77096176147461, 36.509395599365234, 36.41717529296875, 35.92962646484375, 35.715057373046875, 35.66238021850586, 35.45051193237305 ], "content": [ "Question : So I have to build a website with 20 different languages each language will have custom domain-name . The Website will display products with details some of the products will be available in two under tow different domains language region the others will be only for one . Accounts on the website will be available for people from the company to put translation and manage their own content based on their own language BUT we need some users can have ability to access all of the translation with one login . Now by default I was thinking about One website with multi language then I thought about having multisites installation since that make it easy for the people who have to translate their own content without dealing with seeing the other content or hit Translation button . Pros and Cons I came up with : .. . .. . it would be easier to have for the people from different countries to deal with their own content and have full customization to their own instance While for one instance site it will be complicated since I have over 50 000 products . it would be hard in the future to add new functionality for the Multisites since we have to add it for the 20 instance . not sure if thats correct while if we use One website it will be one change for all . What about one login not sure if there is a module support that . But yeah this is my situation Please help me from your experience to decide which one would be the best choice and why . Take in mind all of the will share same look-and-feel . But they will be 20 languages with 20 custom domains and 10s of thousands products and nodes . Should I go with D7 or D8 Thank you I appreciated . Comment : This question is probably more appropriate for Programmers StackExchange http : programmers.stackexchange.com . .. . Answer : Multi language is your solution here because you are sharing product and administrators webmasters . The module domain access https : www.drupal.org project domain will give you what you need in term of domain-name management . Multisite does not share configuration so if you want to add something to all domain you will have to configure it 20 times . And if you need to add some modules for only 1 domain you can use Context https : www.drupal.org project context to specify your rules of display . If I were you I will go with D7 because there is lot more stuff available right now but the migration will be hard if you think about migrate to D8 . And many modules are not develop for D8 right now so it s more secure to use Drupa7 .", "Question : null .. . Answer : I m currently in the process of translating a C++ Qt application into different languages . I already have the Qt translations working and can see the change on the UI whenever I switch . However it occurred to me that there is a need to switch from the foreign language back to English at some point . What is the best practice for doing this as I see a number of options : .. . .. . 1 . Create a en-GB translation file for the English language .. . 2 . Remove the Qt translator and use the UI default values which will be English .. . .. . If 1 is the best practice should the default strings on my UI be changed from something readable like Settings to SETTINGS TXT or something along those lines Many Thanks in advance .", "Question : I have developed a web application using internationalization best practices such as putting all my displayable strings in property files etc etc . I would like to have the strings in the property files translated into 5 different languages . Does anyone have any experience using Mechanical Turk or another crowd sourcing service for language-translation The reason I don t want to just hire a translation company or service is because I want to eventually have ongoing content fed into the translation service via an API . My Google results for more information on this topic were surprisingly dismal . Any links or pointers are appreciated . .. . Answer : I don t have any experience crowd-sourcing translations but my advice would be to find some dependable freelance translators in your target languages check out Proz.com and keep going back to them every time you have new content . Application UIs are notoriously difficult to localize because of lack of context in the resource files and so you want someone who understands the application and is able willing to test the localized version . Each of the localizations will undoubtedly reveal i18n bugs as well so there is likely to be a bit of back and forth the first time around . I guess my point is that you don t want arms-length relationships with your translators they should feel like an extension of your team . Anyway bravo for internationalizing your application . Good luck", "Question : I have developed a web application using internationalization best practices such as putting all my displayable strings in property files etc etc . I would like to have the strings in the property files translated into 5 different languages . Does anyone have any experience using Mechanical Turk or another crowd sourcing service for language-translation The reason I don t want to just hire a translation company or service is because I want to eventually have ongoing content fed into the translation service via an API . My Google results for more information on this topic were surprisingly dismal . Any links or pointers are appreciated . .. . Answer : If your software is open-source you can use Launchpad http : launchpad.net for translating . Comment : Is there a similar webapp available but for non-opensource apps Comment : Launchpad also has a commercial offering see launchpad.net +tour join-launchpad commercial https : launchpad.net +tour join-launchpad commercial", "Question : I ve setup an ASP.NET MVC Multilingual website . When user registers they select their preferred language from a drop-down list and then on the website s labels messages alerts etc . are shown in their selected language . They can change their preferred language any time . The registration page is in English - for now .. . .. . I ve implemented this using the same technique as what is described here http : afana.me post aspnet-mvc-internationalization.aspx . I am doing a multilingual website for first time so need help . So I ve got all translations in Resources file . For any translation which my client requests I ve to edit the Resources file compile and deploy the website - for the changes to take effect . I saw this link http : afana.me post aspnet-mvc-internationalization-store-strings-in-database-or-xml.aspx but I cannot use this approach since the translations should be updated as soon as my client changes them in the Admin panel . I cannot have a console-application generating strong type translations as I am running on a shared-hosting environment . What I require : .. . .. . My client should be able to change the translation text . For now there are 4 languages that the website provides English default German Italic French .. . .. . I plan to provide an Admin interface for my client to change the translation text for all languages . See the image for an idea as to how this interface will look like . enter image description here http : i.stack.imgur.com hLQbZ.png .. . .. . I plan to save these translations in database SQL Server . I am basically stuck on the method to retrieve and show these translations . Here s what I could think of : .. . .. . Write a query to grab a List and store it in static variable or Application or Session etc . I have no clue how to do it properly so any help appreciated . The session is not reliable since website is on shared-hosting .. . Use caching . When website starts first OR when user logs-in store the List in cache . When they are updated update the cache . Again how to do this properly I cannot use Redis or any other similar service since I am on shared-hosting and there is no Redis service which I can use .. . .. . I cannot have separate Views for each language since the languages can be removed or added dynamically by the user . I am pretty much clueless about how to do this so any help that I can get would push me in the right direction . Thank you . .. . Answer : You can do it by using West Wind Globalization here is an pretty clean example . enter image description here http : i.stack.imgur.com Nn4Pi.png .. . .. . Visit : https : github.com RickStrahl Westwind.Globalization", "Question : In my symfony2 application i have set up what s necessary to change the locale . Now I can use the trans features of the bundle and generate the language files under app resources translations .. . .. . That works fine but I feel it s not efficient to edit yml files by hand and it s advised to use xliff which is absolutely not user friendly . Plus in a collaborative environment I don t see how this could properly work . I m not sure translators would like git commands . To those who have already implemented a translation process : how did you do how do you organize it Thanks a lot Comment : You should take a look at JMSTranslationBundle http : jmsyst.com bundles JMSTranslationBundle Comment : I m using this bundle already . I m looking for more ie . how to efficiently implement a translation process once the extract is made .. . Answer : I have implemented manageable translations for one of my project you can refer to My answer http : stackoverflow.com questions 25261067 symfony-translation-by-using-keys 25261339 25261339 similar to this topic what i have done i have created a service which loads all the translations from my repository.I have 2 entities for this .. . .. . 1 . Language .. . .. . Language entity holds all the languages which has 2 properties locale and name .. . .. . locale en fr ar .. . .. . name english french .. . .. . 2 . LanguageTranslation .. . .. . LanguageTranslation entity holds all the translations with properties .. . .. . catalogue http : symfony.com doc current components translation introduction.html using-message-domains .. . translation .. . language-translation language .. . languageToken key for translation .. . .. . Now all your translations are cached by symfony in prod dev folder so each time when user updates or adds new translation i have cleared translations cache programmatically i was using sonata-admin so i added a call to this function in prePersist and preUpdate you can also use doctrine event-listeners prePersist preUpdate for this .. . .. . This part is missing in my previous answer for clearing cache", "Question : I am trying to build a Translation Assistant which can read in other compiled C application .exe and display the forms from the EXE are displayed individually along with a table next to it with english column which will show the current english words on display and another column for the value which a translator can enter . Once completed translations the translator can export the translations a resx file to add to a project and also as an excel file for record purposes . I am new to C and hence am not sure if my strucute is correct i have designed in such that a dll is inserted into the .exe during compilator and then using this dll the translation application can extract the string . This works for most strings but it is getting stuck where there are several string that can apear in the same textbox at different times e.g . disconnected connected etc . I have tried searching everywhere but I am not able to find information on how i will be able to pull out all strings from an application and be able to identify which form they belong to in order to create my application the other issue i am faced with is actually displaying the translated strings the application i am building would benifit greatly if it could display a example of how the translated strings would look as translations in some languages could be excessivly long . but i have found that i am only able to read in the aspects of the compiled applications and create an instance but am not able to translate it . I am reading in the exe using Reflection and have understood from online that i need to use reflection.emit to modify the form . but i am finding every sting that is idenfitied from the form is extracted as an instance hence changing the string is only changing the instance of the strings and not the instance of the form itself . hence i am not able so a correct display . I have been trying for 3 weeks to solve these last two questions Thanks in advance for helping me solve this . Comment : Why don t you just create resource assemblies Comment : The actual app i am making is to pass it to a translator i am not familiar with the other languages and have been asking a friend to translate for me she is unfamiliar with programming and sometimes i am getting complains that the translations dont have the same meaning as the words . Hence the nead for context thats why the app . So she can visually translate the strings . .. . Answer : I think you can t find a general solution to your problem with the texts that may appear in the textbox . Here is why : .. . If the texts are in the resource file you could read them but you still don t know where they are used . You would need to do a complex analysis of the source code to know where the text is displayed . Just imagine this little scenario : .. . .. . GetCorrectText could look like this : .. . .. . Resources.ConnectionState might be The connection is in the state 0 . Its a simple example but you would need to know or extract a lot of things : .. . .. . 1 . The text property of the TextBox class is the string that is shown to the user .. . 2 . The Method GetCorrectText returns the text so you need to parse it . 3 . The Method string.Format returns the text . Now you either would need to hardcode that for string.Format it should use the first parameter as the text that is displayed or you would have to parse string.Format to learn that fact . The example shows something else : You wouldn t be able to translate the whole string that is being displayed because part of it is the name of the enum value . What I want to show you is that you need to make trade offs .", "Question : null .. . Answer : I have an angular application that is growing fast This means that the application soon will have about 3 or 4 different languages . While this is a good thing there is one issue that i can t help wonder how to fix : .. . .. . All static content such as .. . .. . Menu points .. . Headers .. . Notifications .. . .. . Ect . Are easy to just translate into a new language using a language file . However content that is created by administrators and added to the system dynamicly wont be as easy in different languages . For the purpose of understanding let me create an example : .. . .. . The company is Netflix in its early days where only the US were able to access it . The whole application was in english and every time a movie was added the description title run time ect was in english . Now the company goes international starting in Denmark . Allowing viewers in Denmark to view movies . But since the title description and more are stored in a database when the danish viewer attempts to view the information about the movie it is not translated . In the above case . How do you take something from a database and make sure it is translated into the right language . Do you have to manually translate everything and add it to the file or is there a better way It seems so redundant that there must be a better way . Comment : I think the language parameter header should be part of the REST API . Then return the data with the language specific title and descriptions . Comment : @Michael Thank you for your answer but do you add columns to your database that has the different attributes in other languages and just continue you expand that as you expand your range of languages Comment : Thats a question for the domain-model architecture . If you want to support languages dynamically I d add the translation into it s own table and have entries for each language and translation-id .", "Question : I once saw a free translation management software that was used to publish the original software texts and allow translation to other languages in a collaborative way . Something similar to http : www.mtranslator.com but also allowed community driven additional translations . I just cannot seem to find it again so I was wondering if anyone knows of it Cheers Comment : That s an interesting question but you ll likely get more answers if you don t limit the public to developers as on this site . The question should move to a more general site superuser.com http : superuser.com by itself in a few minutes . Comment : I think it works only if you can find enough crows . Comment : : i noticed the spelling mistake my bad.. . .. . Answer : Unlike other translation crowdsourcing websites Ackuna.com http : Ackuna.com is completely FREE . It supports the following string formats making developer s job easier : .. . .. . 1 . Microsoft Excel .xls .. . 2 . Microsoft Office Open XML .xlsx .. . 3 . Android XML .xml .. . 4 . Ruby YAML .yml .. . 5 . Blackberry Resource .rrc .. . 6 . iOS Strings .strings .. . 7 . Java configuration .properties .. . 8 . Gnu Gettext Protable Object .po", "Question : In the past my company has used human professional translators to translate our software from English into some 13 languages . It s expensive but the quality is high . The application we re translating contains industry jargon . It also contains a lot of sentence fragments and single words which out of context are unlikely to be correctly translated . I am wondering if there is a machine-translation system or service that could use our existing professionally-generated translations to more accurately create a machine-translation into any new language . If an industry term phrase or sentence fragment has been translated from en-US to es-AR pt-BR cs-CZ etc . then couldn t those prior translations be used as a hint regarding what the correct word choice should be for some new language They could be used in a sense to triangulate . At worst they could be used to create a majority voting system e.g . if 9 of 13 languages translated a phrase to the same thing in the new language we go with it . Is anyone aware of a machine-translation service that works like this .. . Answer : I have no idea about tranlation systems but such functionality -- custom translations for specific words -- will be offered by any commercial system I guess . It is even possible with google-translate https : translate.google.de by clicking on the book with the star on cover . As a trivial non-invasive method you could for each goal-language make up a dictionary the required terminology in the form word-as-is-translated word-as-should-be-translated where you have an N : 1 relationship in one language multiple word-as-is-translated should be mapped to one word-as-should-be-translated . The words word-as-is-translated thereby depend on the actual translation system . After preparing those dictionaries you can simply search the translation result for those words and replace them with the desired words .", "Question : I once saw a free translation management software that was used to publish the original software texts and allow translation to other languages in a collaborative way . Something similar to http : www.mtranslator.com but also allowed community driven additional translations . I just cannot seem to find it again so I was wondering if anyone knows of it Cheers Comment : That s an interesting question but you ll likely get more answers if you don t limit the public to developers as on this site . The question should move to a more general site superuser.com http : superuser.com by itself in a few minutes . Comment : I think it works only if you can find enough crows . Comment : : i noticed the spelling mistake my bad.. . .. . Answer : OneSky http : www.oneskyapp.com also offers free crowdsourced translation solutions for public project . It supports 30+ popular file formats such as .strings .xml .resx .resjson .rrc .yml .yaml .properties .po .pot . There are some features that can improve the quality of collaborative translation process . 1 . glossary system to ensure consistency .. . 2 . voting system where users can vote for their favorite translation .. . 3 . validation system e.g . length limitation placeholders validation .. . 4 . screenshot function websites often contain short phrases e.g . buttons that would be hard for users to understand the context if no screenshots are provided .. . 5 . system to monitor users contribution e.g . recognize dedicated users blacklist users who are purposely causing damage to the project translation memory .. . .. . Other than crowdsourced translation you can also hire pros manage your own in-house translators using OneSky platform so you can easily use a mix of those methods e.g . hire pros to translate urgent things that needs speed and open up for users to review afterwards . Importing downloading of files is easy . Simply upload your resource files to our cloud-based platform hook up with our API to automate the process . Disclaimer : I am an employee at OneSky Comment : Thank you Patrick for having shared this link It s really nice", "Question : Does anybody know whether there is a possiblity to exclude portions of a text from being processed by the google-translator-toolkit A great advantage of this tool is that it suggests the translations of sentences which have already been translated in another context . However if any additional footnote and or remark has been added to the text it won t be recognized as a match . I am looking for a possibility to enclose such text in brackets within which it will be ignored . For example the following two strings should be recognized as identical : .. . .. . and be translated i.e . into German as : .. . .. . If neccessary I could number such insertions and place their content into additional paragraphs like : .. . .. . thanks a lot in advance Marcel .. . Answer : The skiptranslate class didn t work for me in the po files I submitted to gtt . Gtt continued to translate everything . I noticed that gtt does not translate anything inside an href attribute so what I did was to pre-process my .po file using a copy grunt task by changing my expr type strings to a href my expr strings then changing them back to my expr after the gtt translation using another copy grunt task . I m not sure how this affects the semantics of the translation but at least the resulting translation doesn t break my templating code . Here is my grunt copy task config showing the regular expressions I used : .. . .. . .. . copy : .. . .. . fixupPoFileForTranslation : .. . src : Fill in src and dest dest : .. . options : .. . process : function content srcpath .. . .. . return content.replace Go page g Go .. . Change handlebars name to a ref name to stop .. . machine-translation from translating them . return content.replace a-zA-Z . g a href 1 .. . Same thing for our js .format 0 1 .. . .. . .replace d g a href 1 .. . .. . .. . .. . .. . fixupPoFileForMerge : .. . src : .. . dest : .. . options : .. . process : function content srcpath .. . .. . Restore a href .. . back to name .. . return content..replace a href a-zA-Z . gi 1 .. . Same thing for 0 constructs .. . .replace a href . d gi 1 .. . .. . .. . .. .", "Question : Can someone tell me how to set language of a web page on the knowledge of IP address of visitor so that he automatically gets page in his country s language . Of course if that language is implemented by web developer . Even better I sow some examples of automatic Google translation of the text . So how to achieve that visitor from USA gets text on my page in English and visitor from France in French . All that translated by Google from some third original language . Thanks a lot . .. . Answer : This is a bad idea from the offset . 1 . Geolocating on IP address doesn t always work and doesn t work if you use TOR .. . 2 . Even if you get this right what would you do for countries like Canada or Switzerland 3 . Automatic translation is ok but it would be better to tell someone that you don t have the site in their language - they may then prefer to read it in a different language .", "Question : Hi i am devloping sample site in php i need to translate whole website in to persian . how can it possible in php I have tried using the following code. . This code will working fine for deutsch conversion . 2.Register.php .. . .. . Is it possible to transilate to other laguages using this code I changed register1.php lang de to register1.php lang fa persian . . But nothing hapens..anybody plese help Comment : Please note the class that you are using for translation . Comment : Translator class Comment : You need a file called fa.txt with the translation strings inside . Comment : I think the idea given by Harry is good for you . .. . Answer : As i can read from the code the translator class loads the translation data from en.txt file if you want have fa translation just create fa.txt as copy of en.txt with all translations and edit and translate fa.txt to persian.. . .. . .. . Hope it helps", "Question : I have a django project that uses a worker process that sends emails to users . The worker processes listens to a rabbitmq server and gets all the details about the email to send the template variables the email-address to send to etc . The email body is created with django-templates and render to string http : docs.djangoproject.com en dev ref templates api the-render-to-string-shortcut . However I want to internationalize this . Some of our users are going to be using the website in English some in other languages . They should get emails in their language . I have tried to i18n the email worker process using django.utils.translations.ugettext ugettext lazy so that the email subject and email body has .. . http : docs.djangoproject.com en dev topics i18n internationalization standard-translation or blocktrans resp . However since the email is rendered and sent in a different background worker process the normal django language-detection process http : docs.djangoproject.com en dev topics i18n deployment how-django-discovers-language-preference doesn t seem to apply . There is no user session no cookies or no http-headers for it to look at . When sending the message to the rabbitmq server I can store the language code .. . .. . But how do I tell django gettext to use that language at a point . e.g . My function that sends email might look like this : .. . .. . What do I put in to switch django translations gettext to a specific language code so that the will use that language code .. . Answer : Turns out the django docs explain how http : docs.djangoproject.com en dev howto i18n using-translations-outside-views-and-templates : .. . .. . While Django provides a rich set of i18n tools for use in views and templates it does not restrict the usage to Django-specific code . The Django translation mechanisms can be used to translate arbitrary texts to any language that is supported by Django as long as an appropriate translation catalog exists of course . You can load a translation catalog activate it and translate text to language of your choice but remember to switch back to original language as activating a translation catalog is done on per-thread basis and such change will affect code running in the same thread . Comment : Yeah just use from django.utils import translation translation.activate language code", "Question : null .. . Answer : I am working on a .Net software product that consists of multiple applications of various sizes and dozens potentially hundreds of assemblies . Everything must be translated into several languages . Whereever I look the suggested way to localize strings in .NET is to create satellite assemblies with resource strings . Of course all those examples simply show one assembly and how to make localization work technically . My problem is that in practice I don t see how this should scale to a large set of assemblies . If i simply duplicate the approach for each assembly I end up with a really big number of satellite assemblies to maintain and deploy and I have to keep track of one and the same string translation in every assembly that requires it . Everytime a translation changes I have to locate all uses of this string throughout all my assemblies and modify it . Everytime I need to update my translations I need to extract everything from the multitude of resource files send it to the translators and then spread their results again to the correct resources . This can be done of course and I assume some of it can and must be scripted . However it doesn t strike me as especially smooth and efficient . One alternative I can think of is to create a dedicated translation assembly with satellite assemblies that serves as a central repository for localized strings . All translations of all strings of all assemblies would go there and it would be referenced by each and every assembly in turn to spit out the translations . This seems to make maintenance a lot easier but of course this central assembly with its enormous set of resource strings would have to be deployed along-side even the smallest of my applications which actually would need only a tiny fraction of them . Moreover this assembly would have to be frequently changed by many developers which would lead to a high risk of conflicts . My question is : .. . How is the approach of localization via satellite assemblies supposed to scale to large software projects with many assemblies What are the suggested strategies and best practices Comment : To quote MSDN http : msdn.microsoft.com en-us library 5839we2z 28v vs.110 29.aspx The common language runtime supports a satellite-assembly resource model that separates an application s executable code from its resources . For more information about implementing this model see Resources in Desktop Apps http : msdn.microsoft.com en-us library f45fce5x v vs.110 .aspx . emphasis mine As such why would you need to update your code if a translation changes After all the resource name can and should stay fixed across locales.. . Comment : No need to update code of course . What I meant is : There are numerous strings that are repeatedly used throughout large parts of the application . If each assembly has its own translations of these strings in its own satellite-assembly effort is required to keep those translations in sync . Comment : Sounds more like you want to refactor consolidate your assemblies or use tools to build the duplicate resources . Of course a good case study of how it can work is the .Net framework itself . Comment : Are you saying that a situation with translations shared by multiple assemblies should be avoided I see that this would of course resolve the problem . I assume this is also the way the .Net framework does it . However If I do that I end up with one humongous assembly . This is just not possible in my case for various reasons . Which tools and how would they help me", "Question : I have a website in PHP solution in JAVA is also welcome I want to add multilingual support in my website . Strict specification is that when user wants to change language of the page it would get translated dynamically . I am not suppose to make N no . different of pages for different language . Is it possible If Yes how I have gone through few plugin web service such as Microsoft but they charge heavily that s why I want to do it on my own . Comment : stackoverflow.com questions 19249159 https : stackoverflow.com questions 19249159 best-practice-multi-language-website .. . Answer : you could use a frontend translation tool such as https : localizejs.com there are others there you can add languages on the fly and as long as no human translations are available the tool would use something like Google Translate as a fallback", "Question : I have a lot of text data and want to translate it to different languages . Possible ways I know : .. . .. . Google Translate API .. . Bing Translate API .. . .. . The problem is that all these services have limitations on text length number of calls etc . which makes them inconveniente in use . What services ways you could advice to use in this case Comment : Not programming related . Voting to move to Super User . Comment : @David Thornley He is asking for an API to programatically translate large texts. . how is that not programming related Comment : this is definately programming related Comment : @MarceloRamires : The first sentence is I have a lot of text data and want to translate it to different languages . This is not the same as I need to set up a way to translate text in an automated manner . Comment : @David Thornley : The question contains more that one sentence . .. . Answer : We used http : www.berlitz.co.uk translation We d send them a database file with the english and a list of the languages we required and they d use various bilingual people to provide the translations . They also used voice-actors to provide WAV files for our telephone interface . This was obviously not as fast as automated translation and not free but I think this sort of service is the only way to be sure your translation makes sense .", "Question : I m in the process of marking up an historical manuscript which has been translated from German into English . On the web page I will be providing both languages side-by-side . Is there an accepted way to markup such a scenario I was thinking of splitting the translation blocks using the section tag and providing each with a lang attribute . However semantically this fails at communicating that one section roughly equates to the other . Any thoughts on this would be greatly appreciated . .. . Answer : I think that table could be used here to relate the original text to its translation : .. . .. . assuming that both versions are actually quoted from a different source .. . .. . It would be possible to divide the original and the translation into sections or pages or paragraphs or whatever if useful each represented by a separate row tr . .. . .. . See also my answer http : stackoverflow.com a 15579446 1591669 to a similar question . .. . .. . Note that by using blockquote the headings of the manuscript and the translation are not part of the document outline http : www.w3.org TR html5 sections.html headings-and-sections .", "Question : Hi i am devloping sample site in php i need to translate whole website in to persian . how can it possible in php I have tried using the following code. . This code will working fine for deutsch conversion . 2.Register.php .. . .. . Is it possible to transilate to other laguages using this code I changed register1.php lang de to register1.php lang fa persian . . But nothing hapens..anybody plese help Comment : Please note the class that you are using for translation . Comment : Translator class Comment : You need a file called fa.txt with the translation strings inside . Comment : I think the idea given by Harry is good for you . .. . Answer : From an Perl trans script I extracted the following for 100 free php google translation this function : .. . .. . See working demo on http : ogena.net" ] }
[ "yes-answer-long", "yes-answer-short" ]
website
UNK_RELATION
taglist@plugins@107
taglist -- programming editors like vim have built-in capabilities to query for and jump to matching tags @placeholder like taglist and tagbar dress up this information and show it in a sidebar .
{ "confidence": [ 59.86964797973633, 56.12872314453125, 54.10574722290039, 54.01711654663086, 53.12199783325195, 52.17135238647461, 52.17135238647461, 51.5751953125, 50.6402473449707, 49.6522331237793, 48.72995376586914, 48.72995376586914, 48.72995376586914, 48.72995376586914, 48.258548736572266, 47.46414566040039, 47.345333099365234, 47.080047607421875, 47.05569839477539, 47.05569839477539, 47.05569839477539, 46.63894271850586, 45.94499206542969, 45.89693832397461, 45.405792236328125, 45.038612365722656, 44.96782684326172, 44.90879440307617, 44.46836853027344, 43.65845489501953, 43.13984680175781, 43.04060363769531, 42.9393196105957, 42.3996696472168, 41.98420333862305, 41.98420333862305, 41.96098709106445, 41.873779296875, 41.36634826660156, 41.28721237182617, 41.28721237182617, 41.123558044433594, 40.95026779174805, 40.69799041748047, 40.255638122558594, 40.012847900390625, 39.6812744140625, 39.6812744140625, 39.6812744140625, 39.6812744140625, 39.6812744140625, 39.6812744140625, 39.2874641418457, 39.191795349121094, 39.176025390625, 39.176025390625, 39.138031005859375, 39.054683685302734, 38.401458740234375, 38.16223907470703, 38.007022857666016, 38.007022857666016, 38.007022857666016, 38.007022857666016, 38.007022857666016, 38.007022857666016, 37.96959686279297, 37.51754379272461, 37.380428314208984, 37.380428314208984, 37.380428314208984, 37.380428314208984, 37.326656341552734, 37.326656341552734, 37.242984771728516, 37.18547058105469, 36.867408752441406, 36.7813606262207, 36.599178314208984, 36.59327697753906, 36.59327697753906, 36.59327697753906, 36.59327697753906, 36.59327697753906, 36.59327697753906, 36.57079315185547, 36.26972198486328, 36.22441482543945, 35.95266342163086, 35.78526306152344, 35.06248474121094, 34.959835052490234, 34.959835052490234, 34.938507080078125, 34.938507080078125, 34.91902160644531, 34.91902160644531, 34.91902160644531, 34.91902160644531 ], "content": [ "Anyway try TagBar http : majutsushi.github.com tagbar or TagList http : vim-taglist.sourceforge.net .", "taglist plugin is separate to the tags browsing in VIM .", "taglist on the left tagbar on the right http : i.stack.imgur.com Lie5A.png .. . .. . TagList on the left TagBar on the right .", "You are right but neither TagList nor TagBar use actual tags files .", "I think the way TagList is supposed to be used is by browsing through the tags in the taglist window and pressing enter to jump to the definition .", "try tagbar looks better than taglist", "From left to right : the file TagBar TagList .", "I think that both Taglist and Tagbar rely on the tags generated by ctags .", "From the Taglist doc : .. . .. . Link to the taglist-options http : vim-taglist.sourceforge.net manual.html taglist-options section .", "My problem : I cannot jump to the tags shown in the taglist window .", "I am using Taglist plugin in vim .", "I am trying to configure taglist with vim .", "also vim wont maximize on start if taglist is enabled .", "I am using Vim with TagList in development .", "The only taglist I know of are : .. . .. . the taglist function : h taglist which is of no use for you or me in your daily Vim usage .. . .. . and the TagList http : www.vim.org scripts script.php script id 273 plugin .", "There are lots of blogs introducing how to set it work with NERDTree and taglist tagbar .", "Now what TagList does is show the tags for the currently active file in a sidebar it uses ctags for this but I don t know where it stores the tags file .", "Taglist keeps the tags for currently open buffers in memory .", "I installed taglist and ctags for vim in OSX .", "If not it s not a problem with TagList or Vim but with your regular expression .", "I use Vim with ctags and Taglist plugins .", "Taglist is just showing you information from the tags file that ctags creates .", "I am using Vim with cscope ctags and TagList .", "Problem : to move upwards in Vim s Taglist by t .. . .. . The movement keys DHTN work in Vim when I am not in TagList .", "Anyway to extend standard vims tags with TagList", "Taglist can t AFAIK be setup to work like that but the more recent TagBar http : majutsushi.github.io tagbar is able to group members under their corresponding class .", "The Problem is that winManager creates the tagList window on the left and in someway override the taglist use right window .", "Have you used TagList before", "Indeed vim-taglist invokes ctags but doesn t keep the tags file which is necessary for Control+ to work .", "Also : help taglist-using .", "taglist widget", "In the taglist window i can see tags like namespaces classes struct function but not variables .", "I m new with vim s taglist plugin and have a question regarding display style of classes and members within taglist window .", "I already have taglist working well .", "Same goes with the Taglist Plugin", "Taglist is ready to use with winmanager .", "What is this taglist you are talking about", "I d like to use Ctag and TagList plugin in my Vim editor everything works fine except taglist navigation it couldn d display all page functions included but the page defined itself .", "If access the functionality through the Tags drop-down-menu it seems like taglist is adding part of the label text before the call .", "Unfortunately I ve not found a setting for showing the tags from all loaded buffers the way TagList does so I would prefer to use TagList .", "but I think taglist plugin does not need to create a tags file...it does it dynamically and I can navigate to the definitions in the taglist window fine .", "If I : set ft scheme both TagList and TagBar http : www.vim.org scripts script.php script id 3465 list checker as function .", "I made a custom remapping for Taglist : .. . .. . How can I make Taglist open to the right side instead of the left side", "I wonder what Vim Taglist http : www.vim.org scripts script.php script id 273 is good for if I cannot jump to a tags definition from within an open-source file .", "This separates the members of the individual classes but only shows the tags of the current single file not an accumulated list like Taglist .", "special thanks for tagbar suggestion I didn t know about it seems to be much better taglist", "Now this variable should appear in the taglist window .", "if the above can t be fixed are there any taglist altenatives .", "I think the problem is some where else and not with the TagList .", "If I use only taglist it works fine .", "The actual purpose of taglist remains unclear to me .", "By default this is bound to the P key in the TagList window .", "I was wondering if it is possible to make vim s taglist to show cython source code information .", "While using a preview p or jump-to enter command in the taglist window the appropriate line is by default in the file-edit window .", "Following are my ctags and taglist settings .", ".ctags : .. . .. . .vimrc taglist settings extracted", ": set tags . tags tags .. . .. . See : help tags-option .. . .. . The taglist plugin runs ctags as requested and doesn t store the results in files .", "There is a variable s : tlist def cpp settings in Taglist plugin .vim plugin taglist.vim that defines which elements are shown by default .", "Unfortunately I m not savvy enough with taglist or vim in general yet to discover what change I can make to get all those wonderful ctags command-line results to show up in vim .", "@FelikZ you can do both already if you have both a tags file and TagList running .", "A link-to it can be found on the extending taglist page .", "I use taglist to get a tag list .", "See http : docs.codehaus.org display SONAR Taglist+Plugin", "So my question is : Is there an simple alternate to the Taglist plugin", "Documents about the implementation of Taglist are also welcomed .", "I ve just installed ctags and taglist to check this out .", "So I came up with a temporary and manual solution which I execute in my vim like this : - .. . .. . The first command tells my vim taglist where my indexed results are stored .", "C- is totally unrelated to the TagList plugin and is used to jump to the definition of the symbol under your cursor .", "I m in windows XP and the vim TagList plugin only behaves correctly if the file I m coding in is inside the Ctag58 folder .", "I want to close Vim when closing the last buffer tab TagList and NERDTree splits are the only remained .", "Taglist does do a great job but it occasionally crashes when cooperating with buffers in my vim .", "The question is : How do I close Vim editor in Linux Mint if only NERDTree and TagList are the only two buffers left", "I have the latest version of Exuberant ctags and taglist installed .", "I have gVim 7.3 with taglist and ctags 5.8 on windows .", "TagList and TagBar against a racket file http : i.stack.imgur.com yEaIr.png .. . .. . From what I understand Racket is a rebranding of some Scheme derivative .", "eg .. . .. . get input was defined in another file.Here I can see only recent in the TagList sidebar .. . .. . How to let the sidebar show all functions in my recent working file", "I m using a taglist plugin for a few days and now I tried it with Javascript but in Javascript it shows only partial information or no information .", "Basically my .vimrc starts TagList http : vim-taglist.sourceforge.net and NERDTree when Vim is launched as splits on the left and on the right of the normal file buffer .", "The taglist plugin is rather old and has not been kept up to-date .", "I saw a screenshot attached below on Taglist website which had this info .", "Use let tlist cpp options to set options on how taglist executes ctags .", "According to the plugin s documentation : help taglist-using this behavior is determined by a configuration variable :", "The : tag.. . commands or the taglist plugin which ought to invoke ctags automatically", "Right that was what I was hinting at : The plugin jumps to the result window then back to the taglist .", "It says Press F1 to display help text in the taglist window .", "I am just curious if we can toggle focus between taglist window and source window without closing the taglist window", "Taglist only supports exuberant-ctags tool not GNU ctags or the Unix ctags see the FAQ http : vim-taglist.sourceforge.net faq.html .", "No TagBar doesn t show tags for multiple buffers you can still use native commands like : tselect though .", "When I opened my taglist window it looks like all the sections labels and references were correctly found .", "Use the easytags plugin : http : www.vim.org scripts script.php script id 3114 .. . .. . .. . .. . From what I understand using Ctrl- and Ctrl-t to navigate tags is part of vim itself NOT Taglist .", "I hadn t realised taglist was actually running its own ctags every time not just using my tags file .", "For a quick test just add a variable of any type at the start of your source file save the source file set cursor into the taglist window and press u to update taglist .", "TagList seems to be very nice but one problem with that is that it takes a long time to refreshe so if for example I mean from the function A to the function B in the same file it takes around 5 seconds for TagList to get updated .", "I wonder if I can add support to taglist which is a Vim plugin for that kind of file .", "I searched in Google found this http : blog.g-design.net post 4603526300 add-html-support-to-taglist-in-vim but it did not work .", "I m having trouble getting the taglist plugin working properly with Scala .", "I am trying to get my taglist plugin to work correctly .", "Is there any way to use Taglist or another plugin to get an overview of the code flow", "When I started to use taglist and ctags I stopped using folding ." ] }
{ "confidence": [ 80.46083068847656, 73.6738510131836, 73.40519714355469, 73.37786102294922, 73.32992553710938, 72.16697692871094, 70.68931579589844, 69.41654205322266, 67.88238525390625, 67.70759582519531, 67.53731536865234, 67.35609436035156, 67.05680847167969, 66.47013092041016, 66.22882080078125, 65.7548828125, 65.2305679321289, 65.03227233886719, 64.5513916015625, 63.71246337890625 ], "content": [ "Question : I am trying to configure taglist with vim . I ran : TlistAddFilesRecursive at the root of my java source . Say I have a class .. . .. . I place my cursor is on Bar and I do .. . .. . However if I : TlistToggle and search for Bar then press enter the class is findable and it opens . Does anyone know what would cause this Thanks . .. . Answer : Use the easytags plugin : http : www.vim.org scripts script.php script id 3114 .. . .. . .. . .. . From what I understand using Ctrl- and Ctrl-t to navigate tags is part of vim itself NOT Taglist . It gets the information from a tag file that you need to generate using ctags example ctags -R . If you generate such a tag file you will see that Ctrl- works just fine . Now what TagList does is show the tags for the currently active file in a sidebar it uses ctags for this but I don t know where it stores the tags file . If you manually add using TlistAddFilesRecursive it updates its internal tags file with tags from these files . I think the way TagList is supposed to be used is by browsing through the tags in the taglist window and pressing enter to jump to the definition . Comment : Taglist keeps the tags for currently open buffers in memory .", "Question : I d like to use Ctag and TagList plugin in my Vim editor everything works fine except taglist navigation it couldn d display all page functions included but the page defined itself . and I press ctrl+ it also works well . eg .. . .. . get input was defined in another file.Here I can see only recent in the TagList sidebar .. . .. . How to let the sidebar show all functions in my recent working file Thanks for all help Comment : In my global vimrc file it was added like this let Tlist Ctags Cmd usr bin ctags .. . Answer : I think that you can t . Taglist shows you only where things are declared not where you call them . You could search for the filenames inside the directory or use another tool like cflow to see what functions are called from the file . You can t display that information because ctags doesn t care about . Ctags is a tool to map the definitions of functions defines etc . Taglist is just showing you information from the tags file that ctags creates . Whatever functions you actually call in your files id none of ctags s concern so you can t display this information with ctags and TagList .", "Question : I wonder what Vim Taglist http : www.vim.org scripts script.php script id 273 is good for if I cannot jump to a tags definition from within an open-source file . Do I have to generate a separate tags file by running say ctags .f90 in order to be able to use Ctrl+ .. . Answer : What is this taglist you are talking about The only taglist I know of are : .. . .. . the taglist function : h taglist which is of no use for you or me in your daily Vim usage .. . .. . and the TagList http : www.vim.org scripts script.php script id 273 plugin . Do you refer to the : tag family of commands C- and : tag are used in conjunction with a tags file to jump to the declaration of a variable or method or whatever . If you have no tags file C- simply won t work . The TagList plugin uses ctags under the hood to build an actionable list of the elements present in your file s but it doesn t use a tags file : the result-of the ctags command is consumed directly . That means that you can perfectly have a working TagList plugin and a non-working C- and : tag : tselect etc at the same time . Those are separate features . Comment : vim-taglist.sourceforge.net http : vim-taglist.sourceforge.net Comment : Thank you for this enlightening answer", "Question : I ve been using ctags+taglist for a while trying to build up an IDE for myself . Taglist does do a great job but it occasionally crashes when cooperating with buffers in my vim . As a newcomer I see there may be some issues with my way of using the plugin but I cannot find them . Also the code of Taglist is far too complex for me to understand or modify . So my question is : Is there an simple alternate to the Taglist plugin Documents about the implementation of Taglist are also welcomed . .. . Answer : Look at Tagbar http : majutsushi.github.com tagbar and winmanager http : www.vim.org scripts script.php script id 1440 . Taglist is ready to use with winmanager .", "Question : I have a file which has PHP and HTML mixed-code . By default Vim recognized this extension as php . File extension is phtml . I wonder if I can add support to taglist which is a Vim plugin for that kind of file . I have exuberant-ctags installed too . I searched in Google found this http : blog.g-design.net post 4603526300 add-html-support-to-taglist-in-vim but it did not work . It seems the code is wrong instead of seeing the tags on the left I can see the name of the file . Comment : is the filetype php or html Comment : @JoseElera : Thanks for your comment Jos . Filetype is phtml . It seems it is a combination between php and html . .. . Answer : The taglist plugin is rather old and has not been kept up to-date . I suggest you switch to Tagbar which was written as an update and replacement : http : www.vim.org scripts script.php script id 3465 or http : majutsushi.github.io tagbar . With no attention to configuration I created a simple file foo.phtml : .. . .. . After : TagbarOpen I see the function I have defined : Comment : Thank you for your answer benjifisher . Do you know how I can make Tagbar show me the structure of HTML apart from php functions in case PHP and HTML code are mixed into one file Comment : I think that both Taglist and Tagbar rely on the tags generated by ctags . Look at the tags file you get and check the options for ctags . See : help tagbar-extend : if you can figure out which options to pass to ctags then this explains how to configure Tagbar to do that .", "Question : I ve recently started using racket and one of the first things I ve done has been to try and get the vim TagList plugin http : vim-taglist.sourceforge.net to work with it . However it doesn t work in the slightest . I can open racket files and the TagList window will be as blank as-if I had opened a text file . According to the extending page http : vim-taglist.sourceforge.net extend.html I have added the following to my .vimrc file : .. . .. . The extra ctags stuff is also in my .ctags file but TList was spitting out errors about my setting line not being any good . I did original try to use ctags existing scheme functionality but I had the same nothing results . To use the existing scheme functionality i tried the following in my .vimrc .. . .. . If anyone else has any ideas on how to get it working then I would be extremely grateful . Thanks .. . .. . I d post a link-to the ctags one page as well but it wont let me new user . A link-to it can be found on the extending taglist page . EDIT .. . .. . ctags from the command-line .. . .. . I can use ctags from the command-line . Testing with the ctags line on the TagList FAQ page I get the following : .. . .. . Output is the same if I force the language definition with switches or if I change the language to scheme . About TagBar .. . .. . I had not seen TagBar before people had suggested it . Interestingly enough it just worked with the changes to my .ctags file . Unfortunately I ve not found a setting for showing the tags from all loaded buffers the way TagList does so I would prefer to use TagList . I d post comparison images but I don t think its going to let me as a new member . As per romainl s suggestion I can set the vim filetype to scheme and it does work . This however only seems like an 80 solution when the documentation according to the extending pages seems to suggest that what I have should work . Perhaps I should be looking at filing a bug report . Thanks again Comment : Do your settings work when you use ctags directly from the command-line If not it s not a problem with TagList or Vim but with your regular expression . Comment : Does this --langmap scheme : .rkt work when ctags is used directly Comment : try tagbar looks better than taglist Comment : @locojay Indeed it does but it does not as far as I can see display the tags of multiple buffers at once . Comment : @romainl yes to both questions . I m editing the post to provide more details . .. . Answer : Here is a small racket snippet I lifted from the official documentation http : docs.racket-lang.org quick index.html and saved as tt.rkt : .. . .. . Without racket-specific syntax indent files nothing is shown whether ft is set to racket of course or nothing the default . If I : set ft scheme both TagList and TagBar http : www.vim.org scripts script.php script id 3465 list checker as function . From left to right : the file TagBar TagList . TagList and TagBar against a racket file http : i.stack.imgur.com yEaIr.png .. . .. . From what I understand Racket is a rebranding of some Scheme derivative . If it doesn t deviate too much from the norm adding this line in your .vimrc may help : Comment : Thanks for answering . I d not actually found TagBar and interestingly enough it just worked with my .ctags file which I added to as I tested it . Unfortunately while it does work it doesn t display tags from multiple buffers at once at least I didn t see an option for it . I d like to see if I can get the problem fixed but it is good to know I can work around it . Thanks . Comment : No TagBar doesn t show tags for multiple buffers you can still use native commands like : tselect though . It s not as pretty and convenient but it works .", "Question : When trying to run taglist : TlistToggle on a .py file I get the error : .. . .. . I ve downloaded the latest taglist and ctags plugins and ran : let Tlist Ctags Cmd usr local bin ctags within vim I m on OS X running vim in the terminal . Any thoughts to why I get the above error Comment : Did you set the shell variable CTAGSFLAGS to anything or does echo CTAGSFLAGS output nothing Comment : You re quite right. . that outputs nothing .. . Answer : Taglist only supports exuberant-ctags tool not GNU ctags or the Unix ctags see the FAQ http : vim-taglist.sourceforge.net faq.html . I use tagbar http : majutsushi.github.com tagbar instead of it . Comment : special thanks for tagbar suggestion I didn t know about it seems to be much better taglist Comment : Many thanks for this Installed it and it works straight away .", "Question : I ve recently started using racket and one of the first things I ve done has been to try and get the vim TagList plugin http : vim-taglist.sourceforge.net to work with it . However it doesn t work in the slightest . I can open racket files and the TagList window will be as blank as-if I had opened a text file . According to the extending page http : vim-taglist.sourceforge.net extend.html I have added the following to my .vimrc file : .. . .. . The extra ctags stuff is also in my .ctags file but TList was spitting out errors about my setting line not being any good . I did original try to use ctags existing scheme functionality but I had the same nothing results . To use the existing scheme functionality i tried the following in my .vimrc .. . .. . If anyone else has any ideas on how to get it working then I would be extremely grateful . Thanks .. . .. . I d post a link-to the ctags one page as well but it wont let me new user . A link-to it can be found on the extending taglist page . EDIT .. . .. . ctags from the command-line .. . .. . I can use ctags from the command-line . Testing with the ctags line on the TagList FAQ page I get the following : .. . .. . Output is the same if I force the language definition with switches or if I change the language to scheme . About TagBar .. . .. . I had not seen TagBar before people had suggested it . Interestingly enough it just worked with the changes to my .ctags file . Unfortunately I ve not found a setting for showing the tags from all loaded buffers the way TagList does so I would prefer to use TagList . I d post comparison images but I don t think its going to let me as a new member . As per romainl s suggestion I can set the vim filetype to scheme and it does work . This however only seems like an 80 solution when the documentation according to the extending pages seems to suggest that what I have should work . Perhaps I should be looking at filing a bug report . Thanks again Comment : Do your settings work when you use ctags directly from the command-line If not it s not a problem with TagList or Vim but with your regular expression . Comment : Does this --langmap scheme : .rkt work when ctags is used directly Comment : try tagbar looks better than taglist Comment : @locojay Indeed it does but it does not as far as I can see display the tags of multiple buffers at once . Comment : @romainl yes to both questions . I m editing the post to provide more details . .. . Answer : I ve been struggling with the same issue though for xslt files.. . My solution was found by poking around in taglist.vim whereby I added a line for .. . .. . try doing a search for the s : tlist def parts of the Vim code and put in something which looks sensible . There s a similar mechanism within Tagbar . I ve not read the code through in detail so I don t know why it would need this and not use the output from cta Comment : N.B . my code line above isn t complete.. . just for example only .", "Question : I wonder what Vim Taglist http : www.vim.org scripts script.php script id 273 is good for if I cannot jump to a tags definition from within an open-source file . Do I have to generate a separate tags file by running say ctags .f90 in order to be able to use Ctrl+ .. . Answer : Yes you need a tags database usually created by running ctags or an equivalent external tool to use the tag jump search functionality of Vim . As Vim is a general-purpose text-editor it does not possess any knowledge about individual languages and instead delegates in true spirit of Unix s do one thing well mantra this to an external resource . PS : There are plugins like easytags.vim http : www.vim.org scripts script.php script id 3114 that automate the process of tags generation and update . Comment : Thank you . Thus taglist is just an addition to the still required : ctags invocation either manual or automated via easytags The actual purpose of taglist remains unclear to me . Comment : What exactly do you mean by taglist The : tag.. . commands or the taglist plugin which ought to invoke ctags automatically Comment : vim-taglist.sourceforge.net http : vim-taglist.sourceforge.net Comment : Indeed vim-taglist invokes ctags but doesn t keep the tags file which is necessary for Control+ to work . Comment : Yep you ve got it now romainl also spelled this out in detail in his good answer .", "Question : I have gVim 7.3 with taglist and ctags 5.8 on windows . Taglist is working nicely without the need to generate the tags file myself I can see the tags of the current buffer in the tags window and go to any of them etc . But I understand that I should be able to use C- in the editor to go to a declaration under the cursor too this is not working it keeps saying .. . .. . What should I do to be able to use C- Comment : You might want to use plugin Indexer : goo.gl kixRn http : goo.gl kixRn . It provides painless automatic tags generation for the whole project s and keeps tags up-to-date . Check my another answer for some details : goo.gl pG9OP http : goo.gl pG9OP Comment : thanks Dmitry I will try that for sure .. . Answer : TagList is a third party plugin completely separated from Vim s C- and related commands . Because it doesn t generate a tags file or even uses a tags file it operates in its own bubble . C- is a native Vim command that uses a tags file that you need to generate with a command like : ctags -R . and that you must make sure it is known by Vim . Comment : understood thanks . So the question is now is there a way to tweak taglist to use C- Comment : TagList provides a list generated using ctags of the symbols present in your file that you can use to navigate in your code with CR or a mouse click . C- is totally unrelated to the TagList plugin and is used to jump to the definition of the symbol under your cursor . Using C- in the TagList window makes no sense because there is no code there thus no symbols and no reason to use ctags and C- there . Comment : Anyway to extend standard vims tags with TagList So I can do both navigation via cr in window and c- while cursor on function Comment : @FelikZ you can do both already if you have both a tags file and TagList running . Ask TagList s authors for that feature .", "Question : I m using a taglist plugin for a few days and now I tried it with Javascript but in Javascript it shows only partial information or no information . It seems that the problem could be with namespaces because the functions are in .. . .. . or this sort of functions anonymous .. . .. . Do you know how to correct this problem thank you Comment : There s a missing between namespace name and a missing after the last and the last is not allowed here in JavaScript . Comment : @romainl Syntax is OK . I have this problem with all javascript files . .. . Answer : Did you try TagBar http : www.vim.org scripts script.php script id 3465 It s a more modern take on the same idea which works better with JavaScript and even supports jsctags . taglist on the left tagbar on the right http : i.stack.imgur.com Lie5A.png .. . .. . TagList on the left TagBar on the right . TagList doesn t work because Exuberant ctags the program used by TagList to index your code is not very good with JavaScript especially the modern stuff with callbacks closures and self executing functions . On the other hand TagBar uses jsctags for JavaScript if it s available . Jsctags is made with modern JavaScript in mind and as such works a lot better . Compare these tag files generated against the following code based on your samples : .. . .. . Output of ctags . : .. . .. . Output of jsctags . : .. . .. . There are a bunch of questions on SO about customizing exuberant-ctags to make it work better with JavaScript : here http : stackoverflow.com questions 4477322 how-to-make-vim-ctags-works-for-modern-javascript and here http : stackoverflow.com questions 1790623 how-can-i-make-vims-taglist-plugin-show-useful-information-for-javascript . So basically there are two ways to solve your problem : customize ctags or use tagbar+jsctags . Comment : It shows correctly functions in namespace but still has problems with many functions . I will edit question . Comment : There are too many in your sample . But it doesn t really change anything . See my edit . Comment : Is jsctags still available to download from somewhere Comment : Yes you can download it from its official github page https : github.com evilpie jsctags . Comment : @romaini I installed jsctags but when I use it according to usage https : github.com evilpie jsctags section it writes error usr bin env : node : No such file or directory . I can t accept this question before I don t solve this error . Should I ask another question or is this something trivial", "Question : As pictrue I think you can understand me . I try to set .vimrc for taglist : .. . .. . or .. . .. . it does work of course . I try to C+W + H J K L fail again.. . .. . .. . Who is familiar with vim help me please . enter image description here http : i.stack.imgur.com jcgBn.jpg .. . Answer : There is a vim-plugin winmanager http : www.vim.org scripts script.php script id 1440 . It can set the layout like your description . There are lots of blogs introducing how to set it work with NERDTree and taglist tagbar . Well there are also some complaints that winmanager is not under good maintenance . Sometimes it needs modification to the source code to work with NERDTree . I would suggest you try winmanager first . If it does not work you may try my stupid but useful work around : .. . .. . This will work if 1 taglist or tagbar is on the leftside 2 you open only one a window at first then press CTRL-e . You can open other windows then . Comment : Thank you for your answer I get to knew there is winmanage.I searched it and get many helpful information", "Question : I am using Taglist plugin in vim . In the taglist window i can see tags like namespaces classes struct function but not variables . I saw a screenshot attached below on Taglist website which had this info . I am using Vim 7 and Exuberant Ctags 5.8 and i have generated my ctags using this command .. . .. . alt text http : vim-taglist.sourceforge.net images taglist c.gif .. . Answer : As far as I know the Taglist plugin shows only the variables which have file scope . It does not show variables which have only function scope . For a quick test just add a variable of any type at the start of your source file save the source file set cursor into the taglist window and press u to update taglist . Now this variable should appear in the taglist window . This works for my C files . By the way : .. . .. . .. . and i have generated my ctags using this command .. . .. . ctags --c++-kinds +p --fields +iaS --extra +q --language-force C++ .. . .. . Do you mean that you generate your own tags file for the taglist plugin using these ctags options To my knowledge taglist uses its own ctags options and generates a temporary tag file . The user has no influence on the ctags options and the tags file . Comment : Does it show the class-variables Comment : Use let tlist cpp options to set options on how taglist executes ctags . : help taglist-extend As answered it executes ctags itself on the fly and shows results that way . It doesn t use a ctags file .", "Question : I ve been using ctags+taglist for a while trying to build up an IDE for myself . Taglist does do a great job but it occasionally crashes when cooperating with buffers in my vim . As a newcomer I see there may be some issues with my way of using the plugin but I cannot find them . Also the code of Taglist is far too complex for me to understand or modify . So my question is : Is there an simple alternate to the Taglist plugin Documents about the implementation of Taglist are also welcomed . .. . Answer : You want tagbar http : www.vim.org scripts script.php script id 3465 .. . .. . Oops Your answer couldn t be submitted because : .. . .. . body must be at least 30 characters you entered 15", "Question : I m new with vim s taglist plugin and have a question regarding display style of classes and members within taglist window . Taglist displays them as two separate lists : one for classes and one for class-members . However I would like class-members to be displayed as a subtree of a respective class tag . Is it possible Thanks in advance .. . Answer : No you can t . But another plugin TagBar http : majutsushi.github.com tagbar was created specifically for that .", "Question : I have some newbie question . There is exist vim-plugin like some class manager or class perspective like in eclipse or netbeans or geany I mean a perspective where i see a class structures all methods and functions . I looking this plugins for java that it will be very usefull for me . I looking for this in google i found something for C++ but not for java . I will be gratefull for any help : .. . Answer : Vim is not an IDE so you won t find exactly what you are after . Anyway try TagBar http : majutsushi.github.com tagbar or TagList http : vim-taglist.sourceforge.net . Comment : Thanks a lot I use a tagbar with ctags that s really helpfull", "Question : I installed taglist and ctags for vim in OSX . It looks cool but it s hard to use . For one thing after I select a tag in the taglist window it jumps to the code but then I don t know how to get back to the taglist window to select another place to go to . How do you do that What are some changes you recommend making so that this is easier to use .. . Answer : To go back after jumping to a tag use Ctrl+T . For more information on tag navigation see Browsing programs with tags http : vim.wikia.com wiki Browsing programs with tags on the Vim wiki . Comment : That doesn t work . It says the stack is empty . Comment : Ok . I don t use the tag window thingy you described but I use Ctrl+ to jump to the tag under the cursor . In that case Ctrl+T should work to go back .", "Question : I use Vim with ctags and Taglist plugins . When editing .vhd files the tags are very poor only the entity is displayed . I don t know if ctags support for VHDL is weak or if Taglist is reading unefficiently the file created by ctags . How can I fix that Is there another solution to create better tag for vhdl with ctags taglist Thanks a lot . Comment : You might want to try Emacs the VHDL mode is very advanced . iis.ee.ethz.ch zimmi emacs vhdl-mode.html http : www.iis.ee.ethz.ch zimmi emacs vhdl-mode.html Comment : Err I found emacs very difficult to learn . I couldn t make simple things works as for opening new tabs among other things . So I dropped it even if I tried VHDL mode . Also there is too much shortcuts and the editor is not really good looking .. . still thanks for the info Comment : Recall the time when you migrated from GUI based editors to vim was it difficult at the time But once you got used to it your productivity went up . Similarly Emacs maybe difficult initially but once you get to know the way things work it will become intuitive . You just need to find a good tutorial . You are the first person who is telling me that they don t want to use a great editor because of its looks . Do you know Emacs can be run inside the terminal too separate ugly window is not necessary maybe then it will look just like vim . And for VHDL you will never use any other editor . Comment : Indeed I recently migrated from GUI based editors to VIM . Now that my productivity is increasing I m really not willing to change again . What s in emacs that I won t have in vim except present problem which I m sure has a solution somewhere Comment : stackoverflow.com questions 1430164 http : stackoverflow.com questions 1430164 differences-between-emacs-and-vim .. . Answer : I ve added variable signal and : in out for port definitions based on the original .ctags file you suggested . I found that matching those also is more convenient", "Question : I am using Taglist plugin in vim . In the taglist window i can see tags like namespaces classes struct function but not variables . I saw a screenshot attached below on Taglist website which had this info . I am using Vim 7 and Exuberant Ctags 5.8 and i have generated my ctags using this command .. . .. . alt text http : vim-taglist.sourceforge.net images taglist c.gif .. . Answer : There is a variable s : tlist def cpp settings in Taglist plugin .vim plugin taglist.vim that defines which elements are shown by default . I extended it to : .. . .. . let s : tlist def cpp settings c++ n : namespace v : variable d : macro t : typedef . c : class g : enum s : struct u : union f : function m : member . p : prototype .. . .. . According to taglist manual you can also define tlist cpp settings in your .vimrc with similar value . For other languages different variables exist .", "Question : I ve recently abandoned mouse-driven platform-specific GUI editors and committed entirely to vim . The experience so far has been fantastic but I m stuck when it comes to Javascript . The ever-popular taglist utility using Exuberant Ctags has been great for everything but Javascript . With the language s overly-free form and structure taglist could only pick up a handful of functions when I opened it up -- only those defined in the format : .. . .. . but no variables or function objects defined like : .. . .. . So I googled a bit and found the following definition set for ctags which I put in my .ctags file : .. . .. . After that running ctags from the command-line was fantastic . It found every function and object that I needed it to find . The problem is that the taglist.vim plugin isn t seeing those new results . When I open my javascript file in vim and hit : TlistToggle I get the exact same meager handful of functions I got before . I hit u to update the list with no effect . Digging into taglist.vim I found this : .. . .. . ...which implies we re only looking at one specific kind of output from the ctags utility for javascript . Unfortunately I m not savvy enough with taglist or vim in general yet to discover what change I can make to get all those wonderful ctags command-line results to show up in vim . Help appreciated .. . Answer : I ve not used javascript or taglist much but looking through : help taglist-extend it looks like your definitions listed above rename the javascript output to js so you ll probably need something like in your vimrc : .. . .. . This is assuming that the ctags kind is f for function and m for method . Have a look at your tags file and see what the kind column looks like . By way of example my C code tags file includes this line : .. . .. . This is a define of a symbol ADC CR1 AWDCH 0 which is in the listed file at line 2871 . The d is the ctags kind for a defined name . Hopefully that will give you enough to get you going . As an aside I m not sure whether the override will work correctly so it might be worth naming your file myfile.mjs and changing your langmap to js : .mjs until it s working properly . Then at least you ll know whether your problems are associated with misidentification of files or the actual parsing ." ] }
[ "yes-answer-long", "yes-answer-short" ]
plugins
UNK_RELATION
elixir-framework@web-applications@149
elixir-framework -- frameworks for elixir like dynamo and phoenix that leverage the power of the erlang vm to build high performance and concurrent @placeholder .
{ "confidence": [ 53.008460998535156, 48.00151062011719, 47.0540771484375, 44.14808654785156, 41.844478607177734, 40.86799240112305, 40.12788772583008, 39.84117126464844, 39.4947509765625, 38.65667724609375, 38.401248931884766, 38.401248931884766, 37.371219635009766, 37.2834358215332, 36.7553825378418, 36.533287048339844, 36.25925827026367, 35.56304168701172, 34.795433044433594, 34.795433044433594, 34.695457458496094, 34.51296615600586, 33.34785079956055, 33.34785079956055, 33.145042419433594, 31.252229690551758, 30.32874298095703, 28.853134155273438, 28.63255500793457, 28.60073471069336, 26.326269149780273, 26.326269149780273, 26.326269149780273, 25.96705436706543, 24.95302963256836, 24.32809829711914, 24.32809829711914, 24.32809829711914, 24.32809829711914, 24.106876373291016, 24.06224822998047, 23.849573135375977, 23.782955169677734, 23.582857131958008, 23.37673568725586, 23.30716323852539, 23.212032318115234, 22.85457992553711, 22.708438873291016, 22.708438873291016, 22.290538787841797, 22.21438980102539, 21.96200180053711, 21.062572479248047, 21.062572479248047, 21.062572479248047, 20.884868621826172, 20.884868621826172, 20.884868621826172, 20.884868621826172, 18.805818557739258, 18.04665756225586, 17.726709365844727, 17.663986206054688, 17.550373077392578, 17.34386444091797, 17.1616153717041, 17.141502380371094, 16.735830307006836, 16.18939208984375, 16.18939208984375, 15.768260955810547, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.662800788879395, 15.362589836120605, 15.362589836120605 ], "content": [ "I am new in Phoenix Framework and Elixir .", "Please note that this is for phoenix 1.0 and elixir 1.0 .", "I m working on a project with Elixir and Phoenix something like POS system .", "I would look at Phoenix channels http : www.phoenixframework.org docs channels tasks http : elixir-lang.org docs stable elixir Task.html and GenServer http : elixir-lang.org docs stable elixir GenServer.html .", "I am creating a web app mostly following the Phoenix guides and the Elixir Dose Jobsite Example resources .", "Another way of doing it using Map.merge 2 http : elixir-lang.org docs v1.0 elixir Map.html merge 2 : .. . .. . merge map1 map2 http : elixir-lang.org docs v1.0 elixir Map.html merge 2 .. . .. . Example :", "I am using Elixir v1.0.3 Erlang OTP 17 erts-6.3 and Phoenix v0.8.0 I think I am not sure how to check Phoenix s version .", "Try the elixir getting started guide elixir-lang.org getting-started recursion.html http : elixir-lang.org getting-started recursion.html", "that is a bit more complex behaviour for that you may find answers at Float module here - elixir-lang.org docs stable elixir Float.html http : elixir-lang.org docs stable elixir Float.html", "You should use the struct 2 http : elixir-lang.org docs stable elixir Kernel.html struct 2 function .", "I m also very new to this elixir + phoenix ecosystem so please bear with me", "I am working with the Elixir Phoenix and trying to overwrite default boolean however it doesn t work .", "http : elixir-lang.org docs v1.0 elixir Enum.html fetch 2 It also has a same Enum.fetch http : elixir-lang.org docs v1.0 elixir Enum.html fetch 2 which does not raise exception .Finds the element at the given index zero-based .", "try this - github.com elixir-lang ecto issues 1114 https : github.com elixir-lang ecto issues 1114", "I want to use rabbitMQ from my elixir phoenix app via amqp .", "I am using Elixir 1.3.1 .", "@CoderDennis Yes this happened at 0.12.0 see github.com elixir-lang plug blob https : github.com elixir-lang plug blob 263f5ed01889611df8ecc25260e02091d095e9f3 CHANGELOG.md v0120 .", "It is uses poolboy https : hex.pm packages poolboy which is probably the most pervasive pool management library in Erlang Elixir .", "I need help regarding understanding the following syntaxes in elixir and . .", "So first thing I would probably switch to Elixir 1.1 or 1.2 .", "edit.html.eex : .. . .. . but I receive the following error : .. . .. . As far as I can tell being new to Elixir Phoenix and HTML action is essentially a path and any parameters I place in it will find their way back to the application .", "Also which version of Elixir are you using", "http : elixir-lang.org docs v1.0 elixir Enum.html any 2 that returns true if functions is true for any value otherwise return false .. . .. . - This will ignore an argument in function or in pattern-matching .", "I know in Elixir it s recommended to set the context if you want DRY your tests and to share data between the them http : elixir-lang.org docs v1.0 ex unit ExUnit.Callbacks.html .", "I m stuck since some hours now while trying to figure out how to configure Plug.Static without any other framework Phoenix Sugar .. . just Cowboy Plug and Elixir .", "Good day I have been trying hard to generate a new controller in phoenix with elixir but I m getting this error : .. . .. . but I can manually create the file which I do not know the breakdown of doing it .", "I can t speek authoritatively but I think what you want is a Task : elixir-lang.org getting-started mix-otp http : elixir-lang.org getting-started mix-otp task-and-gen-tcp.html tasks", "If you are running Elixir 1.2 then you should see a warning : .. . .. . warning : you are piping into a function-call without parentheses which may be ambiguous .", "Mailgun suggests using a css inline library http : blog.mailgun.com transactional-html-email-templates .. . .. . Tried search a lot but could not find a css inline library for Phoenix Elixir like the premailer https : github.com premailer premailer gem in Ruby .", "No : I was just trying to refer to Chris who created the Phoenix framework .", "Elixir v0.15.1 and Plug v0.5.1 .. . .. . EDIT : .. . .. . Adding a stacktrace per Jose s comment : .. . .. . EDIT 2 : I had jotted down the wrong URL above that s now corrected .", "I m not versatile with Plug but for a demo code I used fetch params 1 http : elixir-lang.org docs plug Plug.Conn.html fetch params 1 and then conn.params foo conn.params bar and so on and this definitely worked .", "Here s an example from the 1.2 ExUnit docs http : elixir-lang.org docs v1.2 ex unit ExUnit.Case.html : .. . .. . The second argument to the test is the context but instead of accessing the pid member you re matching out the pid .", "Since Plug.Conn is a struct if you need to change the host you can use the map update syntax http : elixir-lang.org docs stable elixir Kernel.SpecialForms.html 25 7B 7D 1 : .. . .. . If you want to change a key in a pipeline then use Map.put 3 http : elixir-lang.org docs v1.1 elixir Map.html put 3 : .. . .. . If you want something to run before each test you can use ExUnit.Callbacks.setup 2 http : elixir-lang.org docs stable ex unit ExUnit.Callbacks.html setup 2 .. . .. . Edit .. . .. . If you look at https : github.com elixir-lang plug blob 3835473fcf3a554a616d1bbcd2639aa63893be2c lib plug adapters test conn.ex L7 .. . .. . You will see that the host is determined by : .. . .. . Which is called in Phoenix by https : github.com phoenixframework phoenix blob b9ebbc2b9241b59dcac5d9c6d66fa248efe68a9c lib phoenix test conn test.ex L200 .. . .. . This means that in order to get the host that you want you need to specify it in the url not the conn .. . .. . Try this : .. . .. . edit2 .. . .. . The problem here is : .. . .. . The error is telling you that action 2 should return a Plug.Conn however you are returning the result-of the transaction 3 http : hexdocs.pm ecto Ecto.Adapter.Transaction.html c : transaction 3 which will be either : ok value or error value .. . .. . This means your function will be returning : ok conn .. . .. . Try : .. . .. . If you want to return a different result based on the transaction then I would move the whole section to a module function like AccountService.create and then use a case statement like :", "OFF-TOPIC : I also recommend applying Elixir style guide to your code : github.com niftyn8 elixir style guide https : github.com niftyn8 elixir style guide It makes it easier to read for other people .", "To see the version installed run .. . .. . Which shows you which phoenix you have in the deps directory .", "Thanks again @a4word I upgraded to Phoenix 0.9.0 and changed the template to get the token from the cookie .", "On version 0.13 of Phoenix you can do .. . .. . because on file web web.ex there s an import of this function .", "As another solution available since v0.10.0 you can let Phoenix inject the CSRF input for you .", "I am trying to incoporate a html5 boostrap theme I bought into a phoenix-framework app I m working on .", "How do I add Semantic-UI to Phoenix", "You should be able to see the value in your browser by running the following .. . .. . Which might return something like .. . .. . Note in the above the space which in phoenix was being url encoded to + which was still causing the CSRF to fail .", "Example : .. . .. . Using merge is odd too because it will undo the struct nature of the Map : .. . .. . Found this on the elixir-lang-talk Google Group from Jose himself : .. . .. . https : groups.google.com d msg elixir-lang-talk 6geXOLUeIpI L9einu4EEAAJ .. . .. . That s pretty much the way to go except you can do everything in one pass : .. . .. . .. . def to struct kind attrs do .. . struct struct kind .. . Enum.reduce Map.to list struct struct fn k acc - .. . case Map.fetch attrs Atom.to string k do .. . : ok v - acc k v .. . : error - acc .. . end .. . end .. . end .. .", "Because of this you still need an extra step to assign context : key to a variable each time you want to use the context variable for a pattern match not so DRY .. . .. . Another option for sharing data between tests are module attributes http : elixir-lang.org getting-started module-attributes.html .", "And therefore your issue is framework-agnostic because almost all frameworks libraries will have a problem to parse the URL in your intended way .", "I m using RethinkDB elixir client driver which requires connection to be initialized as defmodule FooDatabase do use RethinkDB.Connection end So I defined my worker in conqueuer as FooDatabase .", "Also if when you upgrade to phoenix 0.9.0 things have changed due to updates to Plug.CSRFProtection the CSRF works differently using cookies instead of sessions .", "One good example is the power function .", "First of all did you add Phoenix into your mix.exs", "I am sending emails using the mailgun library in Phoenix .", "What s the Erlang version", "From Phoenix changelog for v0.9.0 2015-02-12 https : github.com phoenixframework phoenix blob master CHANGELOG.md v090-2015-02-12 .. . .. . Plug Plug.CSRFProtection now uses a cookie instead of session and expects a csrf token parameter instead of csrf token .. . .. . To access the token s value grab if from the cookie which on the server-side looks like .. . .. . So for your code would look something like .. . .. . Now for completeness I needed the updated CSRF for requests built purely client-side so here is how I accessed the cookie within javascript using JQuery cookies for easy access .", "It turns out I am running Phoenix 0.8.0 so the code below works but you have saved me a big headache when I upgrade to 0.9.0", "Phoenix seems to be able to serve all the images and graphics ok except timer.png .", "My question is why is phoenix trying to serve timer.png from the wrong folder .", "I m using phoenix controllers to receive data via REST calls .", "Does anyone know of a way of changing the : host of the Phoenix application endpoint dynamically on every request", "Specifically to support multiple-domains on a single phoenix app i want to change the host in the endpoint based on the host in the connection object .", "In Rails we could do this using .. . .. . Can someone suggest how to do the same in Phoenix", "I have a very basic phoenix application that requires some data to be loaded into memory .", "Results will look something like this : .. . .. . form tag docs http : hexdocs.pm phoenix html", "It is a reported issue in the : amqp project https : github.com pma amqp issues 28 It fails compilation with Erlang 19 .", "I followed tutorial on official website https : www.rabbitmq.com tutorials tutorial-one-elixir.html but still during mix.deps compile I get an error : .. . .. . Terminal screenshot http : i.stack.imgur.com lBW8P.png .. . .. . I added only : amqp and : amqp 0.1.4 in mix.exs file : .. . .. . What changes I need to make to have my elixir app work with rabbitMQ", "glad you like the book : -", "The token is ne0GATpoc EW6jbIbC7tmfkAWl4qb1opTPWmmfYFTRY no spaces and the template creates a url POST config directories 9 x-csrf-token ne0GATpoc 2FEW6jbIbC7tmfkAWl4qb1opTPWmmfYFTRY 3D I have no idea why Plug.CSRFProtection does not like it .", "Again can Mix run Gulp Semantic-UI build automatically", "I ve installed phoenix JSON package through mix phoenix.gen.json V1.Post posts title : string content : string secret : string --no-model but got this error : .. . .. . here is my router.ex code : .. . .. . From the documentation said : .. . .. . Add the resource to the proper scope in web router.ex : .. . .. . resources posts PostController .. . .. . But. .", "fetch query params looks like the actual function name .", "Now you can use it just like a normal variable .", "I guess you really want to have something like uid ToddFlanders pwd MyTestPword .", "If you like you can give a name after underscore.Ex - base .. . .. . This is commonly used in the end of a tail recursive function .", "It seems like a bad idea to set it in the form .", "I am receiving an Invalid CSRF token error when trying to update or create a record .", "However when I try to post information from an html-form I get the Invalid CSRF token error .", "Following the advice given in the error I added x-csrf-token : csrf token to the action .", "And indeed I find that x-csrf-token is passed back to the router so @csrf token must not be correct .", "I am not sure exactly where the csrf token comes from so I do not know how to reference it or perhaps I am doing this completely wrong .", "Any ideas would be greatly appreciated .", "Now is that a bug in Plug or simply something to be handled I am not sure so for now I am simply handling the + explicitly .. . .. . With access to the CSRF token we now just need to add the x-csrf-token to your request header thank you ilake https : gist.github.com ilake 3656567 .", "Here is the code to make it work with an ajax call work fill in the url and data and response accordingly .", "Note that you could send back the csrf token as parameter as well but I prefer the above and it feels cleaner to me .", "Final note I didn t have enough reputation points to properly post a link-to jquery-cookie but it should be easy to google .", "Thank you for the detailed response .", "However strangely enough it seems to work but I am still getting a Invalid CSRF Cross Site Forgery Protection token error .", "Do you know or should I open another question", "I changed the name of the token in template from : x-csrf-token : Map.get @conn.req cookies csrf token to : csrf token : Map.get @conn.req cookies csrf token and now it works .", "That s right .", "See in your POST that the x-csrf-token is added a param on the URL but it needs to be an HTTP header .", "That said the authentication will also check for the csrf token param you yes things will work with that .", "Thanks", "I was just in the process of upgrading to 0.13 .", "Thanks-- that s the only change to the generated web web.ex from v0.12 - 0.13", "Example from upgrade guide http : www.phoenixframework.org v0.10.0 docs upgrading-from-v090 : .. . .. . That will output the form tag and a few input tags including the csrf token one .", "I found the answer on http : phoenix.thefirehoseproject.com .", "You must create a function to get the csrf token : .. . .. . web view.ex .. . .. . Then retrieve it in the template : .. . .. . web template directory edit.html.eex .. . .. . And that s it", "In my case it was the line plug : scrub params causing the problem .", "After commenting the line it worked .", "But need to make sure to fix it as the app would be insecure without the scrub params .", "So it should be something like this : exception id 5 application SomeApp", "Can it be automatically updated through Mix like the rest of the dependencies" ] }
{ "confidence": [ 61.74106979370117, 61.74106979370117, 58.28746032714844, 57.67839431762695, 52.88088607788086, 51.899261474609375, 50.32681655883789, 49.22216033935547, 47.61581802368164, 46.55921173095703, 44.0298957824707, 43.887794494628906, 43.06084442138672, 41.502742767333984, 41.25612258911133, 41.25612258911133, 40.99986267089844, 40.26919937133789, 39.2352409362793, 38.46046447753906 ], "content": [ "Question : I am receiving an Invalid CSRF token error when trying to update or create a record . I am using Elixir v1.0.3 Erlang OTP 17 erts-6.3 and Phoenix v0.8.0 I think I am not sure how to check Phoenix s version . I am creating a web app mostly following the Phoenix guides and the Elixir Dose Jobsite Example resources . However when I try to post information from an html-form I get the Invalid CSRF token error . Following the advice given in the error I added x-csrf-token : csrf token to the action . edit.html.eex : .. . .. . but I receive the following error : .. . .. . As far as I can tell being new to Elixir Phoenix and HTML action is essentially a path and any parameters I place in it will find their way back to the application . And indeed I find that x-csrf-token is passed back to the router so @csrf token must not be correct . I am not sure exactly where the csrf token comes from so I do not know how to reference it or perhaps I am doing this completely wrong . Any ideas would be greatly appreciated . .. . Answer : I found the answer on http : phoenix.thefirehoseproject.com . You must create a function to get the csrf token : .. . .. . web view.ex .. . .. . Then retrieve it in the template : .. . .. . web template directory edit.html.eex .. . .. . And that s it", "Question : I am receiving an Invalid CSRF token error when trying to update or create a record . I am using Elixir v1.0.3 Erlang OTP 17 erts-6.3 and Phoenix v0.8.0 I think I am not sure how to check Phoenix s version . I am creating a web app mostly following the Phoenix guides and the Elixir Dose Jobsite Example resources . However when I try to post information from an html-form I get the Invalid CSRF token error . Following the advice given in the error I added x-csrf-token : csrf token to the action . edit.html.eex : .. . .. . but I receive the following error : .. . .. . As far as I can tell being new to Elixir Phoenix and HTML action is essentially a path and any parameters I place in it will find their way back to the application . And indeed I find that x-csrf-token is passed back to the router so @csrf token must not be correct . I am not sure exactly where the csrf token comes from so I do not know how to reference it or perhaps I am doing this completely wrong . Any ideas would be greatly appreciated . .. . Answer : In my case it was the line plug : scrub params causing the problem . After commenting the line it worked . But need to make sure to fix it as the app would be insecure without the scrub params .", "Question : I am receiving an Invalid CSRF token error when trying to update or create a record . I am using Elixir v1.0.3 Erlang OTP 17 erts-6.3 and Phoenix v0.8.0 I think I am not sure how to check Phoenix s version . I am creating a web app mostly following the Phoenix guides and the Elixir Dose Jobsite Example resources . However when I try to post information from an html-form I get the Invalid CSRF token error . Following the advice given in the error I added x-csrf-token : csrf token to the action . edit.html.eex : .. . .. . but I receive the following error : .. . .. . As far as I can tell being new to Elixir Phoenix and HTML action is essentially a path and any parameters I place in it will find their way back to the application . And indeed I find that x-csrf-token is passed back to the router so @csrf token must not be correct . I am not sure exactly where the csrf token comes from so I do not know how to reference it or perhaps I am doing this completely wrong . Any ideas would be greatly appreciated . .. . Answer : As another solution available since v0.10.0 you can let Phoenix inject the CSRF input for you . Example from upgrade guide http : www.phoenixframework.org v0.10.0 docs upgrading-from-v090 : .. . .. . That will output the form tag and a few input tags including the csrf token one . Results will look something like this : .. . .. . form tag docs http : hexdocs.pm phoenix html", "Question : I am receiving an Invalid CSRF token error when trying to update or create a record . I am using Elixir v1.0.3 Erlang OTP 17 erts-6.3 and Phoenix v0.8.0 I think I am not sure how to check Phoenix s version . I am creating a web app mostly following the Phoenix guides and the Elixir Dose Jobsite Example resources . However when I try to post information from an html-form I get the Invalid CSRF token error . Following the advice given in the error I added x-csrf-token : csrf token to the action . edit.html.eex : .. . .. . but I receive the following error : .. . .. . As far as I can tell being new to Elixir Phoenix and HTML action is essentially a path and any parameters I place in it will find their way back to the application . And indeed I find that x-csrf-token is passed back to the router so @csrf token must not be correct . I am not sure exactly where the csrf token comes from so I do not know how to reference it or perhaps I am doing this completely wrong . Any ideas would be greatly appreciated . .. . Answer : On version 0.13 of Phoenix you can do .. . .. . because on file web web.ex there s an import of this function . Comment : Thanks I was just in the process of upgrading to 0.13 . Comment : Thanks-- that s the only change to the generated web web.ex from v0.12 - 0.13", "Question : I want to use rabbitMQ from my elixir phoenix app via amqp . I followed tutorial on official website https : www.rabbitmq.com tutorials tutorial-one-elixir.html but still during mix.deps compile I get an error : .. . .. . Terminal screenshot http : i.stack.imgur.com lBW8P.png .. . .. . I added only : amqp and : amqp 0.1.4 in mix.exs file : .. . .. . What changes I need to make to have my elixir app work with rabbitMQ Thank you Comment : Well that s odd . Have you tried to clean your dependencies mix deps.clean --all and then mix deps.get and mix deps.compile . Also which version of Elixir are you using Comment : I am using Elixir 1.3.1 . I tried that also but still getting an error . Comment : What s the Erlang version Comment : Running erl -eval erlang : display erlang : system info otp release halt . -noshell gives me 19 . Comment : Thank you very much I just got the same answer on rabbitmq-users google group . Cheers : .. . Answer : It is a reported issue in the : amqp project https : github.com pma amqp issues 28 It fails compilation with Erlang 19 . The problem lies in : amqp client . The last version in the repository is fixed but it does not exist as a hex package yet . If you want to keep using Erlang 19 a possible workaround is to fork the : amqp project and modify the mix.exs dependencies to : .. . .. . After that add your : amqp fork to your project dependencies so instead of using this mix.exs file : .. . .. . Use this : .. . .. . I hope this helps . Comment : Yup thanks : Comment : Edited the answer adding a possible workaround .", "Question : I am making a multisite application . I want to set the request host on the connection prior to testing the controller . In Rails we could do this using .. . .. . Can someone suggest how to do the same in Phoenix Edit 1 : I could set the host using conn put req header host abc.com but that did not change the host property in the conn object . It still points to www.example.com .. . .. . Edit 2 : I also tried .. . .. . But i got the following error : .. . .. . registration controller.ex line 1 is defmodule Myapp.RegistrationControllerTest do .. . .. . Edit 3 : Create action of registration controller.ex .. . Answer : Since Plug.Conn is a struct if you need to change the host you can use the map update syntax http : elixir-lang.org docs stable elixir Kernel.SpecialForms.html 25 7B 7D 1 : .. . .. . If you want to change a key in a pipeline then use Map.put 3 http : elixir-lang.org docs v1.1 elixir Map.html put 3 : .. . .. . If you want something to run before each test you can use ExUnit.Callbacks.setup 2 http : elixir-lang.org docs stable ex unit ExUnit.Callbacks.html setup 2 .. . .. . Edit .. . .. . If you look at https : github.com elixir-lang plug blob 3835473fcf3a554a616d1bbcd2639aa63893be2c lib plug adapters test conn.ex L7 .. . .. . You will see that the host is determined by : .. . .. . Which is called in Phoenix by https : github.com phoenixframework phoenix blob b9ebbc2b9241b59dcac5d9c6d66fa248efe68a9c lib phoenix test conn test.ex L200 .. . .. . This means that in order to get the host that you want you need to specify it in the url not the conn .. . .. . Try this : .. . .. . edit2 .. . .. . The problem here is : .. . .. . The error is telling you that action 2 should return a Plug.Conn however you are returning the result-of the transaction 3 http : hexdocs.pm ecto Ecto.Adapter.Transaction.html c : transaction 3 which will be either : ok value or error value .. . .. . This means your function will be returning : ok conn .. . .. . Try : .. . .. . If you want to return a different result based on the transaction then I would move the whole section to a module function like AccountService.create and then use a case statement like : Comment : Thanks conn did get updated in the setup but when it gets to the test its host value gets resetted . Do you know why that could be Comment : @PratikKhadloya See my edit Comment : Thanks @Gazler i tried it and updated my findings as Edit 2 in the question . I am still getting an error : Comment : @PratikKhadloya Please post your create action for your controller . Comment : @PratikKhadloya I m pretty sure I have found the problem . See my latest edit .", "Question : I m using phoenix controllers to receive data via REST calls . So an iOS app could send the events for each user and based on the event I need to calculate the score points and send it back to the user . Calculation and sending back to the user can happen asynchronously . I m using Firebase to communicate back to the user . What is a good pattern to do calculation Calculate could be bunch of database queries to determine the score of that event . Where should this calculation happen Background workers GenEvent streams within user-specific GenServer I have supervised GenServer per user . Comment : I m still a little unclear about what you re trying to accomplish in the end . Also are you using channels http : www.phoenixframework.org docs channels Comment : Please see updated description Comment : So to be clear you re not actually sending back the info via a response to the REST call Comment : I can t speek authoritatively but I think what you want is a Task : elixir-lang.org getting-started mix-otp http : elixir-lang.org getting-started mix-otp task-and-gen-tcp.html tasks Comment : Correct . REST APIs does not get give any response back other then 200 OK . What about GenEvent .. . Answer : I would look at Phoenix channels http : www.phoenixframework.org docs channels tasks http : elixir-lang.org docs stable elixir Task.html and GenServer http : elixir-lang.org docs stable elixir GenServer.html . Additionally if you would like to manage a pool of GenServer workers to do the calculations and maybe send back the results for you check out Conqueuer https : hex.pm packages conqueuer . I wrote this library and it is in use in production systems for my company . It is uses poolboy https : hex.pm packages poolboy which is probably the most pervasive pool management library in Erlang Elixir . Admittedly I do not fully understand the requirements of your system but it does not seem to me GenEvent has a place in your requirements . GenEvent is about distributing events to one or more consumers of events . So unless you have a graph of processes that need to subscribe to events being emitted from other parts of your system I do not see a role for it . Comment : I ended up using Conqueuer library . Comment : Is it possible to get the instance of the worker I m using RethinkDB elixir client driver which requires connection to be initialized as defmodule FooDatabase do use RethinkDB.Connection end So I defined my worker in conqueuer as FooDatabase . Comment : Conqueuer does not expose a way to gain access to a worker as there is a pool of workers . You should just pass the work to the pool and it will handle it for you depending on your naming something like : Conqueuer.work : foo databases some args here . If you are trying to gain access to a specific worker from your pool of workers I would question your design . Do you actually need a pool Do you actually need to access a worker directly", "Question : I am receiving an Invalid CSRF token error when trying to update or create a record . I am using Elixir v1.0.3 Erlang OTP 17 erts-6.3 and Phoenix v0.8.0 I think I am not sure how to check Phoenix s version . I am creating a web app mostly following the Phoenix guides and the Elixir Dose Jobsite Example resources . However when I try to post information from an html-form I get the Invalid CSRF token error . Following the advice given in the error I added x-csrf-token : csrf token to the action . edit.html.eex : .. . .. . but I receive the following error : .. . .. . As far as I can tell being new to Elixir Phoenix and HTML action is essentially a path and any parameters I place in it will find their way back to the application . And indeed I find that x-csrf-token is passed back to the router so @csrf token must not be correct . I am not sure exactly where the csrf token comes from so I do not know how to reference it or perhaps I am doing this completely wrong . Any ideas would be greatly appreciated . .. . Answer : To see the version installed run .. . .. . Which shows you which phoenix you have in the deps directory . Also if when you upgrade to phoenix 0.9.0 things have changed due to updates to Plug.CSRFProtection the CSRF works differently using cookies instead of sessions . From Phoenix changelog for v0.9.0 2015-02-12 https : github.com phoenixframework phoenix blob master CHANGELOG.md v090-2015-02-12 .. . .. . Plug Plug.CSRFProtection now uses a cookie instead of session and expects a csrf token parameter instead of csrf token .. . .. . To access the token s value grab if from the cookie which on the server-side looks like .. . .. . So for your code would look something like .. . .. . Now for completeness I needed the updated CSRF for requests built purely client-side so here is how I accessed the cookie within javascript using JQuery cookies for easy access . You should be able to see the value in your browser by running the following .. . .. . Which might return something like .. . .. . Note in the above the space which in phoenix was being url encoded to + which was still causing the CSRF to fail . Now is that a bug in Plug or simply something to be handled I am not sure so for now I am simply handling the + explicitly .. . .. . With access to the CSRF token we now just need to add the x-csrf-token to your request header thank you ilake https : gist.github.com ilake 3656567 . Here is the code to make it work with an ajax call work fill in the url and data and response accordingly . Note that you could send back the csrf token as parameter as well but I prefer the above and it feels cleaner to me . Final note I didn t have enough reputation points to properly post a link-to jquery-cookie but it should be easy to google . Comment : Thank you for the detailed response . It turns out I am running Phoenix 0.8.0 so the code below works but you have saved me a big headache when I upgrade to 0.9.0 Comment : Thanks again @a4word I upgraded to Phoenix 0.9.0 and changed the template to get the token from the cookie . However strangely enough it seems to work but I am still getting a Invalid CSRF Cross Site Forgery Protection token error . The token is ne0GATpoc EW6jbIbC7tmfkAWl4qb1opTPWmmfYFTRY no spaces and the template creates a url POST config directories 9 x-csrf-token ne0GATpoc 2FEW6jbIbC7tmfkAWl4qb1opTPWmmfYFTRY 3D I have no idea why Plug.CSRFProtection does not like it . Do you know or should I open another question Comment : I changed the name of the token in template from : x-csrf-token : Map.get @conn.req cookies csrf token to : csrf token : Map.get @conn.req cookies csrf token and now it works . Comment : That s right . See in your POST that the x-csrf-token is added a param on the URL but it needs to be an HTTP header . That said the authentication will also check for the csrf token param you yes things will work with that .", "Question : I need help regarding understanding the following syntaxes in elixir and . . What s those syntaxes role in elixir s-function For example Repo.get . I m not sure whether they were just function name or has a role . Though I know . is for calling anonymous function . And for any or variadic .. . Answer : Firstly and .. . .. . They are naming-conventions usually applied to the end of function name and are not any special syntax . - Will raise an exception if the function encounters an error . One good example is Enum.fetch http : elixir-lang.org docs v1.0 elixir Enum.html fetch 2 It also has a same Enum.fetch http : elixir-lang.org docs v1.0 elixir Enum.html fetch 2 which does not raise exception .Finds the element at the given index zero-based . Raises OutOfBoundsError if the given position is outside the range of the collection . - Used to show that the function will return a boolean value either true or false . One good example is Enum.any http : elixir-lang.org docs v1.0 elixir Enum.html any 2 that returns true if functions is true for any value otherwise return false .. . .. . - This will ignore an argument in function or in pattern-matching . If you like you can give a name after underscore.Ex - base .. . .. . This is commonly used in the end of a tail recursive function . One good example is the power function . If you want to raise any number base to 0 the result it 1 so it really does not matter what base is .. . .. . . - Used to access any function inside the module or as you suggested calling an anonymous function Comment : Just a note : the getPower function can make use of pattern-matching : defp getPower base 0 do : 1", "Question : I am new in Phoenix Framework and Elixir . I am trying to run seeder function for multiple time . though it is populating data quite well or as expected but it does throw a error while execute . Here is the seed file .. . .. . But while I run the seed command in terminal it shows error after populating the postgre database . here is the error message .. . .. . Can someone please explain to me what is going wrong here .. . Answer : You need to add a termination clause : .. . .. . Your function will currently never terminate . Since n is 25 when x reaches 26 you get the FunctionClauseError . Edit .. . .. . Functions are composed of their name multiply seeder their arity 2 and their guard clauses . If you call a function and it does not have a match you will get a FunctionClauseError . When recursively calling functions a good technique is to write your termination clauses first . So in this case-when x n you want to stop recursing . So you could write : .. . .. . In this case-when x n the recursion will stop . You can now put the body of your function in the catch all also known as the Pok mon clause : .. . .. . Note that order is important - the matches are evaluated top to bottom . In this case you do not need to implement a recursive function manually . You can do something like : Comment : yes ...it does .. . go for 26 . . and do not terminate . But I did not get your answer . . any doc reference and I am still getting error . . I am doing it wrong for sure . Can you Provide any references .. . Comment : Try the elixir getting started guide elixir-lang.org getting-started recursion.html http : elixir-lang.org getting-started recursion.html Comment : @code.prio Please see my update hopefully it will explain your issue a little more clearly . Comment : damn .. . You are a Boss... . yes .. . its all clear for me now .. . I can sleep happily tonight . you rock @Gazler Comment : thanks sir... . @Gazler", "Question : I know its possible to create a struct via User email : blah@blah.com . But if I had a variable params email : blah@blah.com is there a way to create that struct using that variable for eg User params . This gives an error just wondering if you can explode it or some other way .. . Answer : Another way of doing it using Map.merge 2 http : elixir-lang.org docs v1.0 elixir Map.html merge 2 : .. . .. . merge map1 map2 http : elixir-lang.org docs v1.0 elixir Map.html merge 2 .. . .. . Example :", "Question : I ve installed phoenix JSON package through mix phoenix.gen.json V1.Post posts title : string content : string secret : string --no-model but got this error : .. . .. . here is my router.ex code : .. . .. . From the documentation said : .. . .. . Add the resource to the proper scope in web router.ex : .. . .. . resources posts PostController .. . .. . But. . I can t make it work could anybody help me Thank you . Please note that this is for phoenix 1.0 and elixir 1.0 . Comment : I m also very new to this elixir + phoenix ecosystem so please bear with me Comment : It was supposed to just work . Which commands did you pass to mix phoenix.gen.json Have you changed anything afterwards In any case the error seems to be you are calling Shopper.V1.Post on line 13 of your controller and you likely have a model defined Shopper.Post instead . Comment : @Jos Valim I ve added the full command in the question and I didn t change anything . Just trying to run it then got this error . Thanks Comment : @Jos Valim Hmm. . I think it s a bug in the phoenix.gen.json since I defined for no-model but it still needs a model repo Comment : Maybe it is a documentation bug . It will always need a model the data needs to come from somewhere . --no-model is useful when the model already exists and you just want to re-use it . .. . Answer : My question is pointing to wrong problem but I ll keep it that way so it can help people who coming with similar conclusion . The solution is to add a model for V1.Post but running mix phoenix.gen.model will give a compile error which already stated in my question . So I must comment the offending code which is the entire def create conn post post params in V1.Post controller . After that run mix phoenix.gen.model V1.Post posts name : string then uncomment the offending code . To test run mix phoenix.routes which in my case returning .. . .. . Success", "Question : I m stuck since some hours now while trying to figure out how to configure Plug.Static without any other framework Phoenix Sugar .. . just Cowboy Plug and Elixir . I just don t know how to put things together in the Router . 1 . Is the declaration of Plug.Static at the right place Shouldn t it be after plug : dispatch 2 . Do I need to define an additional route .. . 3 . With this declaration : .. . 1 . what is the URL to reach say index.html 2 . where on the file system index.html should be located .. . .. . I m just lost.. . Thanks for the feedback .. . Answer : Everything that Jos Valim said . And here s a most simple example to add to it : .. . .. . This will serve all static files in path to static at the endpoint . Have a look at the docs for more options and a deeper explanation .", "Question : I know in Elixir it s recommended to set the context if you want DRY your tests and to share data between the them http : elixir-lang.org docs v1.0 ex unit ExUnit.Callbacks.html . The problem with this approach is that you can t use context : key directly in a pattern-matching you ll get a compile error cannot invoke remote function Access.get 2 inside match . Because of this you still need an extra step to assign context : key to a variable each time you want to use the context variable for a pattern match not so DRY .. . .. . Another option for sharing data between tests are module attributes http : elixir-lang.org getting-started module-attributes.html . You simply define an @key value and use it in the tests as @key and at compile-time the @key will be replace with the value you specified .. . .. . I was wondering if it s a good idea to use them for this purpose since so far I have not seen others doing it . What do you think .. . Answer : So first thing I would probably switch to Elixir 1.1 or 1.2 . There are map improvements there . You linked to the 1.0 docs which are somewhat dated . Second thing is you can use pattern-matching to grab the variable from the context . Here s an example from the 1.2 ExUnit docs http : elixir-lang.org docs v1.2 ex unit ExUnit.Case.html : .. . .. . The second argument to the test is the context but instead of accessing the pid member you re matching out the pid . Now you can use it just like a normal variable . You can pattern match on it and pin it . It s more than DRY you re declaring exactly what bit of the context you re depending on . It s more concise and more explicit . I really recommend reading the 1.2 docs as they have a ton more examples . Comment : Actually this happened when I was using 1.2 . I had both the 1.0 and 1.2 docs open and I pasted the 1.0 link by accident .", "Question : Good day I have been trying hard to generate a new controller in phoenix with elixir but I m getting this error : .. . .. . but I can manually create the file which I do not know the breakdown of doing it . I m using : .. . .. . Will appreciate any help .. . Answer : First of all did you add Phoenix into your mix.exs If so there s no phoenix.gen.controller task but for generating controllers you have two options- using html for generating controller with HTML view or json for preparing API with JSON . Go check this http : www.phoenixframework.org docs mix-tasks out . I mentioned about two of these : Comment : will read it now . but I m following this tutorial phoenix.thefirehoseproject.com 2.html http : phoenix.thefirehoseproject.com 2.html and I m where I will have to add thequote controller . So i thought that you do it doing the above command @PatNowak Comment : can you do this mix phoenix.gen.html inside the web folder generated at the start of a new project Comment : Yes it suppose to generate the files there because the content of web folder is the part of application you would like to develop . You don t have go there . You can run this command in the root folder of application .", "Question : I am sending emails using the mailgun library in Phoenix . Turns out that when i look at the email in my gmail account it has been stripped off of all the css classes and the link-to external css files . Mailgun suggests using a css inline library http : blog.mailgun.com transactional-html-email-templates .. . .. . Tried search a lot but could not find a css inline library for Phoenix Elixir like the premailer https : github.com premailer premailer gem in Ruby . Does anyone know of a way to achieve this .. . Answer : I have not been able to find anything myself but I believe you can find tools for that online and use them it s not exactly the same but I guess it s better than to inline everything manually . For instance you could use this http : templates.mailchimp.com resources inline-css one . I have not tested it though . Also you can create a package yourself and share it with us :", "Question : I know its possible to create a struct via User email : blah@blah.com . But if I had a variable params email : blah@blah.com is there a way to create that struct using that variable for eg User params . This gives an error just wondering if you can explode it or some other way .. . Answer : You should use the struct 2 http : elixir-lang.org docs stable elixir Kernel.html struct 2 function . From the docs :", "Question : I ve been working on the project and just found this . Basically if I multiple the integer value by the some kind of decimal float the value I receive is not exact . For example 800 1.1 in the html returns 880.0000000000001 instead of just 880 . Any possible explanations to why it happens And is it possible to round the number Edit : 800 + 800 0.1 works fine .. . .. . Using the reply below I ve modified code to Float.round value 2 so the value gets rounded to two decimal places Comment : Any possible explanations to why it happens - What Every Computer Scientist Should Know About Floating-Point Arithmetic https : docs.oracle.com cd E19957-01 806-3568 ncg goldberg.html . .. . Answer : To round a float use round Comment : Thanks I ve never encountered this issue before Comment : Hey again do you know where I can read more about it I m interested in specifying number of digits after comma Comment : that is a bit more complex behaviour for that you may find answers at Float module here - elixir-lang.org docs stable elixir Float.html http : elixir-lang.org docs stable elixir Float.html Comment : Thank you I ll take a look", "Question : I m stuck since some hours now while trying to figure out how to configure Plug.Static without any other framework Phoenix Sugar .. . just Cowboy Plug and Elixir . I just don t know how to put things together in the Router . 1 . Is the declaration of Plug.Static at the right place Shouldn t it be after plug : dispatch 2 . Do I need to define an additional route .. . 3 . With this declaration : .. . 1 . what is the URL to reach say index.html 2 . where on the file system index.html should be located .. . .. . I m just lost.. . Thanks for the feedback .. . Answer : Take a look at Plug.Router docs http : hexdocs.pm plug Plug.Router.html for how : match and : dispatch works . : match will try to find a matching route and : dispatch is going to invoke it . This means Plug.Static in your setup will only be invoked if you have a matching route in your router which doesn t make sense . You want plug Plug.Static before everything . Remember plugs are just functions that are invoked in the order they are declared . Other than that your Plug.Static setup seems ok . Your current configuration will serve assets at pub meaning pub index.html will look for priv static index.html in your app . More info here : http : hexdocs.pm plug Plug.Static.html", "Question : So I m trying to pass multiple parameters in a URL to plug . This is the URL I m using for testing : .. . .. . And this is the code : .. . .. . If I pass just one argument either uid or pwd it matches fine . If I remove the at the front of the query-string it fails--throws an exception . I also tried this : .. . .. . Also didn t work . So two questions : .. . .. . 1 . Is that the right way to pass multiple parameters in a URL 2 . Is there some trick to get plug to see both parameters Any thoughts or insights would be welcome--even a suggestion of a better way to do this . Elixir v0.15.1 and Plug v0.5.1 .. . .. . EDIT : .. . .. . Adding a stacktrace per Jose s comment : .. . .. . EDIT 2 : I had jotted down the wrong URL above that s now corrected . Also to add to the question if I make the URL this : http : localhost : 4000 uid ToddFlanders pwd MyTestPword the code jumps down to the match do clause Comment : What failure are you getting Can you please post the stacktrace And you definitely need to call fetch params before . Comment : I ve added the stacktrace . I hesitated to add it before because I couldn t quite figure out how to format it . Comment : Ah I see what is wrong . : args is not going to contain the query-string . It is going to contain just the path . If you want to access the query-string parameters you need to do exactly as sasa proposed . Which is basically call fetch params conn and access it as conn.params . .. . Answer : I m not versatile with Plug but for a demo code I used fetch params 1 http : elixir-lang.org docs plug Plug.Conn.html fetch params 1 and then conn.params foo conn.params bar and so on and this definitely worked . Update : since Plug 0.12.0 fetch query params 2 http : hexdocs.pm plug Plug.Conn.html fetch query params 2 should be used Comment : It s a good suggestion but it still doesn t seem to be working . Could you point me to your demo code Comment : I don t have it online but here s a sketch : gist.github.com sasa1977 99cc0526f5b4dd903e21 https : gist.github.com sasa1977 99cc0526f5b4dd903e21 Comment : The docs link in this answer now leads to a 404 and I m getting UndefinedFunctionError undefined function Plug.Conn.fetch params 1 . Was this function replaced by something else P.S . I m enjoying your book Comment : fetch query params looks like the actual function name . Comment : @CoderDennis Yes this happened at 0.12.0 see github.com elixir-lang plug blob https : github.com elixir-lang plug blob 263f5ed01889611df8ecc25260e02091d095e9f3 CHANGELOG.md v0120 . I ll update the answer thanks for pointing this out . P.S . glad you like the book : -" ] }
[ "yes-answer-long", "yes-answer-short" ]
web-applications
UNK_RELATION
opensolaris@operating-system@56
opensolaris -- opensolaris was an open-source computer @placeholder based on solaris created by sun microsystems .
{ "confidence": [ 83.95317077636719, 51.094383239746094, 46.595008850097656, 46.02694320678711, 45.73744583129883, 45.5614128112793, 44.995643615722656, 43.64434051513672, 43.04991149902344, 42.30646896362305, 42.2617301940918, 42.2617301940918, 41.26213836669922, 40.82379913330078, 40.69690704345703, 40.56608581542969, 40.56608581542969, 40.56608581542969, 40.56608581542969, 38.176902770996094, 38.15923309326172, 38.09296417236328, 38.09296417236328, 37.20159912109375, 37.20159912109375, 37.20159912109375, 37.20159912109375, 37.20159912109375, 37.20159912109375, 37.20159912109375, 37.117557525634766, 35.82866668701172, 35.76979064941406, 34.36530303955078, 34.36530303955078, 32.85240173339844, 32.66966247558594, 32.66966247558594, 32.66966247558594, 32.66966247558594, 32.577880859375, 31.903034210205078, 31.591659545898438, 31.212528228759766, 30.324275970458984, 29.896015167236328, 29.896015167236328, 29.896015167236328, 29.896015167236328, 29.896015167236328, 28.485076904296875, 28.485076904296875, 28.485076904296875, 27.862957000732422, 26.789432525634766, 26.625381469726562, 26.523723602294922, 26.020221710205078, 25.551799774169922, 24.631145477294922, 24.14684295654297, 23.712738037109375, 23.619346618652344, 23.619346618652344, 23.619346618652344, 22.935501098632812, 22.74195098876953, 22.65876007080078, 22.494447708129883, 22.017093658447266, 22.017093658447266, 22.017093658447266, 21.84835433959961, 21.81060218811035, 21.40342140197754, 20.90812873840332, 20.892192840576172, 20.773056030273438, 20.773056030273438, 20.773056030273438, 20.773056030273438, 20.773056030273438, 20.773056030273438, 20.616025924682617, 20.31359100341797, 20.115005493164062, 20.115005493164062, 20.115005493164062, 20.055198669433594, 19.943510055541992, 19.648155212402344, 19.648155212402344, 19.648155212402344, 19.648155212402344, 19.57967185974121, 19.543970108032227, 19.543970108032227, 19.543970108032227, 19.53907012939453, 19.398300170898438 ], "content": [ "According to the wikipedia article http : en.wikipedia.org wiki OpenSolaris OpenSolaris was on open-source computer operating system.. . and in 2010 Oracle decided to discontinue .", "There are a number of illumos opensolaris based distros .", "No OpenSolaris no longer exists .", "filemerge ld.so.1 : filemerge : fatal : libtt.so.2 : open failed : No such file or directory Killed .. . .. . TeamWare is no longer a supported source management system but it s is still widely used in the OpenSolaris project and within Sun Microsystems .", "OpenSolaris started after the Solaris 10 release using the source from the development branch which became Solaris 11 .", "-bash-4.0 cat etc release OpenSolaris Development snv 134 X86 Copyright 2010 Sun Microsystems Inc . All Rights Reserved .", "I was able to find the OpenSolaris source as there are forks e.g Schillix open Indiana .", "The final release of the OpenSolaris distro was 5 years ago OpenSolaris 2009.06 and bug fixes security fixes are no longer available for it .", "If not is there any way to do it in OpenSolaris at all", "I am trying to locate the source code of either Solaris 10 or its kernel as it used to be part of the OpenSolaris project .", "So my question is .. . does the opensolaris still exist", "I like openindiana because it is the closest to opensolaris .", "Yes it ll install run on OpenSolaris-based distributions as well .", "Given that OpenIndiana is a fork of OpenSolaris is it fair to say that writing device drivers for OpenIndiana should not be different from writing it on OpenSolaris", "Moreover there is no more opensolaris official http : opensolaris.org site as said here http : de.wikipedia.org wiki OpenSolaris The http : opensolaris.org redirects to https : solaris.java.net only .", "Afaik there currently are no opensolaris releases due to the lack of a maintainer .", "What is the equivalent of wheel group in OpenSolaris OpenIndiana", "I want to do the same in OpenSolaris Indiana .", "Is there anything special to OpenSolaris that I am not aware of", "I could find the wiki page which is telling about opensolaris os http : en.wikipedia.org wiki OpenSolaris is containing official site link http : blog.illumos.org about-illumos-2 which does not contain opensolaris download thread etc .", "I need to port a PCIe Linux driver to Oracle Solaris 11.2 previously OpenSolaris .", "I am currently developing on OpenSolaris 2009-06 .", "opensolaris 2009.06 and boost-1.4.1 seem to work well .", "I want to test a lazarus project running in a opensolaris box .", "when I am doing . configure in opensolaris in an attempt to install software .", "@Aron I ll try to install OpenSolaris SPARC on qemu next week .", "Both OpenSolaris and OpenIndiana only maintain process IDs in proc .", "After upgrading from OpenSolaris to OpenIndiana GNOME fails on start .", "We re setting up an OpenSolaris server on Amazon s EC2 service .", "How do I get the TeamWare filemerge GUI to run on OpenSolaris", "I could see links where opensolaris can be downloaded which are not related to oracle official site but I cannot be sure the links provide the original opensolaris os", "I need to measure performance counters per NFS mount I have on my Nexenta machine Based on OpenSolaris .", "UPDATED : Free Pascal 2.4.2 has opensolaris packages : .. . .. . ftp : ftp.hu.freepascal.org pub fpc dist 2.4.2 i386-solaris .. . ftp : ftp.hu.freepascal.org pub fpc dist 2.4.2 sparc-solaris .. . .. . Note that these are considered experimental .", "anyone can tell me how am i supposed to have a working jdk1.6 with javac on opensolaris", "Which you use depends on what you want need from an OS but there is no single distro that is an exact match for what OpenSolaris was .", "hi is there a way for me to just update my opensolaris or just download a more newer version I downloaded opensolaris from its website.. . so that when I do pkg search javac and then pfexec pkg install jdk it will just work as you suggested", "I see staff group having the same gid in OpenSolaris as wheel in Linux for example Fedora or CentOS .", "I could not tag-it with SmartOS which is the Illumos fork of OpenSolaris which I am using .", "You can ask the OpenSolaris on Amazon EC2 questions at https : www2.sun.de dct forms reg us 0505 351 0.jsp", "Update : the above packages were the names used in the OpenSolaris 2009.06 release when the above was written .", "In the OpenSolaris builds 134 and later including all Solaris 11.x releases and community forks like OpenIndiana the package names are now library motif and library tooltalk under the new IPS package naming scheme .", "After the Oracle acquisition OpenSolaris forked - Oracle continued developing the code and released new versions under a closed-source license as Solaris 11 http : www.oracle.com solaris while the illumos community http : www.illumos.org took the open-source code base and developed it further themselves generating a variety of different distros http : wiki.illumos.org display illumos Distributions .", "I heard it is no longer developed by oracle But I am interested in the latest opensolaris release it should be somewhere anyway though it is old or how you call it.. .", "I installed opensolaris I saw that it has usr jdk jdk1.6 however it had no bin javac only java .. . .. . my default java -version is jdk1.6 just after opensolaris installation however as I have no javac I downloaded jdk1.6 for solaris and after executing the jdk1.6xx.sh i did cd to the folder of jdk and then inside bin directory I ran javac however its giving me NoClassDefFoundError java lang Object .", "Solaris 10 kernel source was never released as open-source .", "Linux apparently supplies a number of ways to go about doing this clock gettime CLOCK THREAD CPUTIME ID .. . pthread getcpuclockid getrusage RUSAGE THREAD .. . but none of these seem to be supported under OpenSolaris 2009.06 .", "Sounds like you found an answer for a completely different OS that doesn t apply to opensolaris lib6 sounds like an old Linux release .", "I have an OpenSolaris VM on VirtualBox but I don t know of any SPARC VM which I could use to compile and test on .", "I am attempting to compile gcc 4.4.0 on opensolaris 2009.6 .. . .. . Currently in the box which is a AMD 64bit machine I have the gcc 3.4.6 installed .", "You need to install the ToolTalk Motif packages from the package repository : .. . .. . available if you re running OpenSolaris 2009.06 development build 110 or later", "OpenSolaris includes just the Java Runtime JRE out of the box - developer tools like compilers for C C++ Java don t fit on the LiveCD so are installed from the package repository .", "Install JDK on OpenSolaris or OpenIndiana is quite simple you need to use .. . .. . I ve a post in Spanish with all the process .. . .. . http : sparcki.blogspot.com 2010 05 instalar-java-jdk-en-opensolaris.html .. . .. . Urko", "So I am asking is there some safe download center s for opensolaris which may be still be sponsored by oracle or oracle s partners or something this way so I can be sure it is the original os distribution", "Are there any Solaris 10 - based", "I am testing our server-application written Java on different operating systems and thought that OpenSolaris 2008.11 would be the least troublesome due to the nice Java integration .", "But Solaris 11 etc it is not-free for commercial use : P So the illumos opensolaris is more handy as I may get it correct me if I am wrong here pls Well actually I am not really familiar with illumos distros but I may say I am interested in OS with which I can use as windows-xp pro for example : S Can you advise what unix based os should I look for", "Source Code for Open Source Software Components of Oracle Solaris can be found below : http : www.oracle.com technetwork opensource systems-solaris-1562786.html .. . .. . However I haven t checked yet if it contains kernel source code .", "I am writing a bash script for an Open Solaris 11 machine .", "Solaris 10 kernel source was available for purchase from Sun under proprietary license terms but I believe Oracle is no longer selling that either .", "Why not just use the official Solaris", "How to run Solaris 11 or Cloud Solaris 11 Android Java", "same thing happened to me on a regular solaris installation .", "Which version of Solaris is this exactly", "Is there anyway to do it in Solaris", "i meant in solaris-Ux", "You know that Solaris is Unix right", "The work to separate the parts of Solaris that could be open sourced or had to be kept closed due to third party rights was never done for Solaris 10 .", "Sun created several versions of Java that are targeted at different environments : JavaSE JavaEE JavaME .", "What can be used for these in Solaris", "Or i can use the same Solaris 11 java .", "Don t have my solaris box at hand but try this :", "Solaris is an amalgam of previous flavors of UNIX like BSD .", "I try to install fpc on open solaris doing this : .. . .. . As described here : http : wiki.lazarus.freepascal.org Getting Lazarus Building and installing Free Pascal in UNIXe .. . .. . However I get this error :", "It also evolved depending on the Solaris releases .", "I m porting a Linux driver to Solaris 11.2 basically I re-implement Linux specific functionality on Solaris .", "However I don t find that Solaris ddi intr enable or ddi intr block enable do the same i.e pin-based interrupts INTx always remain on .", "Douglas solution works fine for me on Solaris .", "Also I think that only Solaris SPARC is supported in the fixes branch .", "I ended up getting polarhome accounts for Solaris SPARC and AIX .", "I have installed Nexanta Solaris with VMWare but it boots to command-line .", "This is the script i was trying which works in Solaris 11 but not in Android .", "I have installed solaris-10 in virtual box 4.1.2 .", "You should use isainfo -v for proc cpuinfo on Solaris .", "I ll say that I ve yet to see an open-source tool that is as good as Oracle s Studio collect analyzer tools at performance analysis of multithreaded large-scale applications especially on Solaris .", "One main difference between Solaris and Linux procfs implementations is Linux is often providing plain text data where Solaris is exposing binary structures .", "While at least Solaris SPARC and Solaris i386 are supported in svn-trunk I m not sure about x86-64 we currently don t offer any binaries because we have no real maintainers for these platforms .", "On Most Linux Distributions i was able to list all tcp connections by reading proc net tcp but this Doesn t exists on solaris is there a file that i can read tcp connections from on Solaris 11", "I would like to have the same or similar mechanism and behaviour on Solaris but seems that on Solaris it works slightly different DDI routine ddi create minor node requires a node type indicating audio block net etc .", "@jillagre are you aware of any forums blogs specialized on Solaris OS and Solaris development topics", "SUN is working on the SUNWgnu-nano package to include this in the next release .", "On Solaris you should use usr xpg4 bin awk .", "Unfortunately I m still not at that level of knowledge of Solaris to easily browse such a complex code .", "There has not been such issue with Solaris where procfs is strictly restricted to process data .", "So what Solaris-specific methods can be used to have these done in the driver", "I can reformat my computer and install whatever you suggest", "usr openwin bin xclock on my Solaris .. . 7 .", "I m at the beginning of implementing a first Solaris device-driver .", "Both Solaris Studio and gcc can be used .", "Based on my research I think norunpath is a Sun specific flag that GCC does not support however I am not sure how or even if I can remove it .", "qemu offers SPARC computer simulation ." ] }
{ "confidence": [ 91.43350219726562, 87.82815551757812, 79.76049041748047, 74.22321319580078, 69.20266723632812, 60.1400260925293, 58.530738830566406, 55.57752990722656, 54.85835647583008, 54.511417388916016, 53.6761360168457, 53.533809661865234, 51.468162536621094, 49.71603775024414, 45.71890640258789, 43.97489547729492, 43.97489547729492, 42.78818130493164, 42.78818130493164, 41.908470153808594 ], "content": [ "Question : I could find the wiki page which is telling about opensolaris os http : en.wikipedia.org wiki OpenSolaris is containing official site link http : blog.illumos.org about-illumos-2 which does not contain opensolaris download thread etc . Moreover there is no more opensolaris official http : opensolaris.org site as said here http : de.wikipedia.org wiki OpenSolaris The http : opensolaris.org redirects to https : solaris.java.net only . So my question is .. . does the opensolaris still exist Where to download the latest version from a safe download center Comment : According to the wikipedia article http : en.wikipedia.org wiki OpenSolaris OpenSolaris was on open-source computer operating system.. . and in 2010 Oracle decided to discontinue . Some folks have forked it under the name OpenIndiana http : en.wikipedia.org wiki OpenIndiana . Comment : I heard it is no longer developed by oracle But I am interested in the latest opensolaris release it should be somewhere anyway though it is old or how you call it.. . I could see links where opensolaris can be downloaded which are not related to oracle official site but I cannot be sure the links provide the original opensolaris os So I am asking is there some safe download center s for opensolaris which may be still be sponsored by oracle or oracle s partners or something this way so I can be sure it is the original os distribution Comment : Why not just use the official Solaris You are free to use it for the purpose of developing testing prototyping and demonstrating your applications otherwise you ll have to pay . .. . Answer : There are a number of illumos opensolaris based distros . omnios opensxce openindiana . I like openindiana because it is the closest to opensolaris . I am not sure how things have changed but i use it now cleanly with nvidia . Comment : sounds good . thanks : so you use illumos could you tell are all the mentioned distros support nVidia Comment : I use openindiana but the code base is very similar for all wiki.openindiana.org oi Graphics+Adapters http : wiki.openindiana.org oi Graphics+Adapters", "Question : I could find the wiki page which is telling about opensolaris os http : en.wikipedia.org wiki OpenSolaris is containing official site link http : blog.illumos.org about-illumos-2 which does not contain opensolaris download thread etc . Moreover there is no more opensolaris official http : opensolaris.org site as said here http : de.wikipedia.org wiki OpenSolaris The http : opensolaris.org redirects to https : solaris.java.net only . So my question is .. . does the opensolaris still exist Where to download the latest version from a safe download center Comment : According to the wikipedia article http : en.wikipedia.org wiki OpenSolaris OpenSolaris was on open-source computer operating system.. . and in 2010 Oracle decided to discontinue . Some folks have forked it under the name OpenIndiana http : en.wikipedia.org wiki OpenIndiana . Comment : I heard it is no longer developed by oracle But I am interested in the latest opensolaris release it should be somewhere anyway though it is old or how you call it.. . I could see links where opensolaris can be downloaded which are not related to oracle official site but I cannot be sure the links provide the original opensolaris os So I am asking is there some safe download center s for opensolaris which may be still be sponsored by oracle or oracle s partners or something this way so I can be sure it is the original os distribution Comment : Why not just use the official Solaris You are free to use it for the purpose of developing testing prototyping and demonstrating your applications otherwise you ll have to pay . .. . Answer : No OpenSolaris no longer exists . The final release of the OpenSolaris distro was 5 years ago OpenSolaris 2009.06 and bug fixes security fixes are no longer available for it . After the Oracle acquisition OpenSolaris forked - Oracle continued developing the code and released new versions under a closed-source license as Solaris 11 http : www.oracle.com solaris while the illumos community http : www.illumos.org took the open-source code base and developed it further themselves generating a variety of different distros http : wiki.illumos.org display illumos Distributions . Which you use depends on what you want need from an OS but there is no single distro that is an exact match for what OpenSolaris was . Comment : But Solaris 11 etc it is not-free for commercial use : P So the illumos opensolaris is more handy as I may get it correct me if I am wrong here pls Well actually I am not really familiar with illumos distros but I may say I am interested in OS with which I can use as windows-xp pro for example : S Can you advise what unix based os should I look for Comment : Sorry that doesn t seem to really help - if use as windows-xp pro means you can use ten year old hardware and run old windows apps then I don t know of any current free Unix-like OS to do that . Comment : As I can remember the latest solaris was 2009.06 or so So it is 5 years : I am not about to run windows apps but I mean OS functionality.. . Something simple as a internet ppp support b latest jre support c 64-bit support d nVidia support etc a common client machine stuff btw I heard linux has problems with nVidia so I am interested to know does solaris has the same nVidia problems", "Question : How do I get the TeamWare filemerge GUI to run on OpenSolaris filemerge ld.so.1 : filemerge : fatal : libtt.so.2 : open failed : No such file or directory Killed .. . .. . TeamWare is no longer a supported source management system but it s is still widely used in the OpenSolaris project and within Sun Microsystems . .. . Answer : You need to install the ToolTalk Motif packages from the package repository : .. . .. . available if you re running OpenSolaris 2009.06 development build 110 or later Comment : Update : the above packages were the names used in the OpenSolaris 2009.06 release when the above was written . In the OpenSolaris builds 134 and later including all Solaris 11.x releases and community forks like OpenIndiana the package names are now library motif and library tooltalk under the new IPS package naming scheme .", "Question : I am trying to locate the source code of either Solaris 10 or its kernel as it used to be part of the OpenSolaris project . Do you have any ideas I was able to find the OpenSolaris source as there are forks e.g Schillix open Indiana . Are there any Solaris 10 - based I basically want to modify the kernel . Thanks a lot .. . Answer : Solaris 10 kernel source was never released as open-source . OpenSolaris started after the Solaris 10 release using the source from the development branch which became Solaris 11 . The work to separate the parts of Solaris that could be open sourced or had to be kept closed due to third party rights was never done for Solaris 10 . Solaris 10 kernel source was available for purchase from Sun under proprietary license terms but I believe Oracle is no longer selling that either .", "Question : I am trying to locate the source code of either Solaris 10 or its kernel as it used to be part of the OpenSolaris project . Do you have any ideas I was able to find the OpenSolaris source as there are forks e.g Schillix open Indiana . Are there any Solaris 10 - based I basically want to modify the kernel . Thanks a lot .. . Answer : Source Code for Open Source Software Components of Oracle Solaris can be found below : http : www.oracle.com technetwork opensource systems-solaris-1562786.html .. . .. . However I haven t checked yet if it contains kernel source code . Comment : Those releases contain the source code for software written outside Oracle which Oracle is required to publish under the terms of licenses like GPL or MPL . It does not contain the sources Sun Oracle wrote on their own and are not required to release like most of the kernel .", "Question : null .. . Answer : when im trying to do trace getenv function i got : .. . .. . ldd from myapp : .. . .. . Why is that happening Is there any solution which can make libc functions able to trace via dtrace Best regards Comment : Which version of Solaris is this exactly For me S10 Update 6 8 10 the command dtrace -n pid target : libc : getenv : entry ustack .. . works - no matter whether I specify nothing libc libc.so or libc.so.1 it fails if I give a nonexistant lib name . Also how have you compiled your app Comment : -bash-4.0 cat etc release OpenSolaris Development snv 134 X86 Copyright 2010 Sun Microsystems Inc . All Rights Reserved . Use is subject to license terms . Assembled 01 March 2010 -bash-4.0 uname -a SunOS appdev.srv 5.11 snv 134 i86pc i386 i86pc", "Question : I installed opensolaris I saw that it has usr jdk jdk1.6 however it had no bin javac only java .. . .. . my default java -version is jdk1.6 just after opensolaris installation however as I have no javac I downloaded jdk1.6 for solaris and after executing the jdk1.6xx.sh i did cd to the folder of jdk and then inside bin directory I ran javac however its giving me NoClassDefFoundError java lang Object . same thing happened to me on a regular solaris installation . anyone can tell me how am i supposed to have a working jdk1.6 with javac on opensolaris Thanks .. . Answer : Install JDK on OpenSolaris or OpenIndiana is quite simple you need to use .. . .. . I ve a post in Spanish with all the process .. . .. . http : sparcki.blogspot.com 2010 05 instalar-java-jdk-en-opensolaris.html .. . .. . Urko", "Question : I installed opensolaris I saw that it has usr jdk jdk1.6 however it had no bin javac only java .. . .. . my default java -version is jdk1.6 just after opensolaris installation however as I have no javac I downloaded jdk1.6 for solaris and after executing the jdk1.6xx.sh i did cd to the folder of jdk and then inside bin directory I ran javac however its giving me NoClassDefFoundError java lang Object . same thing happened to me on a regular solaris installation . anyone can tell me how am i supposed to have a working jdk1.6 with javac on opensolaris Thanks .. . Answer : OpenSolaris includes just the Java Runtime JRE out of the box - developer tools like compilers for C C++ Java don t fit on the LiveCD so are installed from the package repository . pkg search javac will show the packages available with the javac command - if you re using the latest development builds it will be in the developer java jdk package or jdk for short so you could install with pfexec pkg install jdk . On older builds like the 2009.06 stable release the package name will be something like SUNWjdk instead . Comment : pkg search javac gives me stuff like this : basename link usr bin javac pkg : SUNWj6dev@0.5.11-0.91 Comment : when trying to install with pkg intall jdk or SUNWjdk it says that it cannot find them try relatxing the pattern also when I did pkg search javac it wrote : basename link usr bin javac pkg : SUNWj6dev@0.5.11-0.91 however when I went to the base directories where I have extracted the jdk1.6 tar.Z and tried to do pkgadd -d . SUNWj6dvx WUNWj6dmx SNWj6rtx then its saying Installation of SUNWj6dvx was successful however javac results with no such command again can you help please Comment : Since pkg search identified SUNWj6dev as the package name the command would be pkg install SUNWj6dev the pkg : is optional . Also 0.91 is a very very old developer build it was part way between the 2008.05 and 2008.11 stable releases - seems strange to be using if you just installed it . Comment : hi is there a way for me to just update my opensolaris or just download a more newer version I downloaded opensolaris from its website.. . so that when I do pkg search javac and then pfexec pkg install jdk it will just work as you suggested I can reformat my computer and install whatever you suggest Comment : pkg image-update should upgrade you to a newer version - there s lots of details on opensolaris.org http : opensolaris.org", "Question : I want to test a lazarus project running in a opensolaris box . I will need to install lazarus+freepascal + indy + remobjects librarys and run everything headless . I have no clue in how make this happened . As far as I know at looking the docs everything is done with the GUI . Comment : Reply updated answer with new developments .. . Answer : Afaik there currently are no opensolaris releases due to the lack of a maintainer . Which means : DIY . There are some minor commits from time to time from Pierre though so it might be close to a general working state . UPDATED : Free Pascal 2.4.2 has opensolaris packages : .. . .. . ftp : ftp.hu.freepascal.org pub fpc dist 2.4.2 i386-solaris .. . ftp : ftp.hu.freepascal.org pub fpc dist 2.4.2 sparc-solaris .. . .. . Note that these are considered experimental . We hope they will turn into a full platform over time .", "Question : What is the equivalent of wheel group in OpenSolaris OpenIndiana I used to add a user in the wheel group and permit the group to execute commands via sudo without password asked . I want to do the same in OpenSolaris Indiana . I see staff group having the same gid in OpenSolaris as wheel in Linux for example Fedora or CentOS . .. . Answer : There is no wheel group or equivalent under these OSes although nothing forbids to create one and configure sudo to allow passwordless root commands . A more Solaris style alternative might be to grant these users the Primary Administrator profile and or grant them the root role . Not sure you will avoid a password prompt though . Comment : jillagre thanks .", "Question : I installed opensolaris I saw that it has usr jdk jdk1.6 however it had no bin javac only java .. . .. . my default java -version is jdk1.6 just after opensolaris installation however as I have no javac I downloaded jdk1.6 for solaris and after executing the jdk1.6xx.sh i did cd to the folder of jdk and then inside bin directory I ran javac however its giving me NoClassDefFoundError java lang Object . same thing happened to me on a regular solaris installation . anyone can tell me how am i supposed to have a working jdk1.6 with javac on opensolaris Thanks .. . Answer : What is the value of your JAVA HOME environment variable And did you remember to append that to your PATH Comment : i m not sure because you see I don t have the jdk installed so i have got no javac so i don t know where and if i have somewhere to point my JAVA HOME to.. .", "Question : I m working on a cross-platform application for which I would like to include Solaris SPARC support but I no longer have access to a server . I have an OpenSolaris VM on VirtualBox but I don t know of any SPARC VM which I could use to compile and test on . Did I miss something Otherwise do you know of solaris SPARC shell account services with the gcc toolchain preferably free ones Comment : qemu offers SPARC computer simulation . Comment : @osgx - I m researching the same thing and was looking at qemu but everything I ve seen implies that it s not up to running a full Solaris SPARC install . Is this something you ve had luck with Comment : @osgx thanks for you reply . @Aron I ll try to install OpenSolaris SPARC on qemu next week . I ll let you know how it went . .. . Answer : You can get a free SPARC emulator from http : www.stromasys.ch virtualization-solutions virtual-sparcstation . Comment : Link is now stromasys.com products charon-freeware http : www.stromasys.com products charon-freeware charon-spkss20-freeware-download", "Question : I have a small daemon that I m writing in C and I need a way to get the current CPU time on a thread . Linux apparently supplies a number of ways to go about doing this clock gettime CLOCK THREAD CPUTIME ID .. . pthread getcpuclockid getrusage RUSAGE THREAD .. . but none of these seem to be supported under OpenSolaris 2009.06 . Is there a cross-platform friendly way to get the current CPU time for a thread If not is there any way to do it in OpenSolaris at all At this point I m even willing to put in a bunch of ugly compiler-directives to make this work . .. . Answer : According to Thread Priority on the Solaris Platform http : java.sun.com j2se 1.5.0 docs guide vm thread-priorities.html Solaris 9 and above default to a one-to-one correspondence between threads and LWPs Light-Weight Processes http : en.wikipedia.org wiki Light-weight process . Therefore according to getrusage s manpage http : docs.oracle.com cd E23824 01 html 821-1465 getrusage-3c.html scrolltoc you should be able to call getrusage RUSAGE LWP .. . .", "Question : I m working on a cross-platform application for which I would like to include Solaris SPARC support but I no longer have access to a server . I have an OpenSolaris VM on VirtualBox but I don t know of any SPARC VM which I could use to compile and test on . Did I miss something Otherwise do you know of solaris SPARC shell account services with the gcc toolchain preferably free ones Comment : qemu offers SPARC computer simulation . Comment : @osgx - I m researching the same thing and was looking at qemu but everything I ve seen implies that it s not up to running a full Solaris SPARC install . Is this something you ve had luck with Comment : @osgx thanks for you reply . @Aron I ll try to install OpenSolaris SPARC on qemu next week . I ll let you know how it went . .. . Answer : That question is similar to this one http : stackoverflow.com questions 160800 sparc-assembly . I haven t seen anything about Solaris running on qemu otherwise you can get SPARC hosting for 10 at polarhome http : www.polarhome.com . Comment : I ll check polarhome out if I don t have luck with qemu . thanks Comment : I ended up getting polarhome accounts for Solaris SPARC and AIX . It took w while to get my application processed but the service lived up to my expectations . thanks", "Question : I am testing our server-application written Java on different operating systems and thought that OpenSolaris 2008.11 would be the least troublesome due to the nice Java integration . Turns out I was wrong as I end up with a UnknownHostException .. . .. . The output is : .. . .. . However nslookup desvearth01 returns the correct IP address and nslookup localhost returns 127.0.0.1 as expected . Also the same code works perfectly on FreeBSD . Is there anything special to OpenSolaris that I am not aware of Any hints appreciated thanks . .. . Answer : Host lookups on Solaris uses etc nsswitch.conf so depending on what the hosts : line says it determines if etc hosts NIS DNS and or LDAP should be consulted . If you only use hosts and DNS you should have this in etc nsswitch.conf : .. . .. . The reason nslookup desvearth01 works is because the nslookup command directly consults etc resolv.conf . If you want to do a better command-line test use the command : Comment : Very helpful This took me days to understand .", "Question : We re setting up an OpenSolaris server on Amazon s EC2 service . However vi vim doesn t work properly and pkg doesn t have nano pico . Is there any other text-editor maybe Comment : Not to dodge the question but what about vi isn t working Comment : erickson : picocontainer is the wrong tag . pico was the right one . .. . Answer : You can ask the OpenSolaris on Amazon EC2 questions at https : www2.sun.de dct forms reg us 0505 351 0.jsp", "Question : when I am doing . configure in opensolaris in an attempt to install software . I ve got the following error : .. . .. . Then I check up on the net and find its due to a missing module call gcc-lib6-dev . But how can I install it .. . Answer : Sounds like you found an answer for a completely different OS that doesn t apply to opensolaris lib6 sounds like an old Linux release . Look in the generated config.log for more detailed error messages that give better information as to the actual problem .", "Question : I am testing our server-application written Java on different operating systems and thought that OpenSolaris 2008.11 would be the least troublesome due to the nice Java integration . Turns out I was wrong as I end up with a UnknownHostException .. . .. . The output is : .. . .. . However nslookup desvearth01 returns the correct IP address and nslookup localhost returns 127.0.0.1 as expected . Also the same code works perfectly on FreeBSD . Is there anything special to OpenSolaris that I am not aware of Any hints appreciated thanks . .. . Answer : Checkout etc hostname then put your hostname to hosts-file .", "Question : I am testing our server-application written Java on different operating systems and thought that OpenSolaris 2008.11 would be the least troublesome due to the nice Java integration . Turns out I was wrong as I end up with a UnknownHostException .. . .. . The output is : .. . .. . However nslookup desvearth01 returns the correct IP address and nslookup localhost returns 127.0.0.1 as expected . Also the same code works perfectly on FreeBSD . Is there anything special to OpenSolaris that I am not aware of Any hints appreciated thanks . .. . Answer : This errors shows up when I changed the workstation name and tried start Glassfish 2 . You also must rename the entry at etc hosts something like this :", "Question : I am currently developing on OpenSolaris 2009-06 . The Boost : : MPL Documentation seems to suggest that sun compilers are not supported http : www.boost.org doc libs 1 5F41 5F0 libs mpl doc tutorial portability.htm the document was last updated in 2004 . Boost s top level documentation seems to suggest that the sun compilers 5.10 onwards are supported -- I guess this is a general level of support or does this include MPL . Does anyone have any details on the state of the C++ conformance of the sun 5.10 compilers I could always compile using GCC . Comment : Boost : : MPL seems to have an extensive set of unit tests you can try to run them under your compiler . This should give you the most recent status of support regardless of any documentation . Comment : What liori said but if you are looking to make sure that your environment is working as expected you would have nothing to compare it to . You should find some documentation about what is to be expected then also run the unit tests and see if they are what the document projected . Comment : Thanks guys I have done some prototyping with the MPL libraries and they seem to work fine with the few constructs I tried . However the code ends up looking nasty . So I think i ll move into generative-programming probably using Lua and targeting the C++ with STL and possibly the simple BOOST libraries . .. . Answer : I guess since an exact answer has not been provided I must post one myself . opensolaris 2009.06 and boost-1.4.1 seem to work well . The . bjam picks the right switches and boost : : mpl seems to work well with the sun compiler present . So as far as I can tell the mpl documentation on compiler support is quite outdated ." ] }
[ "yes-answer-long", "yes-answer-short" ]
operating-system
UNK_RELATION
mpdf@cjk@89
mpdf -- mpdf is a php library for generating pdf files from html with unicode utf-8 and @placeholder support .
{ "confidence": [ 55.561180114746094, 55.19904708862305, 54.164974212646484, 53.69409942626953, 51.7656135559082, 50.003379821777344, 48.99990463256836, 48.35879135131836, 48.317501068115234, 48.231666564941406, 48.231666564941406, 48.231666564941406, 48.231666564941406, 46.587074279785156, 46.51945495605469, 46.51945495605469, 46.434539794921875, 46.181915283203125, 45.88230514526367, 45.5421028137207, 45.061439514160156, 44.98855972290039, 44.487388610839844, 44.35459518432617, 44.16656494140625, 44.024574279785156, 43.799800872802734, 43.799800872802734, 43.799800872802734, 43.680931091308594, 43.48003387451172, 43.44530487060547, 43.21504211425781, 43.05947494506836, 42.43608474731445, 42.41900634765625, 42.23423385620117, 42.163291931152344, 42.15521240234375, 42.02515411376953, 41.65065383911133, 41.57045364379883, 41.57045364379883, 41.57045364379883, 41.372528076171875, 41.06418228149414, 41.06418228149414, 41.05964660644531, 40.78105163574219, 40.78105163574219, 40.774417877197266, 40.721195220947266, 40.518699645996094, 40.47942352294922, 40.437705993652344, 40.437705993652344, 40.437705993652344, 40.437705993652344, 40.437705993652344, 40.437705993652344, 40.437705993652344, 40.365108489990234, 40.365108489990234, 39.775672912597656, 39.59442138671875, 39.4278564453125, 39.420692443847656, 39.346675872802734, 39.274078369140625, 39.274078369140625, 38.796234130859375, 38.65216827392578, 38.557186126708984, 38.37856674194336, 38.32402420043945, 38.13108444213867, 38.13108444213867, 38.13108444213867, 37.949832916259766, 37.865257263183594, 37.60740661621094, 37.466156005859375, 37.04005432128906, 36.99635696411133, 36.9348030090332, 36.67790222167969, 36.651222229003906, 36.651222229003906, 36.651222229003906, 36.651222229003906, 36.5870475769043, 36.23615646362305, 36.220664978027344, 36.220664978027344, 36.220664978027344, 36.220664978027344, 36.220664978027344, 36.220664978027344, 36.220664978027344, 35.58687210083008 ], "content": [ "Try .. . .. . html mb convert encoding html UTF-8 .. . .. . Before .. . .. . mpdf- WriteHTML html", "I m using the mPDF library http : www.mpdf1.com mpdf to generate PDF docs directly from HTML output .", "- .. . Mpdf new mPDF utf-8 A4 15 15 0 18 .. . .. . Please help .", "MPDF http : www.binarytides.com create-pdf-from-html-using-mpdf-in-php .. . .. . please i am already embeded mpdf lib in a website .", "I am using mPdf for pdf-generation in php .", "After you write your content : .. . mpdf- WriteHTML html .. . .. . page count mpdf - page .. . .. . mpdf- Output", "I m using Mpdf https : mpdf.github.io with codeigniter for generating pdf file .", "I m using the mPDF https : github.com mpdf mpdf libary to turn HTML pages into PDFs .", "The doc of the latest version of mPDF on github https : github.com mpdf mpdf suggest the only way to install it is by using composer .", "I am making a HTML document to convert to PDF using the mPDF tool .", "Here I am in a problem while converting HTML to PDF using mPDF .", "I d installed the MPDF utility in order to convert HTML CSS to PDF reports .", "This is interpreted by your browser but not by mPDF which just translates HTML+CSS to PDF .", "I am trying to convert html into pdf using mpdf .", "I have a problem with mPDF footer generating .", "I am using mPDF in generating payslips .", "stackoverflow.com questions 33292242 http : stackoverflow.com questions 33292242 mpdf-not-generating-pdf-from-example", "Also not working corretlly all mpdf constants and methods like mpdf- page mpdf- pages mpdf- docPageNum .", "Just to be safe I added ob clean before generating the PDF as proposed here but nothing changed : PHP : Adobe Reader can t open PDF files created with mpdf http : stackoverflow.com questions 35276187 php-adobe-reader-cant-open-pdf-files-created-with-mpdf .. . .. . Is this mPDF s or Adobe s fault", "For pdf-conversion I am using mpdf .", "I m currently trying to generate a PDF using the mpdf library with code igniter .", "I am using mPDF with Codeigniter for creating PDF files .", "Using mPDF to print html to pdf the font-size I set in html is not properly set in creating the pdf .", "And what is mPDF and PHP version you are using", "Used example from Convert php file to pdf file by using mPDF http : stackoverflow.com questions 26446986 convert-php-file-to-pdf-file-by-using-mpdf rq 1 If I make the content static is works fine since the php-include is dynamic it doesn t produce a PDF .", "Finally downgrading from mPDF v6 to mPDF v5 solved the it for me .", "How to use Render in MPDF. .", "Mpdf version is 5.7", "I m using mPDF in CodeIgniter .", "I am using CodeIgniter 3 and mPDF to generate PDF files .", "I set mpdf- SetWatermarkText draft .. . after declarate mpdf object .", "admin invoice.php id . GET id .. . .. . html file-get-contents htm .. . .. . mpdf new mPDF c .. . .. . mpdf- WriteHTML html .. . .. . mpdf- Output .. . .. . You can try link this.but you will get seconde page blank but in first page you will get the detail .", "PS : Using MPDF to generate PDF File .. . .. . Any hep will be highly appreciated .", "I m using the mpdf library http : mpdf1.com to generate a PDF of user-generated html .", "I am generating multiple PDFs in a loop using mPDF .", "I am trying to include my dynamic php file and convert it to pdf file by using mPDF .", "The documentation on the main mPDF Github page is for development version .", "I m using a php class mpdf which generates PDF s very nicely .", "I don t know mPDF", "I am generating PDFs with the mPDF class and wondering if and how would it be possible to determine the position of the last line of text in document that is generated mPDF", "Does anybody knows how to get the number of generated pages if a PDF document using mPDF library", "I m trying to create a pdf file with mpdf and send it by e-mail .", "What is going on is that I have created a PDF form using mPDF .", "I am using mpdf to generate a pdf file with specified width height .", "You can use writeHTML method more than once : mpdf- WriteHTML Line1 pagebreak Line2 br Line3 unusedSpaceH mpdf- h - mpdf- y - mpdf- bMargin - 0.01 unusedSpaceW mpdf- w - mpdf- lMargin - mpdf- rMargin mpdf- WriteHTML div style border : 1px solid red width : unusedSpaceW mm height : unusedSpaceH mm div", "third party mpdf mpdf.php and check .", "There are many examples about mPDF .", "In a WordPress plugin using mpdf mpdf doesn t use WordPress http classes and doesn t set user-agent .", "There still are ready-to-use packages for version 6.1.0 https : github.com mpdf mpdf releases tag v6.1.0 which can be uploaded and used as-is .", "first you include your mpdf http : www.mpdf1.com mpdf index.php file .. . .. . also open debug functionality to see the error .", "A PHP developed system with mpdf to generate the pdf file the system was deployed on Ubuntu Linux .", "The problem is that this mPDF library is written as it is and it is generating dozens of notices undefined index undefined offset etc .", "I have a strange problem with my php script using mPDF .", "I am using Zend Framework and creating PDF with mpdf .", "Are the notices gone in MPDF 6.x", "Including images is kinda tricky in mPDF .", "I have project that is using mpdf .", "Working code for mPdf Watermark .. . .. . Try this", "You see mpdf pagebreak tag .", "I need some help with mPDF .", "mpdf unavailable some feature CSS", "Then uses it to generate pure HTML code.. . .. . 4 . which is later processed by mPDF in order to generate the PDF file and afterwards.. . .. . 5 .", "In my html I have .. . .. . However mPDF scales the font-size to 9pt in the PDF .", "I have just started to use mPDF .", "Using mPDF how can I prevent body from overlapping the footer", "i want to display records from mysql database and export them with mpdf in php .", "When creating your new PDF use the following to set it to landscape .. . .. . Hope this helps .. . .. . More information here http : www.smaizys.com php mpdf-html-to-pdf-introduction", "Need help.I use mpdf lib .", "I converted psd to html but now i m trying convert that to pdf using mpdf .", "I tried to convert a html page to pdf and was decided to use mPDF I follow what the documentation does .", "Installing FontAwesome in mPDF .. . .. . Download or clone FontAwesome from https : github.com FortAwesome Font-Awesome and copy fonts fontawesome-webfont.ttf into your MPDF ttfonts directory .", "I am using mpdf to create a PDF File with Data from an MySQL Database .", "I found your answer but you use pdf mpdf- Output S before the ob end clean I use this for a pdf in an email .", "If you can use swiftmailer you can attach a MPDF generated PDF to the email quite easily as follows : .. . .. . Here is the Reference http : www.mywebschools.com email-mpdf-pdf-attachment-using-swift-mailer .", "Add D parameter instead of I in your mpdf output means mpdf- Output filename.pdf D", "Did I miss a configuration in mPDF or what", "I chose mPDF over HTML2PDF no particular reason for that .", "How do i embed line chart with mpdf", "If I save the output from mPDF into a file using e.g .", "I have a table and set the table layout to fixed and used mPDF to convert it to PDF .", "My project should generate multiple forms as pdf I am using mpdf library with codeigniter framework .", "I have successfully generated a PDF using mpdf which I have verified by downloading the PDF .", ": .. . .. . or .. . .. . I am tested with mPDF 6.0 and it worked .", "ob start include template1.php content ob get clean .. . your code up to . . mpdf- WriteHTML content", "enter image description here http : i.stack.imgur.com cRiBM.png .. . .. . PHP .. . .. . mpdf new mPDF A4 open sans 30 12 12 12 10 10 .. . .. . Mark Up .. . .. . .. . .. . I tried using the default fonts of mPDF like dejavusans It works perfectly .", "@voter Sorry to bring up an old thread but I find the mpdf- y isn t updating properly and mpdf- lasth also shows the wrong values .", "I am facing a problem when printing pos invoice by MPDF .", "include once mpdf-master mpdf.php include once . . . . . . . . wp-load.php .. . .. . htm get template directory uri .", "The key here is using mpdf- SetJS this.print before sending the output .", "Works in FireFox and IE - did not work for chrome : .. . .. . mpdf- SetJS this.print false", "Sometime even a single space before any html output can throw off MPDF", "I m trying to create a PDF from html whith mPDF version 6.0 pratically all is right but the background-image don t work I try whith mPDF 5.0 but don t change anything I try whith tables divs and others elements but don t work .", "Just Notice.. . And they are outputted before mPDF tries to send it s headers or they become the part of PDF doc therefore it is unreadable .", "If you use mpdf- Output after ob end clean you can even display the PDF without notices in the browser", "But if you use mpdf- Output after the ob end clean the notices are also gone and you can display the pdf in a browser without notices .", "mPDF also seems to fail to find the image assets so I get broken image symbols on the PDF .", "Has anyone come across the following error when creating PDF with mPDF and now how to fix it .", "mPDF classes cssmgr.php Line 1174 Undefined offset : -1 .. . .. . Creation of PDF works fine other than this error", "What I m using is the mPDF tool and I can t change to a different pdf tool .", "Also the mPDF manual explain how to do it with more options : Fonts in mPDF 6.x http : mpdf1.com manual index.php tid 501" ] }
{ "confidence": [ 73.98200988769531, 69.76721954345703, 67.98065185546875, 66.6427001953125, 65.0523910522461, 64.12066650390625, 63.69257354736328, 63.30677032470703, 62.55635452270508, 60.406288146972656, 60.26810836791992, 59.93763732910156, 59.0375862121582, 58.52557373046875, 58.517738342285156, 58.294708251953125, 58.27670669555664, 58.2064094543457, 57.87684631347656, 57.50076675415039 ], "content": [ "Question : I m trying to create a PDF from html whith mPDF version 6.0 pratically all is right but the background-image don t work I try whith mPDF 5.0 but don t change anything I try whith tables divs and others elements but don t work . PHP : .. . .. . CSS : .. . .. . can someone help me Comment : Does this page renders properly I mean if we try to view these contents instead sending it to pdf . Comment : it s works when I saw like html . .. . Answer : This might be because of invalid UTF-8 characters present in your HTML . Try .. . .. . html mb convert encoding html UTF-8 .. . .. . Before .. . .. . mpdf- WriteHTML html", "Question : I have just started to use mPDF . I got stuck at very beginning . I am trying to include my dynamic php file and convert it to pdf file by using mPDF . Here is my approach : This is my function to convert file to pdf .. . .. . My template.php file is only a html invoice table layout in where several content come from database as : user address invoice table and so on.. . I do want to convert the html layout and content from the template.php file to pdf .. . .. . But it is not outputing the file as a pdf file . What am I missing here Comment : Do you want to convert the source of the .php file or the content generated by the .php file Comment : My template.php file is only a html invoice table layout in where several content come from databas as : user address invoice tble and so on.. . I do want to convert the html layout and content fom th template.php file to pdf Comment : where several content come from databas as so it has a php code that should be executed file-get-contents html reads the file as is without running .php code in it . Use ob start before include template1.php take the content of the buffer after output if needed and convert it to pdf . Comment : can u plz add the code Comment : ob start include template1.php content ob get clean .. . your code up to . . mpdf- WriteHTML content .. . Answer : If your template1.php has php code in it then it would not be executed by the file-get-contents function as it will read the content of the file as a regular text . You need to turn output buffer on before include get the content of the buffer and use it for the generation of pdf . Something like this : Comment : ob get clean seems to fail but ob getContents works but then the clear function fails Comment : @BarclayVision try ob end clean after ob get contents Comment : that is what i tried asked in new question - similar code but failed to return PDF . stackoverflow.com questions 33292242 http : stackoverflow.com questions 33292242 mpdf-not-generating-pdf-from-example Comment : @BarclayVision check what ob get level gives you - may be included files adding additional levels of buffering . Also disable buffering check what output you will get into browser from the include . Comment : ob get level gives : HTML contains invalid UTF-8 character s 2mPDF error :", "Question : I m using the mPDF library http : www.mpdf1.com mpdf to generate PDF docs directly from HTML output . The problem is that this mPDF library is written as it is and it is generating dozens of notices undefined index undefined offset etc . I tried anything to stop outputting them but nothing yet helped . I tried to put error reporting E ALL E NOTICE as well as error reporting E ALL E NOTICE which i inserted into my index.php into the class and method that is directly including mpdf.php and also at the start of mpdf.php . I also tried combinations with ini set display errors 0 - all these directives are working for whole the web application but for mpdf . Therefore even when PDF could be well formed and valid I cannot output it let the user download it . Also the problem occurs with my HTML simple table really nothing special while the examples are working fine and with no notices . So the help I would need : either get rid of notices or better help me find out why the mPDF is not working for me . If I use this code : .. . .. . everything is working good but if I try to output this HTML : .. . .. . I get notices and therefore PDF cannot be outputted . If I save the output from mPDF into a file using e.g . file-put-contents the PDF is valid and therefore readable even if I use complex HTML - but still the Notices are printed into the browser . Anyway I need the PDF to be offered for download not to be saved into filesystem . OK I found one solution though it is not the best practice but it works : I enclose the code with ob start and ob end clean while catching out the pdf string that I output instead of mPDF . Final code : Comment : Probably mPDF is changing the error level reporting when it gets invoked You can try to suppress errors by using the @ operator with the expressions in question however that s not good practice . Probably there is an update of the library or a configuration setting I don t know mPDF Comment : @hakre there is no such setting AFAIK but I ll try the @ sign . Comment : @shaddyyx : Ensure that the warnings are not given because of your input . Just saying your code looks quite clean probably the HTML is not acceptable Comment : @hakre there is no Warning . Just Notice.. . And they are outputted before mPDF tries to send it s headers or they become the part of PDF doc therefore it is unreadable . Comment : Not an answser : Have you considered using a different HTML-to-PDF technology wkhtmltopdf comes well-recommended and includes precompiled binaries for most environments which makes it usable on many shared-hosting accounts . .. . Answer : While there is no answer and because I ve not found any other appropriate solution here is summary of what I have so far mainly copy from my question above : .. . .. . As written in the comment above it is then just upon me or client : - what will be done with the PDF data returned from mPDF . I use this PDF generating on more places through the application and mostly offer PDF just for download but I also attaches it to email user makes a payment I generate the PDF invoice and send it via email . I have found no solution and also have no more time to do so to stop mPDF generate notices and haven t yet lost my mind to repair the mpdf.php with its 1.34 MB of PHP code therefore this is for now the only solution that works for me . Maybe it will help somebody . Comment : @shadyx have you found another solution - I have a similar problem although my PDFs are formed correctly but I get numerous notices that I want to get rid of Comment : @torr Sorry I didn t . Only using output buffering I am able to get rid of PHP Notice messages and output the PDF correctly.. . Comment : Are the notices gone in MPDF 6.x", "Question : null .. . Answer : Edit : I have resolved the issue by removing ob clean calls from PHP script which I previously needed on my local server in order to avoid returning anything prior to the actual PDF data . Everything works as it should now . It still bothers me though why did ob clean mess things up on the shared-hosting server but there were no issues on the local server Pre edit : .. . .. . I have a PHP script that : .. . .. . 1 . Takes a piece of JSON data .. . 2 . Decodes the data to a PHP array and.. . .. . 3 . Then uses it to generate pure HTML code.. . .. . 4 . which is later processed by mPDF in order to generate the PDF file and afterwards.. . .. . 5 . I use mpdf- Output S function to create a string to put the generated file in I encode it to base64 and echo it back to the client . All of the requests are performed by the http.post AngularJS service on the client-side . Angular creates a JSON package sends it to the server and awaits the response and offers the generated PDF file as a download . The issue I have is not present on my local server WAMP stack PHP 5.5.12 everything works great . On the shared-hosting server though I get a scrambled response the issue is illustrated in the image provided . The data is of course unusable . Image illustrating the issue . http : i.stack.imgur.com 6govo.png .. . .. . The mPDF library is working fine as I ve tested some of the files from example folder and all of them were processed with no issues at all but without any AJAX involved . Things I ve tried : .. . .. . 1 . Setting both client and server encoding headers to utf-8 - no change . 2 . echo -ing the pure HTML data prior to processing it with mPDF - the data was fine all of it was there none was scrambled . 3 . echo -ing string before converting it to base64 - the issue persisted . 4 . Processing a simple p Hello world p string with mPDF - data was scrambled . 5 . Trying different headers on the server-side commented out in the code provided . All of this makes me think that something s wrong with the mPDF library or some of it s settings but the examples that are packed with the library itself work just fine . PHP script important part : .. . .. . AngularJS http-request : .. . .. . What should I start looking into Any suggestions", "Question : I am using mPDF in generating payslips . However the icons in the payslip aren t showing once it is generated . It only leaves a blank space just like this : .. . .. . enter image description here http : i.stack.imgur.com e2EHM.png .. . .. . Icons should show on those highlighted spots . So far here s what I ve done : .. . .. . I am using Yii2 PHP framework and here s my action controller : .. . .. . Am I missing something Please let me know . Comment : As explained in my answer to C ItextSharp Fontawesome Icons currency - PDF http : stackoverflow.com questions 30440982 c-sharp-itextsharp-fontawesome-icons-currency-pdf you re using Windows-1252 encoding for symbols that probably require UNICODE . Comment : so what do you mean the question is related to c though Comment : It s in French but take a look at the screen shots in this blog : Utilisation de polices : PDF et iText http : www.developpez.net forums blogs 133351-blowagie b521 utilisation-polices-pdf-itext . You see that some characters are missing in some screen shots because the wrong encoding is used . There is a difference between the double-byte Unicode character uf0d6 and the two separate single byte characters with value 240 0xF0 and 214 0xD6 . Maybe that s causing your problem . Comment : Sorry but I don t really understand . what do you suggest I do Comment : You could start to learn more about fonts and encoding . Show us the PDF . Maybe you re not even using the Fontawesome font chances are that it doesn t show up in the Fonts panel under Document Properties . .. . Answer : Encoding issues aside this could be a couple of things . Firstly you need to integrate FontAwesome with your MPDF installation . Secondly you need to consider how you re speficiying the glyph in HTML . Installing FontAwesome in mPDF .. . .. . Download or clone FontAwesome from https : github.com FortAwesome Font-Awesome and copy fonts fontawesome-webfont.ttf into your MPDF ttfonts directory . In your MDPF config fonts.php file add the following lines to this- fontdata : .. . .. . Adding the glyph in HTML .. . .. . You need to keep in mind that the CSS : before pseudo-selector commonly used to add FontAwesome glyphs to HTML doesn t work in mPDF . Bad : .. . .. . .. . because this FontAwesome CSS rule doesn t work in mPDF : .. . .. . Good : .. . .. . You can get the unicode code point for each glyph by clicking on it on the FontAwesome Icon List but the Cheatsheet http : fortawesome.github.io Font-Awesome cheatsheet is more convenient for this .", "Question : I m using the mPDF library http : www.mpdf1.com mpdf to generate PDF docs directly from HTML output . The problem is that this mPDF library is written as it is and it is generating dozens of notices undefined index undefined offset etc . I tried anything to stop outputting them but nothing yet helped . I tried to put error reporting E ALL E NOTICE as well as error reporting E ALL E NOTICE which i inserted into my index.php into the class and method that is directly including mpdf.php and also at the start of mpdf.php . I also tried combinations with ini set display errors 0 - all these directives are working for whole the web application but for mpdf . Therefore even when PDF could be well formed and valid I cannot output it let the user download it . Also the problem occurs with my HTML simple table really nothing special while the examples are working fine and with no notices . So the help I would need : either get rid of notices or better help me find out why the mPDF is not working for me . If I use this code : .. . .. . everything is working good but if I try to output this HTML : .. . .. . I get notices and therefore PDF cannot be outputted . If I save the output from mPDF into a file using e.g . file-put-contents the PDF is valid and therefore readable even if I use complex HTML - but still the Notices are printed into the browser . Anyway I need the PDF to be offered for download not to be saved into filesystem . OK I found one solution though it is not the best practice but it works : I enclose the code with ob start and ob end clean while catching out the pdf string that I output instead of mPDF . Final code : Comment : Probably mPDF is changing the error level reporting when it gets invoked You can try to suppress errors by using the @ operator with the expressions in question however that s not good practice . Probably there is an update of the library or a configuration setting I don t know mPDF Comment : @hakre there is no such setting AFAIK but I ll try the @ sign . Comment : @shaddyyx : Ensure that the warnings are not given because of your input . Just saying your code looks quite clean probably the HTML is not acceptable Comment : @hakre there is no Warning . Just Notice.. . And they are outputted before mPDF tries to send it s headers or they become the part of PDF doc therefore it is unreadable . Comment : Not an answser : Have you considered using a different HTML-to-PDF technology wkhtmltopdf comes well-recommended and includes precompiled binaries for most environments which makes it usable on many shared-hosting accounts . .. . Answer : It seems the error occurs just when it tries to write out the new table headings for each page . I commented out in V 5.4 line 26210 .. . .. . The heading where not getting drawn regardless so commenting out this line had no effect other than killing the notices .", "Question : I m using the mPDF https : github.com mpdf mpdf libary to turn HTML pages into PDFs . This library works great on my local machine and development servers running PHP 5.6 . However on a newly provisioned Ubuntu 16 box from Amazon with Apache 2.4.18 and PHP 7 I can t get it working . The symptom is that the PDF is never generated - the browser just keeps spinning for ever and eventually I have to quit the browser to escape from the process . I do not receive any error messages . I ve worked through my script to see where the process gets stuck and it s on this method : .. . .. . I have tried passing a very simple HTML string into the function for example : .. . .. . And that does work . So I wondered about the quality of my HTML . Running my HTML through the W3 Validator https : validator.w3.org revealed a couple of errors which I ve now fixed but this has not resolved my issue . So I m now wondering about the size of my HTML - it s a large page that s being rendered often in excess of 20 pages on the PDF . My script allocates plenty of memory for the process : .. . .. . And the server has 8G of memory in total . Is there anything I should check in the server config which might be affecting mPDF Thanks in anticipation . Edit .. . .. . After further debugging and stripping the HTML back to smaller and smaller pieces I have been able to get the PDF to generate - but it s extremely slow . mPDF also seems to fail to find the image assets so I get broken image symbols on the PDF . I wonder if this server setup has a strange webroot basePath that means mPDF can t find the assets it s looking for Edit 2 .. . .. . Wondering if this issue is now a duplicate of mPDF not rendering images mPDF error : IMAGE Error Could not find image file http : stackoverflow.com questions 23514062 mpdf-not-rendering-images-mpdf-error-image-error-could-not-find-image-file answer-24922522 .. . .. . I m seeing the same issues of slow load and missing images Comment : Add error-log error-log to your php.ini run the script and check for the file error-log . Or better yet follow the advices on stackoverflow.com a 21086666 2729937 http : stackoverflow.com a 21086666 2729937 including the comment adjusting the paths to your setup .. . Answer : So the server had an IP firewall and mPDF uses file-get-contents to reference assets for the PDF as external assets including the domain-name : .. . .. . This means the request was going out of the server coming back to it and being refused by the firewall . Removing the firewall solved our issue . I d still love to know if mpdf can reference assets locally . The docs for its basePath property seem to indicate that it always used a full domain URL : .. . .. . https : mpdf.github.io reference mpdf-functions setbasepath.html", "Question : I m using the mPDF library http : www.mpdf1.com mpdf to generate PDF docs directly from HTML output . The problem is that this mPDF library is written as it is and it is generating dozens of notices undefined index undefined offset etc . I tried anything to stop outputting them but nothing yet helped . I tried to put error reporting E ALL E NOTICE as well as error reporting E ALL E NOTICE which i inserted into my index.php into the class and method that is directly including mpdf.php and also at the start of mpdf.php . I also tried combinations with ini set display errors 0 - all these directives are working for whole the web application but for mpdf . Therefore even when PDF could be well formed and valid I cannot output it let the user download it . Also the problem occurs with my HTML simple table really nothing special while the examples are working fine and with no notices . So the help I would need : either get rid of notices or better help me find out why the mPDF is not working for me . If I use this code : .. . .. . everything is working good but if I try to output this HTML : .. . .. . I get notices and therefore PDF cannot be outputted . If I save the output from mPDF into a file using e.g . file-put-contents the PDF is valid and therefore readable even if I use complex HTML - but still the Notices are printed into the browser . Anyway I need the PDF to be offered for download not to be saved into filesystem . OK I found one solution though it is not the best practice but it works : I enclose the code with ob start and ob end clean while catching out the pdf string that I output instead of mPDF . Final code : Comment : Probably mPDF is changing the error level reporting when it gets invoked You can try to suppress errors by using the @ operator with the expressions in question however that s not good practice . Probably there is an update of the library or a configuration setting I don t know mPDF Comment : @hakre there is no such setting AFAIK but I ll try the @ sign . Comment : @shaddyyx : Ensure that the warnings are not given because of your input . Just saying your code looks quite clean probably the HTML is not acceptable Comment : @hakre there is no Warning . Just Notice.. . And they are outputted before mPDF tries to send it s headers or they become the part of PDF doc therefore it is unreadable . Comment : Not an answser : Have you considered using a different HTML-to-PDF technology wkhtmltopdf comes well-recommended and includes precompiled binaries for most environments which makes it usable on many shared-hosting accounts . .. . Answer : If you use mpdf- Output after ob end clean you can even display the PDF without notices in the browser I use this in OpenCart . But you need to use ob start and ob end clean . Comment : Thanks for the answer but can you tell what is your answer different from the accepted answer It is very brief without any code example and it is coming after one and half year.. . Comment : I found your answer but you use pdf mpdf- Output S before the ob end clean I use this for a pdf in an email . But if you use mpdf- Output after the ob end clean the notices are also gone and you can display the pdf in a browser without notices . This was not very clear from your answer . . you write only in your example about download . .", "Question : Does anybody knows how to get the number of generated pages if a PDF document using mPDF library Comment : stackoverflow.com questions 1098156 http : stackoverflow.com questions 1098156 number-of-pages-in-a-pdf-file - may helps you Comment : add this to a main mPDF class : function getPageCount return count this- pages then add a html-parser such string : html str-replace PAGECNT this- getPageCount html after these actions you can insert PAGECNT directly in your parsed HTML to get the result . This is useful is you need to indicate a page like : page 2 of 5 . .. . Answer : If you are trying to return the number of pages so you can save this to a database or some other operation outside of mpdf it s easy to pull it this way . After you write your content : .. . mpdf- WriteHTML html .. . .. . page count mpdf - page .. . .. . mpdf- Output", "Question : I d installed the MPDF utility in order to convert HTML CSS to PDF reports . So far things have been working just fine until I ve tried converting certain page to PDF and there s no output . I have to mention that i m able to display the page regularly through browser - the problem only comes up when i m trying to convert it to PDF - then I receive blank page . Moreover there are no encoding problems part of the output is written in Hebrew but I ve already overcame this obstacle .. . .. . Here s part of the code : .. . .. . Any suggestions Thanks in advance .. . Answer : include once mpdf-master mpdf.php include once . . . . . . . . wp-load.php .. . .. . htm get template directory uri . admin invoice.php id . GET id .. . .. . html file-get-contents htm .. . .. . mpdf new mPDF c .. . .. . mpdf- WriteHTML html .. . .. . mpdf- Output .. . .. . You can try link this.but you will get seconde page blank but in first page you will get the detail . Thanks Sanket .", "Question : I m generating PDFs with mPDF v5 and v6.0 6.1 since shortly I ve been getting an error from Adobe Reader as soon as I start scrolling in the document : .. . .. . The embedded font MPDFAA+DejaVVuSansCondensed could not be retrieved . Some charachters might not be displayed or printed correctly . Translated from the original german error message .. . .. . Also all umlauts are missing . This error doesn t occurr in Chrome or in SumatraPDF . Just to be safe I added ob clean before generating the PDF as proposed here but nothing changed : PHP : Adobe Reader can t open PDF files created with mpdf http : stackoverflow.com questions 35276187 php-adobe-reader-cant-open-pdf-files-created-with-mpdf .. . .. . Is this mPDF s or Adobe s fault I ve been generating such documents since about 6 months ago so I guess Adobe rolled out a faulty update Is anyone getting the same problem Edit : The problem only seem to occur if I use the font DejaVuSansCondensed in the constructor not with DejaVuSans . Both font files are present in ttfonts . Comment : Exactly the same problem here . .. . Answer : Workaround provided by the user asdfa80756749 worked for me . https : forums.adobe.com message 8879248 .. . .. . The font files provided by mPDF can t be opened by the latest Acrobat Reader . As a workaround the freeware Type Light can be used to open the broken fonts in the ttfonts directory including their bold etc . versions and save them again making them usable by Adobe Reader .", "Question : I am trying to generate PDF with the german word mo chte the letter o is the issue here . . using the font that I added Open Sans in ttfonts folder and set it on config fonts.php . . I also read https : mpdf.github.io fonts-languages fonts-in-mpdf-6-x.html and tried modifying config lang2fonts.php . . I even set it everything to open sans .. . .. . PS : The font file Open Sans I downloaded is already no subsetting . But the output is still not like as I expected it shows : enter image description here http : i.stack.imgur.com cRiBM.png .. . .. . PHP .. . .. . mpdf new mPDF A4 open sans 30 12 12 12 10 10 .. . .. . Mark Up .. . .. . .. . .. . I tried using the default fonts of mPDF like dejavusans It works perfectly . But what I need is Open Sans . Did I miss a configuration in mPDF or what What is the problem Comment : have you set the encoding to UTF-8 Comment : Yes Sir characters like works . Only and are not working . Weird isn t it .. . Answer : The fact that you see a regular o followed by an unknown character strongly suggests the second character is a single non-spacing diaeresis not available in the font you are using . Checking the character sets of DejaVu Sans and Open Sans proves my hunch is right . DejaVu Sans does contain a COMBINING DIAERESIS U+0308 : . OpenSans does not . Use Unicode Normalization on your input text to replace the sequence o+ with its composite character U+00F6 . The same goes for U+00E4 and O+00FC .", "Question : My project should generate multiple forms as pdf I am using mpdf library with codeigniter framework . I test this code with english language it works fine . However I should create forms with persian language . The first form is created without any problem but the others are not displaying well the characters as in picture . Please help me I tried my best and searched a lot but could not find any solution for my issue . This is the correct one http : i.stack.imgur.com oNCZL.jpg .. . .. . all of the remaining pdfs without the first pdf have this problem http : i.stack.imgur.com WJrTW.jpg .. . .. . because it is required to create the original file separately I use multiple forms . I set the charset and direction to the html code . the following is the code that I used to generate pdf . The first pdf after creation should be opened in the browser . When I open it in windows internet-explorer or firefox the pdf file can not open . but in mac it can be open in a browser . I used the same syntax and code for all pdfs and functions . Comment : Why you don t use Download helper Comment : thank you . the project should create multiple pdfs with utf-8 and just store them . I is not necessary to download them . Do you think download helper would help me Comment : Same issue happens for me too . I was generating pdf in malayalam language.The first pdf fonts are coming very fine from second one onwards they are distorted.I haven t cleared the issue yet but if you are creating pdf for printing purpose try to do it as a single long pdf and it will come out well.If your requirement is different I don t have a solution yet . .. . Answer : I ve run into the same issue . Finally downgrading from mPDF v6 to mPDF v5 solved the it for me .", "Question : Using mPDF to print html to pdf the font-size I set in html is not properly set in creating the pdf . In my html I have .. . .. . However mPDF scales the font-size to 9pt in the PDF . If I use 24pt it scales to 18pt . I checked and tried to change the configs and displaypreferences NoPrintScaling in mPDF but none of this is working . Has anybody got a clue on how to get rid of this scaling . I don t want to set the font-size bigger to compensate for mPDF behaviour because that will ruin my html view . .. . Answer : mPDF uses autosizing tables and this influences among other things the font-size as well . When outputting tables with mPDF you need to set : .. . .. . on every table . See Auto-layout algorithm in the mPDF manual https : mpdf.github.io tables auto-layout-algorithm.html for reference . Comment : That link does not exists now Comment : @Yo Yo . The original mPDF manual apparantly is not online anymore but a copy is made available on github . I have changed the link accordingly .", "Question : I am using Zend Framework and creating PDF with mpdf . I am trying to use fontawesome for denoting some of the articles but the fonts of font-awesome are not rendering properly below is the code . The code I am using in the html .. . .. . Thanks in advance . Comment : look I m using PHP around 5 or 6 years and every time that I need to create a PDF does not meet with my expectations CSS or some other elements . So I discovered here in stackoverflow an API that you only send your HTML and they return a PDF exactly like your page . Try it : html2pdfrocket.com http : www.html2pdfrocket.com .. . Answer : The easy way : .. . .. . 1 Copy fontawesome-webfont.ttf file into mPDF ttfonts directory . 2 Edit mPDF config fonts.php search the array started by this- fontdata and add to it : .. . .. . 3 Change your document CSS properly with your new font family . Eg . : .. . .. . 4 When you instantiate the class let the first parameter in blank : .. . .. . Eg . : .. . .. . or .. . .. . I am tested with mPDF 6.0 and it worked . Also the mPDF manual explain how to do it with more options : Fonts in mPDF 6.x http : mpdf1.com manual index.php tid 501 Comment : Thanks Lord Dracon it worked .", "Question : I have a strange problem with my php script using mPDF . I generate PDF file from HTML and I want to set watermark on each page . So I m trying like in the manual : .. . .. . but it s working wrong because it set me watermark without clarity like I will set watermarkTextAlpha 1 overlaps on main text . But in other script a little different it works good . Comment : But in other script a little different it works good . What is a little different Comment : style.css style is the same . Other script is execute without function.. . This is main diffrence . But I also tried bring mpdf as global outside function and still not works : Comment : Are ou outputting the text of the PDF after you set the watermark s transparency Comment : Yes . I set mpdf- SetWatermarkText draft .. . after declarate mpdf object . Comment : I can see that @Gugu but that wasn t the question . Where is the rest of the code for this PDF .. . Answer : Working code for mPdf Watermark .. . .. . Try this", "Question : null .. . Answer : Trying to generate a PDF from dynamic php page . the following code does not fail but yet just produces a page identical to report.php like the include file . ob get clean didn t work so replaced with ob get content page runs but no PDF . Used example from Convert php file to pdf file by using mPDF http : stackoverflow.com questions 26446986 convert-php-file-to-pdf-file-by-using-mpdf rq 1 If I make the content static is works fine since the php-include is dynamic it doesn t produce a PDF .", "Question : Does anybody knows how to get the number of generated pages if a PDF document using mPDF library Comment : stackoverflow.com questions 1098156 http : stackoverflow.com questions 1098156 number-of-pages-in-a-pdf-file - may helps you Comment : add this to a main mPDF class : function getPageCount return count this- pages then add a html-parser such string : html str-replace PAGECNT this- getPageCount html after these actions you can insert PAGECNT directly in your parsed HTML to get the result . This is useful is you need to indicate a page like : page 2 of 5 . .. . Answer : I was looking for the same functionallity while using EYiiPdf a wrapper for mPDF on Yii and the following worked like a charm : .. . .. . I checked mPDF s source and found this at mpdf.php : 1656 version 5.4 : .. . .. . Hope it helps Comment : Actually accepted answer dint work for me And your solution worked out : Comment : i am creating pdfs using mpdf inside Yii pdfs are created from htmls and i used setfooter to the footer stuff but its getting displayed in last page only how to get that in every page mPDF1- setFooter DATE j-m-Y PAGENO nb O E", "Question : I am generating a pdf with some images in it . Since the images are large in size the size of the generated PDF will also be very large . Is there a way to dynamically reduce the size of the image while attaching it to the pdf . I tried something like this from here https : github.com nomisoft White-Hat-Classes tree master Simple-Image .. . .. . note1 : imgPath is passed from a loop and I m using MPDF to generate the pdf . .. . Answer : Here is my header and this is how i used mpdf hope this will helps you", "Question : null .. . Answer : I tried to remove this white space before header and when I tried to add an attribute absolute display : block it did not help . When and change margin-top is zero it still did not help . - .. . Mpdf new mPDF utf-8 A4 15 15 0 18 .. . .. . Please help . enter image description here http : i.stack.imgur.com z2Qg5.jpg" ] }
[ "yes-answer-long", "yes-answer-short" ]
cjk
UNK_RELATION
slimtune@.net@90
slimtune -- slimtune is a free and open-source profiling and performance tuning tool for @placeholder applications .
{ "confidence": [ 60.277259826660156, 40.996376037597656, 37.7952995300293, 25.832839965820312, 20.07229232788086, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 14.111481666564941, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453, 12.685840606689453 ], "content": [ "Open slimtune profiler .. . 3 .", "While using SlimTune to profile a C application I find that when profiling native functions is enabled there are lots of entries for a function called CoUninitializeE .", "Edit .. . .. . It appears the function s name is actually CoUninitializeEx and that SlimTune is just chopping off a letter for some reason .", "A window open but status is stopped and nothing is profiling .. . .. . What am I doing wrong", "Not sure what you are looking for it you enable profiling of native-code then it is guaranteed that you ll see this function .", "I m trying to profile a .NET console-application with slim tune but I can t achieved make it working .", "I can t find any tutorial on internet so I hope someone has already used it .", "This is what I ve done : .. . .. . 1 .", "Build my console app on VS . .. . 2 .", "Click on run .. . 4 .", "Choose CLR Application ms .net-2.0 4.0 target application type .. . 5 .", "Select my executable this is a vshost.exe .. . 6 .", "Set allow method inlining to true .. . 7 .", "Select sqlite in-memory .. . 8 .", "Choose for try Function details visualizer .. . 9 .", "Click on run .. . 10 .", "It should be very easy but i m stuck .. .", "Thanks in advance for any help .", "Best regards", "in fact it looks like that with a real exe not vshost.exe it s working", "CoUninitialize seems to be related to COM objects however I m not directly using any Com objects and Google has no information about the version ending with an E . .. . .. . Does anyone have knowledge of what this function is how to reduce the amount of time spent on it", "For instance is it related to memory-management so that reducing memory allocations or deallocations would help", "I still would appreciate knowledge of what leads to this function being called .", "AFAIK There is no CoUnitializeEx .", "Can you post a screenshot", "CoInitialize Ex CoUninitialize exist to register threads with the COM library .", "I d assume that the main thread is always registered with the library even if you don t supply a thread attribute STAThread MTAThread on the main entry-point .", "CoUninitializeEx also seems to be calling CorLaunchApplication which calls TranslateSecurityAttribute which calls GetAddrOfContractShutoffFla.. . which calls SetCounterName which calls WaitForSingleObject which calls WaitForSingleObjectEx .", "A lot of these functions seem COM centered but I m not directly using any COM objects that I know of .", "The only standard-library I m using is System.Math .", "CoInitalizeEx and CoUninitialize are pretty core in Windows programming .", "They respectively initialize and shutdown COM on a thread .", "The CLR calls these functions automatically before and after a Thread runs .", "It is pretty hard to avoid using COM in a .NET program it is the basic extensibility model for native Windows code .", "Quite invisible thanks to the many wrapper classes in the .NET framework that hides the plumbing .", "The generic diagnostic is that you use a lot of threads .", "Yes expensive .", "The thread pool is a workaround .", "Thanks Hans the problem is that I m not visibly using any threads .", "The only thing done by the function in question is : arithmetic looping comparison memory allocation double s via new double and calling Math.Log .", "Does the call to Math.Log somehow create a new thread", "No it doesn t .", "Since you cannot actually change any of this code maybe you are better off just not looking at it", "Specifically I m looking for the types of programming that are related to this CoUninitializeE is taking up to 40 of my programs time .", "It shows up in some functions but not in others so it s not just a constant overhead on calling functions .", "Since memory allocation and Math.Log are the only native calls I seem to be using I was wondering if it was related to one of these .", "I.E . if it s related to Math.Log then I could try and optimize my function to call Math.Log less .", "You are getting garbage profiler results .", "Not just the extra E . CoUninitialize is only called at thread exit .", "Get another one good ones cost money ." ] }
{ "confidence": [ 54.210601806640625, 42.273582458496094 ], "content": [ "Question : I m trying to profile a .NET console-application with slim tune but I can t achieved make it working . I can t find any tutorial on internet so I hope someone has already used it . This is what I ve done : .. . .. . 1 . Build my console app on VS . .. . 2 . Open slimtune profiler .. . 3 . Click on run .. . 4 . Choose CLR Application ms .net-2.0 4.0 target application type .. . 5 . Select my executable this is a vshost.exe .. . 6 . Set allow method inlining to true .. . 7 . Select sqlite in-memory .. . 8 . Choose for try Function details visualizer .. . 9 . Click on run .. . 10 . A window open but status is stopped and nothing is profiling .. . .. . What am I doing wrong It should be very easy but i m stuck .. . Thanks in advance for any help . Best regards .. . Answer : in fact it looks like that with a real exe not vshost.exe it s working", "Question : While using SlimTune to profile a C application I find that when profiling native functions is enabled there are lots of entries for a function called CoUninitializeE . CoUninitialize seems to be related to COM objects however I m not directly using any Com objects and Google has no information about the version ending with an E . .. . .. . Does anyone have knowledge of what this function is how to reduce the amount of time spent on it For instance is it related to memory-management so that reducing memory allocations or deallocations would help Edit .. . .. . It appears the function s name is actually CoUninitializeEx and that SlimTune is just chopping off a letter for some reason . I still would appreciate knowledge of what leads to this function being called . Comment : AFAIK There is no CoUnitializeEx . Can you post a screenshot CoInitialize Ex CoUninitialize exist to register threads with the COM library . I d assume that the main thread is always registered with the library even if you don t supply a thread attribute STAThread MTAThread on the main entry-point . Comment : CoUninitializeEx also seems to be calling CorLaunchApplication which calls TranslateSecurityAttribute which calls GetAddrOfContractShutoffFla.. . which calls SetCounterName which calls WaitForSingleObject which calls WaitForSingleObjectEx . A lot of these functions seem COM centered but I m not directly using any COM objects that I know of . The only standard-library I m using is System.Math . .. . Answer : CoInitalizeEx and CoUninitialize are pretty core in Windows programming . They respectively initialize and shutdown COM on a thread . The CLR calls these functions automatically before and after a Thread runs . It is pretty hard to avoid using COM in a .NET program it is the basic extensibility model for native Windows code . Quite invisible thanks to the many wrapper classes in the .NET framework that hides the plumbing . The generic diagnostic is that you use a lot of threads . Yes expensive . The thread pool is a workaround . Comment : Thanks Hans the problem is that I m not visibly using any threads . The only thing done by the function in question is : arithmetic looping comparison memory allocation double s via new double and calling Math.Log . Does the call to Math.Log somehow create a new thread Comment : No it doesn t . Not sure what you are looking for it you enable profiling of native-code then it is guaranteed that you ll see this function . Since you cannot actually change any of this code maybe you are better off just not looking at it Comment : Specifically I m looking for the types of programming that are related to this CoUninitializeE is taking up to 40 of my programs time . It shows up in some functions but not in others so it s not just a constant overhead on calling functions . Since memory allocation and Math.Log are the only native calls I seem to be using I was wondering if it was related to one of these . I.E . if it s related to Math.Log then I could try and optimize my function to call Math.Log less . Comment : You are getting garbage profiler results . Not just the extra E . CoUninitialize is only called at thread exit . Get another one good ones cost money ." ] }
[ "yes-answer-long", "yes-answer-short" ]
.net
UNK_RELATION
winscp-net@interface@98
winscp-net -- the winscp .net-assembly winscpnet.dll is a .net wrapper around winscp s scripting @placeholder that allows your code to connect to a remote machine and manipulate remote files over sftp scp and ftp sessions from .net languages such as c vb.net and others or from environments supporting .net such as powershell and sql-server integration services ssis .
{ "confidence": [ 98.04305267333984, 96.5772705078125, 94.97976684570312, 94.51424407958984, 94.00515747070312, 92.86994171142578, 91.48613739013672, 90.09280395507812, 89.39199829101562, 89.39199829101562, 88.63946533203125, 88.4228515625, 88.07655334472656, 88.0654296875, 87.58123779296875, 85.52134704589844, 85.49068450927734, 83.96150207519531, 83.82975769042969, 82.60442352294922, 81.49191284179688, 80.69679260253906, 79.5411376953125, 79.36909484863281, 79.09849548339844, 77.12655639648438, 74.52879333496094, 73.95626831054688, 72.97265625, 72.66197204589844, 69.31263732910156, 69.24746704101562, 69.24746704101562, 67.5775146484375, 67.5775146484375, 67.5775146484375, 67.5775146484375, 66.53672790527344, 66.39878845214844, 65.70700073242188, 63.02458190917969, 63.01408004760742, 62.401756286621094, 60.25552749633789, 60.25552749633789, 60.25552749633789, 59.32103729248047, 58.6530647277832, 58.443668365478516, 58.02179718017578, 57.65314865112305, 57.34416961669922, 56.699119567871094, 56.300167083740234, 55.305782318115234, 55.305782318115234, 55.117923736572266, 54.775367736816406, 54.7689323425293, 54.44987106323242, 54.07927322387695, 53.63582992553711, 53.2880744934082, 52.955543518066406, 52.65146255493164, 52.544612884521484, 52.04728317260742, 51.28559112548828, 51.28559112548828, 51.28559112548828, 51.1924934387207, 51.056373596191406, 51.022098541259766, 49.237823486328125, 48.13764190673828, 48.12920379638672, 48.12920379638672, 48.12920379638672, 48.12920379638672, 48.12920379638672, 48.12920379638672, 48.107295989990234, 47.89957046508789, 47.050270080566406, 46.214237213134766, 45.84492874145508, 45.52365493774414, 45.52365493774414, 45.52365493774414, 45.45677947998047, 45.36281967163086, 45.17847442626953, 45.161373138427734, 44.062255859375, 43.853702545166016, 43.853702545166016, 43.853702545166016, 43.853702545166016, 43.853702545166016 ], "content": [ "Not only with WinSCP .NET assembly but in general .", "I m using WinSCP .NET assembly to upload files .", "Is there a way to do that with WinSCP .NET assembly", "I am downloading files from FTP using WinSCP .NET library .", "I am using WinSCP .NET assembly to transfer files by FTP .", "The WinSCP .NET assembly always behaves like the Allow SCP fallback is unchecked .", "How to do it in WinSCP .NET assembly using RemoteFileInfo", "I have a script that calls the WinSCP .NET assembly .", "As I am working on a .NET C project which uses WinSCP .NET assembly for SFTP password less connection .", "I am using WinSCP .NET assembly to do a download and upload through SFTP with C .NET .", "I am using WinSCP .NET Assembly in PowerShell for file synchronization with a SFTP server .", "I am using the .NET Assembly that WinSCP provides .", "Either use SFTP only what you can use WinSCP .NET assembly for or login to the remote Samba", "I am trying to connect up to a WinSCP server using the WinSCP .NET assembly .", "I m using WinSCP .NET assembly library to perform some SFTP operations - downloading files from SFTP location .", "I am using the WinSCP .NET assembly in order to monitor on a FTP server and download every file that is uploaded to the FTP server .", "Our .NET application uses WinSCP software to work with SFTP servers .", "I need to read a file from SFTP location using WinSCP .NET assembly in C .", "I wrote a class that is using C WinSCP .NET assembly .", "I were using WinSCP .NET assembly for file downloading .", "WinSCP .NET assembly http : winscp.net eng docs library does not support downloading remote file contents to memory .", "Because I need to connect to SFTP using username password and privatekey I am using WinSCP .NET assembly .", "I have problem with WinSCP .NET assembly NuGet plugin executing on Azure .", "I wonder if WinSCP .NET assembly dll version of WinSCP supports this type of authentication", "I am using C++ CLI to program a SFTP program using WinSCP .NET assembly version 5.5.3 .", "Related to Using WinSCP .NET Assembly from WSH-hosted Active Scripting Languages https : winscp.net eng docs library com wsh jscript .", "Syntax for using enumeration in PowerShell is described in article Using WinSCP .NET assembly from PowerShell http : winscp.net eng docs library powershell enums .", "You can use the generated code with your stable version of WinSCP .NET assembly .", "The Session.GetFiles http : winscp.net eng docs library session getfiles of WinSCP .NET assembly downloads both files and subfolders .", "I am using WinSCP to write to connect a SQL Server to an SFTP server .", "I need to use WinSCP .NET assembly to look for text-files containing a specific word in the file name and then extract some lines from these files .", "Using WinSCP .NET assembly I create a connection to my Linux host and execute a script .", "I have experience with PutFiles and GetFiles of WinSCP .NET assembly but I cannot figure out how to get a list of directories .", "Can anyone help me how to achieve the same using WinSCP .NET assembly", "I m using WinSCP .NET assembly : .. . https : winscp.net eng docs library .. . .. . I had also used Chilkat previously .", "I m trying to use a 3rd party DLL WinSCP .NET assembly in Dolphin 6.1b2 .", "Side note : All methods of WinSCP .NET assembly accept only absolute paths .", "I am trying to open file to read from SFTP using WinSCP .NET assembly as par to my exercise to archive file from SFTP to Azure blob .", "I have sent a file by SFTP to another server using WinSCP in VB.NET .", "I am trying to connect to an SFTP server using WinSCP .", "See also Downloading and Installing WinSCP .NET Assembly https : winscp.net eng docs library install .. . .. . Started fresh Dolphin imported the .tlb generated with WinSCP prefix so the classes wouldn t start with .", "I m building a web site and I want that when a user registers to create a directory on the SFTP server and put in that directory a new file .. . .. . I m using WinSCP .NET assembly and writing C .", "I managed using SftpClient to get the stream using the following code and it works but unfortunately not able to achieve the same using WinSCP .NET assembly .", "WinSCP .NET assembly Session API http : winscp.net eng docs library session cannot not provide the contents of downloaded file using streams .", ".. . .. . In the latest beta version the WinSCP .NET assembly 5.8 beta you can use Session.EnumerateRemoteFiles method https : winscp.net eng docs library session enumerateremotefiles :", "As mentioned on the documentation page of the Session.ScanFingerprint method http : winscp.net eng docs library session scanfingerprint the method is available in the latest beta version of WinSCP .NET assembly only .", "I m attempting to perform a synchronization of files from the remote location to the local path using the WinSCP .NET library so that files that are new or updated in the source folder are downloaded to the destination and files that are in the destination and have been removed from the source folder are deleted from the destination .", "So basically I execute the following commands : .. . .. . I use a simple call of method Session.ExecuteCommand from WinSCP .NET assembly like below : .. . .. . I call ExecScript with one of these three commands : .. . .. . The status command works fine .", "WinSCP is amazing .", "I m trying to use the WinSCP PowerShell module http : dotps1.github.io WinSCP on a Windows 7 system .", "I have a WinSCP PowerShell script that downloads the most recent file on the server .", "I have a task to do SFTP in a .net program .", "WinSCP version 5.5.5", "Expanding on the WinSCP .NET assembly example for Downloading the most recent file http : winscp.net eng docs script download most recent file c : .. . .. . See also a documentation for Session.ListDirectory http : winscp.net eng docs library session listdirectory .", "I m new to WinSCP .", "Imports are WinSCP as well .", "Since 5.7.6 https : winscp.net eng docs history a 5.7.6 WinSCP .NET assembly holds only the last 1000 lines of the output https : winscp.net tracker show bug.cgi id 1367 .", "WinSCP was installed from NuGet package manager .", "In the current stable release of WinSCP it seems that using SshHostKeyFingerprint is mandatory and there are no ways to connect to SFTP server without that in SessionOptions .", "not good i thought there is option in wscp net to be able to show remote picture .", "The list is : .. . .. . WinSCP goes over each item in the list .", "Where is WinSCP installed", "Use WinSCP extension Recursively move files in directory tree to from SFTP FTP server while preserving source directory structure https : winscp.net eng docs library example moves files keeping directory structure .", "Also WinSCP is a bad ass program .", "Otherwise WinSCP will try to save all files to C : with name bla .", "This might be out of your expertize as it involves the library WinSCP and is in fact a Linux Server .", "Exception from HRESULT : 0x80131515 .. . .. . The file location is invalid as the .dll is supposed to be located in the same folder as the WinSCP https : en.wikipedia.org wiki WinSCP installation .", "How do I use this with the winscp", "Specifically since WinSCP 5.8.2 beta .", "This probably indicates an internal error of WinSCP .", "If you add one explicitly WinSCP will look for .filepart.filepart .", "I have recently registered the WinSCPnet.dll using .NET Framework C : Windows Microsoft.NET Framework64 v2.0.50727 .", "The DLL is probably a .NET assembly import the generated TLB .", "When you connected with WinSCP for the first time to a specific host server WinSCP asked you to confirm if you trust the server s host key .", ".. . .. . Append session logs both from .NET assembly and GUI to get better answer .", "Show us WinSCP session log file .", "So it has actually nothing to do with WinSCP .", "I am trying to create a global WinSCP session .", "As I can see you are the developer of WinSCP", "Make sure you are using the latest version of WinSCP .", "Question Can WinSCP handle Junction directory", ".. . .. . You can find a PowerShell example for TransferResumeSupport.State https : winscp.net eng docs library transferresumesupport state in Converting to .NET assembly http : winscp.net eng docs scriptcommand get net section of get and put command documentation :", "The point is pictures are on remote location on my FTP and I have no idea is it possible using WinSCP FTP to use get their path and then using the paths to show up given picture inside PictureBox .", "For details see Where do I get SSH hostkey fingerprint for use with scripting or .NET assembly", "You already have the answer here : .. . Showing WinSCP .NET assembly transfer progress on WinForm s progress-bar http : stackoverflow.com q 33012517 850848 .. . .. . To put it simple I m just extracting the relevant part : .. . .. . You need to close the form at the end of the task .", "From the session- DebugLog file I find out WinSCP tries to go over all files and directories within the home-directory .", "The solution is to : .. . .. . Run the WinSCP transfer Session.GetFiles in a separate thread not to block the GUI thread .", "Show us a WinSCP session log file both for the WCF and WinForms .", "Executed command Install-Module -Name WinSCP which result in no output .", "The job of the script task is to download a file from an SFTP server using WinSCP .NET assembly and place it on my server Windows Server 2012 R2 with SQL Server 2014 .. . .. . My package runs fine when I run it on my Dev machine but when I deploy to the server my package fails at this task with the error message .. . .. . Exception has been thrown by the target of an invocation .. . .. .", "So you have to tell WinSCP to download the files to the directory by appending a backslash : C : bla .", "The server should not use default permissions such that you cannot access a directory file you have just created yourself .. . .. . It s currently not possible to directly set permissions when creating directory or modify them afterwards with WinSCP .NET assembly .", "As the instructions for registering the WinSCP .NET assembly for COM http : winscp.net eng docs library install registering shows on 64-bit system you generally need to register the assembly both for 32-bit and 64-bit : .. . .. . Do not add the .tbl manually to Excel .", "I m trying to get an specific files from a remote-server with FTP SFTP connection the issue that I m having is I m trying to get the count of files in the remote directory with an specific pattern .", "You ask WinSCP to download the root directory yet to exclude all directories .", "I tried using every Timeout method that is mentioned in WinSCP website .", "WinSCP will first try the private key and only if that fails it will fall back to the password .", "I use Winscp and I am ok with Duplicate Dialog box .", "2 an example of the method you implemented mapping the library class to the winscp interface ." ] }
{ "confidence": [ 128.9757843017578, 127.14934539794922, 122.30331420898438, 118.422607421875, 115.07264709472656, 114.80899047851562, 113.61224365234375, 111.17169189453125, 109.22860717773438, 109.11748504638672, 106.38717651367188, 102.52581024169922, 98.8302001953125, 98.66486358642578, 95.33699035644531, 95.2950668334961, 94.5894546508789, 94.35072326660156, 94.1898193359375, 93.39897155761719 ], "content": [ "Question : I have an SSIS package created in VS 2013 that contains a C 2012 Script Task . The job of the script task is to download a file from an SFTP server using WinSCP .NET assembly and place it on my server Windows Server 2012 R2 with SQL Server 2014 .. . .. . My package runs fine when I run it on my Dev machine but when I deploy to the server my package fails at this task with the error message .. . .. . Exception has been thrown by the target of an invocation .. . .. . enter image description here http : i.stack.imgur.com pE8V1.png .. . .. . I ve done some digging and it looks like it has something to do with the reference to WinSCPnet.dll . .. . Answer : See Installation instructions for WinSCP .NET assembly http : winscp.net eng docs library install particularly the Installing to GAC http : winscp.net eng docs library install gac section that explicitly mentions the SSIS : .. . .. . Installing to GAC .. . .. . In special cases you may need to install the assembly into Global Assembly Cache GAC particularly to use it from SSIS http : winscp.net eng docs library ssis . .. . When you install the assembly to GAC you need to configure a path to WinSCP executable http : winscp.net eng docs library install installing . .. . On Development Machine .. . .. . To install the assembly into GAC on development-machine i.e . the one that has Windows SDK http : msdn.microsoft.com en-us library ms717422.aspx installed use following command : .. . .. . .. . gacutil.exe i WinSCPnet.dll .. . .. . .. . Windows SDK comes with Microsoft Visual Studio . You can also install it separately . .. . Use correct gacutil.exe for your version of .NET framework : .. . .. . For .NET framework 4.0 use gacutil from Windows SDK 7.1 or 7.0 : C : Program Files x86 Microsoft SDKs Windows v7.1 bin gacutil.exe .. . For .NET framework 3.5 use gacutil from Windows SDK 6.0 : C : Program Files x86 Microsoft SDKs Windows v6.0A Bin gacutil.exe .. . .. . On Production or User s Machine .. . .. . To install the assembly into GAC on production or user s machine you may install the assembly into GAC using : .. . .. . Windows Installer by creating .msi package .. . Any other installer system that supports installing to GAC e.g . Inno Setup http : www.jrsoftware.org isinfo.php .. . System.EnterpriseServices.Internal.Publish.GacInstall method . PowerShell example : .. . .. . Add-Type -AssemblyName System.EnterpriseServices .. . publish New-Object System.EnterpriseServices.Internal.Publish .. . publish.GacInstall WinSCPnet.dll .. .", "Question : I m using WinSCP .NET assembly to upload files . I m using SFTP and I m unable to upload files to one of my SFTP servers . However I m able to upload to the same server when Allow SCP fallback option is unchecked . Is there any way to set this option using the API so I hope my file-upload would work WinSCP version 5.5.5 .. . Answer : The WinSCP .NET assembly always behaves like the Allow SCP fallback is unchecked . You cannot even turn the option on . So your problem must be different . .. . .. . Append session logs both from .NET assembly and GUI to get better answer .", "Question : I am trying to open file to read from SFTP using WinSCP .NET assembly as par to my exercise to archive file from SFTP to Azure blob . To upload a blob to Azure I am using .. . .. . How to get the stream from the file on SFTP server I managed using SftpClient to get the stream using the following code and it works but unfortunately not able to achieve the same using WinSCP .NET assembly . Can anyone help me how to achieve the same using WinSCP .NET assembly Because I need to connect to SFTP using username password and privatekey I am using WinSCP .NET assembly . Thanks .. . Answer : WinSCP .NET assembly Session API http : winscp.net eng docs library session cannot not provide the contents of downloaded file using streams . So all you can do is to download the remote file to a local temporary location using Session.GetFiles http : winscp.net eng docs library session getfiles and read the file from there :", "Question : I am using WinSCP to write to connect a SQL Server to an SFTP server . I am trying to write a file to an SFTP server where I only have write access not modify . I am having a problem because I get back .. . .. . Cannot create remote file xxx.filepart . The documentation suggests this is because I do not have modify access to the target directory . I did this WinSCP - Preferences - Endurance - Disable .. . I checked the winscp.ini file and ResumeSupport is 2 I believe this means disabled . I ran echo transferOptions.ResumeSupport and it says that it is in a default state . I have checked this documentation : .. . https : winscp.net eng docs ui pref resume .. . https : winscp.net eng docs library transferoptions resumesupport .. . .. . However I don t see a PowerShell example just C . I have tried various permutations of transferOptions.ResumeSupport.State Off transferOptions.ResumeSupport.Off and whatnot . One of these says that it s read-only . I know transferOptions is a variable here but it comes from the default script . The object determines transfer options transferOptions New-Object WinSCP.TransferOptions .. . .. . Thanks in advance for help .. . .. . edit : The overall problem is I only have write access to the server but not modify . I am getting a new error : Cannot overwrite remote file xxx . . It looks like the dollar signs are some sort of temp file that it s trying to create . Is there a way to disable whatever setting is causing this .. . Answer : Syntax for using enumeration in PowerShell is described in article Using WinSCP .NET assembly from PowerShell http : winscp.net eng docs library powershell enums . Enumeration values are accessed using static field syntax Namespace.Type : : Member for example WinSCP.Protocol : : Sftp . .. . .. . You can find a PowerShell example for TransferResumeSupport.State https : winscp.net eng docs library transferresumesupport state in Converting to .NET assembly http : winscp.net eng docs scriptcommand get net section of get and put command documentation : Comment : Thank you Martin WinSCP is amazing . I knew what I needed to have happen I just couldn t figure out how to articulate it . Comment : You are welcome . Though on StackOverflow we thank by accepting and or upvoting the answer http : stackoverflow.com help someone-answers .", "Question : I am using WinSCP .NET assembly to do a download and upload through SFTP with C .NET . I have the download function working but I am looking for a way to have the files in the remote-server listed or at least listed with a specific extension so user only have to choose from those files with the specific extension like .txt to get the files they want . Is there a way to do that with WinSCP .NET assembly Comment : Maybe take a look at tamirgal.com blog page SharpSSH.aspx http : www.tamirgal.com blog page SharpSSH.aspx .. . Answer : Yes you can use the RemoteFileInfo and RemoteDirectoryInfo classes to get remote file and directory details . Then depending on your requirements you can use custom logic to retrieve specific files . More info on that here http : winscp.net eng docs library .", "Question : I need to read a file from SFTP location using WinSCP .NET assembly in C . I m able to download file from SFTP location to local path and read it . But is there a way to read the file content directly without downloading to local path Below is the code used for downloading . But I see no option available to read the file content directly in WinSCP.. . something like using response stream etc.. . .. . .. . Can someone please let me know if it is possible to read file contents directly from SFTP location Thanks in advance EDIT : .. . .. . To extend the above question . Can anyone please tell me is that possible to copy files between SFTP remote location from Remote location 1 to remote location 2 in same SFTP server . Pls note : I need to Copy files not to move . .. . Answer : WinSCP .NET assembly http : winscp.net eng docs library does not support downloading remote file contents to memory . All you can do is to download the file http : winscp.net eng docs library session getfiles to a local temporary location and read it to the memory from there . Comment : Got it. . Thanks you But want to know If I can copy a file from one remote path to another remote path in same SFTP server Or do i need to copy from remote path 1 to local and again local to remote path 2 Comment : See How can I copy duplicate a file to another directory using SFTP http : stackoverflow.com q 28089821 850848 Comment : Yes. . I use Winscp and I am ok with Duplicate Dialog box . But can i do it with C code . Can you direct me to some code reference if it is possible . Comment : This is not related to this thread . Please ask a new question . And make sure you specify what mode do you use on the Duplicate dialog box . And the protocol you are using . I assume SFTP but this has to be clearly stated in the new question .", "Question : Question Can WinSCP handle Junction directory I am using C++ CLI to program a SFTP program using WinSCP .NET assembly version 5.5.3 . My program reads in a schedule file . Originally the source path for get file has to be absolute path . Now that I have to support relative-path I encounter a problem . Following is to try to get all text-files in the home-directory . Of course I want to get all text-files within all sub directories inside home-directory as well . So I use : .. . .. . Suppose we use this account terry to log in the remote computer the remote home-directory is C Users terry Documents . From the session- DebugLog file I find out WinSCP tries to go over all files and directories within the home-directory . The list is : .. . .. . WinSCP goes over each item in the list . After processing firstDirectory it tries to process My Music . However it returns an error as not able to process because of Permission Denied . I then go to the server and do a dir . I find out those 3 My directories are Junction as : .. . .. . I go over these and find out these : Topic Sync is broken http : winscp.net forum viewtopic.php t 13461 Tracker Bug 1132 http : winscp.net tracker show bug.cgi id 1132 Topic : WinSCP doesn t check hardlink target date when synchronizing http : winscp.net forum viewtopic.php t 8058 .. . .. . Are they related .. . Answer : As it s remote junction folder and SFTP protocol does not know anything about junctions it s all about your SFTP server . This has nothing to do with client WinSCP as it cannot even know it s a junction . Your SFTP server most likely simply presents the junction as a folder . Although it could also present it as a symlink to a folder but in that case WinSCP would silently skip it . Side note : All methods of WinSCP .NET assembly accept only absolute paths . You should not rely on using . Also path to remote target directory should end with slash . See http : winscp.net eng docs library session getfiles Comment : 1 Luckily user of my program says there should not be any case of getting files using wildcard e.g . .txt in the home-directory . 2 My program has to handle the relative-path So I use . 3 For path must end with slash backslash both these are successful . Case a Get file file with wildcard I use GetFiles dir name before wildcard file without ending local dir name without ending . Case b Get file file without wildcard I use GetFiles full path with file name local dir name with . For SyncDir I get correct result with no ending slash backslash .", "Question : I am using WinSCP .NET assembly to do a download and upload through SFTP with C .NET . I have the download function working but I am looking for a way to have the files in the remote-server listed or at least listed with a specific extension so user only have to choose from those files with the specific extension like .txt to get the files they want . Is there a way to do that with WinSCP .NET assembly Comment : Maybe take a look at tamirgal.com blog page SharpSSH.aspx http : www.tamirgal.com blog page SharpSSH.aspx .. . Answer : Use the Session.ListDirectories method https : winscp.net eng docs library session listdirectory : Comment : thanks I think this is what I was looking for will give it a try see if that works for me with some customization .", "Question : I wrote a application in C that uses System.IO.GetDirectoires and System.IO.GetFiles .. . .. . I now have to convert that to use SFTP . I have experience with PutFiles and GetFiles of WinSCP .NET assembly but I cannot figure out how to get a list of directories . There is a GetFiles in the winscp.exe that I can use for the files but there is no way to get the directories as far as I can tell . Does anyone have a way to do this or is there a library that is easier to work with . Comment : How are you connecting to the ftp server You ve got to show some code for us to help you . Comment : Im using SFTP Session I edited my post sorry about the bad formatting Comment : Gotcha . I added an extra tag to help this question get more attention . .. . Answer : The Session.GetFiles http : winscp.net eng docs library session getfiles of WinSCP .NET assembly downloads both files and subfolders . .. . .. . Actually you have to explicitly specify when you do not want to download them . See How do I transfer or synchronize directory non-recursively http : winscp.net eng docs faq script non recursive .. . .. . .. . .. . If you want to list subfolders in a remote directory use : .. . .. . But again you do not need to do this to download directories the Session.GetFiles does it for you .", "Question : I have to read a file content or read the file bytes and need to store in it our database . Using .NET System.IO.File we can simply call File.ReadAllBytes file . How to do it in WinSCP .NET assembly using RemoteFileInfo Comment : the question is how to open a file on a remote-server using SSH .. . Because AFAIK SCP stands for secure-copy and I don t see how you want to open a file using a program Comment : my best guess is that you want to use something like SSH.NET https : sshnet.codeplex.com this should provide SCP like functionality .. . Answer : WinSCP .NET assembly http : winscp.net eng docs library does not support downloading remote file contents to memory . All you can do is to download the file http : winscp.net eng docs library session getfiles to a local temporary location and read it to the memory from there . Comment : Thanks for your response...Its and iterative operation Comment : When I am using above appraoch it is giving me following error Can t get attributes of file WinSCP.RemoteDirectoryInfo . Comment : On what statement The remotePath must be string path . You are probably passing in some nonsense value . There s no RemoteDirectoryInfo involved in my code . It must come from other code of your own .", "Question : I m trying to get an specific files from a remote-server with FTP SFTP connection the issue that I m having is I m trying to get the count of files in the remote directory with an specific pattern . I m using a mask but is not working for me it throwing an exception : this is what I have Comment : Which exception .. . Answer : The Session.ListDirectory method http : winscp.net eng docs library session listdirectory does not accept a wildcard only a path . You have to filter the returned files yourself . See an official example Listing files matching wildcard http : winscp.net eng docs library example listing files matching wildcard in PowerShell though . .. . .. . In the latest beta version the WinSCP .NET assembly 5.8 beta you can use Session.EnumerateRemoteFiles method https : winscp.net eng docs library session enumerateremotefiles :", "Question : null .. . Answer : I have this Script that when it runs. . It says files Transfer but I go to SFTP server and there is no files . I was wondering if anyone has a working script of could help me fix mine . Does anyone have VBS Version Comment : Related to Using WinSCP .NET Assembly from WSH-hosted Active Scripting Languages https : winscp.net eng docs library com wsh jscript . Do you have the COM registered https : winscp.net eng docs library install registering Comment : Yes I do . I ran C : Windows system32 WINDIR Microsoft.NET Framwork64 v4.0.30319 RegAsm.exe WinSCPnet.dll codebase tlb Comment : ANd this C : Windows system32 WINDIR Microsoft.NET Framwork64 v4.0.30319 RegAsm.exe WinSCPnet.dll codebase tlb : WinSCPnet64.tlb Comment : Above my name where it says edited .. . ago click it to see the revision history including my edits . Here is a direct link http : stackoverflow.com posts 33420707 revisions . Comment : Code does not like it with out the job Will not let me run it .", "Question : I m using WinSCP .NET assembly library to perform some SFTP operations - downloading files from SFTP location . Do you know if method Session.GetFiles of the WinSCP library checks if file is not corrupted before downloading it - I mean the situation when someone uploads file to given folder and in the same time the WinSCP library wants to get files from this location Comment : How would it check if its corrupted its just a binary file to it . .. . Answer : No it does not . There s generally no way to test if a file is being written to over an SFTP protocol . .. . .. . File locking is supported by few SFTP servers only . Notably it is not supported by the most widespread SFTP server the OpenSSH . See also : .. . .. . SFTP file lock mechanism http : stackoverflow.com q 26932341 850848 .. . WinSCP article on Locking files while uploading https : winscp.net eng docs script locking files while uploading . Comment : What if I try to rename file before downloading and if I cant then it means that it is uploading Comment : On a typical nix system you can rename a file while it is being written to .", "Question : I am using WinSCP .NET assembly to transfer files by FTP . Couple days ago I developed new module to show pictures in PictureBox control . What I would like to achieve is to list picture s paths inside listbox or whatever else and then when click on this path to be able to open the picture in PictureBox . The point is pictures are on remote location on my FTP and I have no idea is it possible using WinSCP FTP to use get their path and then using the paths to show up given picture inside PictureBox . Anyone has idea is it possible or not .. . Answer : You have to download the file to a local temporary file and load the file to the picture box . You cannot load the remote file directly . I do not do VB.NET so the syntax may not be 100 correct Comment : not good i thought there is option in wscp net to be able to show remote picture . Ok so the only way is to list user pictures from remote folder and then when he click on something then application should download picture somewhere in temporary folder and show in picture box right Then delete. . Comment : That s correct . Comment : ok thanks for your answer Comment : one question regarding my main topic - how you doing gray color background on some text around Comment : Thanks for accepting my answer . Regarding your question about background-color : This is Q A site not a discussion forum . Ask a new question . I do not know the answer anyway .", "Question : I need to use WinSCP .NET assembly to look for text-files containing a specific word in the file name and then extract some lines from these files . I know it s probably a basic question but I ve never used neither SFTP connection nor this library before and have no idea how to start the project . I ll be thankful for any help . .. . Answer : Use Session.ListDirectory http : winscp.net eng docs library session listdirectory to retrieve a list of files in a remote directory .. . Iterate the list to find a files matching your criteria .txt Download the matched files to a local temporary file using Session.GetFiles http : winscp.net eng docs library session getfiles .. . Read the temporary file and look for the contents you need .. . .. . .. . .. . See also a similar PowerShell though example Listing files matching wildcard http : winscp.net eng docs library example listing files matching wildcard . Comment : Thank you It helped me a lot .", "Question : I have an SSIS package created in VS 2013 that contains a C 2012 Script Task . The job of the script task is to download a file from an SFTP server using WinSCP .NET assembly and place it on my server Windows Server 2012 R2 with SQL Server 2014 .. . .. . My package runs fine when I run it on my Dev machine but when I deploy to the server my package fails at this task with the error message .. . .. . Exception has been thrown by the target of an invocation .. . .. . enter image description here http : i.stack.imgur.com pE8V1.png .. . .. . I ve done some digging and it looks like it has something to do with the reference to WinSCPnet.dll . .. . Answer : You need to install WinSCPnet.dll in the Global Assembly Cache for SSIS to pick up this dependency see this blog http : microsoft-ssis.blogspot.co.uk 2011 05 referencing-custom-assembly-inside.html for further details . You can install a DLL in the GAC using the following steps see the documentation https : msdn.microsoft.com en-us library aa560649.aspx for further details : .. . .. . 1 . Copy the WinSCPnet assembly to your local computer into a folder . Start Visual Studio Command Prompt . 2 . Type the following command : gacutil.exe if .. . 3 . This installs the assembly to the GAC overwriting any existing assembly that has the same assembly name . Comment : would the .dll not being in the GAC stop the package from running in Visual Studios Comment : i just installed gacutil on the server and ran the l WinSCPnet command and it turns out the .dll is already installed on the GAC so the issue must be something else", "Question : I am downloading files from FTP using WinSCP .NET library . My code is .. . .. . What I want s is to check file is not in use on FTP location before downloading it . Any idea what interface I should use . .. . Answer : There s no way to test if file is in use over FTP protocol . Not only with WinSCP .NET assembly but in general . .. . .. . So all you can do is to try do download the file and gracefully handle any failure . Comment : Wow . Answer from the author himself . Thanks Martin Comment : Martin Any idea what particular type of exception i should catch to avoid error . I am downloading multiple-files in a foreach loop . I have a single catch which will break the other downloading . Comment : Just do not call the .Check method and your do not get any exception . If you want to test use .IsSuccess property . See TransferOperationResult Class https : winscp.net eng docs library transferoperationresult .", "Question : I wrote a class that is using C WinSCP .NET assembly . The class is saving a WinSCP Session as a field and when I call function Start the class initializes a WinSCP Session and opens it and then repeatedly calls Session.GetFiles every 2 seconds . I want to handle every exception case in my class and there is one case I can t get an exception . The case is : I run my class it connects to the FTP server and starts repeatedly looking for files to download listing which is happening in Session.GetFiles . After a few times it calls GetFiles I shut down the FTP server . The next time GetFiles is called the program gets stuck on a blocking method GetFiles which is waiting for the server to be up again . Only after 1.5-2 minutes it throws a SessionRemoteException with the message : No connection could be made because the target machine actively refused it . .. . .. . I want this to be thrown after 10 seconds of blocking and not random 1.5-2 minutes . I tried using every Timeout method that is mentioned in WinSCP website . .. . Answer : You need to set Session.ReconnectTime http : winscp.net eng docs library session properties . It defaults to 120 seconds .", "Question : null .. . Answer : I m trying to upload a folder content that contains other directories with files in them and some files without directories . The connection to the server is over sftp . When the sub-directory doesn t exist already in the destination I get a permission-denied error-code 3 exception . But my user has all the permissions . when I connect to the server with the winscp exe I can manually upload directories to the server that didn t exist before without any error or exception . Any idea how to fix it Thanks . Comment : Show us a session log file both using .NET assembly Session.SessionLogPath and GUI .", "Question : As I am working on a .NET C project which uses WinSCP .NET assembly for SFTP password less connection . By far I have made an UI where we have to provide SSH key fingerprint paraphrase and path of .ppk file . My question is that is there any way to get SSH key fingerprint automatically through code if the user gives its .ppk file path only .. . Answer : The .ppk is a key pair of your account and you specify that using the SessionOptions.SshPrivateKeyPath https : winscp.net eng docs library sessionoptions sshprivatekeypath . While the host key for SessionOptions.SshHostKeyFingerprint https : winscp.net eng docs library sessionoptions sshhostkeyfingerprint is for key pair of the server host . It s not a public-key of your key pair . These key pairs have nothing in common . You cannot extract one from another . For details see Understanding SSH key pairs https : winscp.net eng docs ssh-keys . See also Where do I get SSH host key fingerprint to authorize the server https : winscp.net eng docs faq hostkey .. . .. . .. . .. . If you want to allow the user to verify the host key manually use the Session.ScanFingerprint method https : winscp.net eng docs library session scanfingerprint to retrieve the fingerprint for verification WinSCP .NET assembly 5.8.2 and newer only . Once verified assign the verified fingerprint to the SessionOptions.SshHostKeyFingerprint . For an example see Implementing SSH host key cache known hosts https : winscp.net eng docs library example known hosts . Comment : ok but when i connect using winscp desktop application i need to provide .ppk file path user name and paraphrase only . But while coding i have to provide SshHostKeyFingerprint . So what should i do if i want to replicate the functioning of winscp desktop application Please help . Comment : That s not true . When you connected with WinSCP for the first time to a specific host server WinSCP asked you to confirm if you trust the server s host key . Comment : yes but please help me to replicate this in my code . Comment : ok i think in my UI there will be no imporvement and user still have to enter ssh keyfingerprint . Comment : @PranayDeep The Session.ScanFingerprint https : winscp.net eng docs library session scanfingerprint is available now ." ] }
[ "yes-answer-long", "yes-answer-short" ]
interface
UNK_RELATION
boost-bind@std@100
boost-bind -- boost : : bind is a generalization of the standard c++ functions std : : bind1st and @placeholder : : bind2nd .
{ "confidence": [ 59.29801940917969, 54.610130310058594, 54.463680267333984, 49.981109619140625, 49.614463806152344, 49.426326751708984, 47.96311950683594, 47.812416076660156, 47.7554931640625, 47.58867645263672, 46.55012130737305, 46.487213134765625, 46.487213134765625, 46.487213134765625, 46.47762680053711, 46.47762680053711, 45.64264678955078, 45.03673553466797, 45.03673553466797, 45.03673553466797, 43.91570281982422, 43.33171844482422, 43.309791564941406, 43.294376373291016, 43.2459602355957, 43.2366943359375, 42.797386169433594, 42.79491424560547, 42.794105529785156, 42.73447799682617, 42.73447799682617, 42.35236358642578, 42.288063049316406, 41.853485107421875, 41.6136360168457, 41.505489349365234, 41.498077392578125, 41.35402297973633, 41.35402297973633, 41.35402297973633, 41.284000396728516, 41.284000396728516, 40.846893310546875, 40.588897705078125, 40.12654113769531, 39.919681549072266, 39.886688232421875, 39.886688232421875, 39.886688232421875, 39.778541564941406, 39.778541564941406, 39.6270751953125, 39.6270751953125, 39.60296630859375, 39.60296630859375, 39.60296630859375, 39.335693359375, 39.2188606262207, 38.7303466796875, 38.209495544433594, 38.209495544433594, 38.20146942138672, 38.03153610229492, 37.86090087890625, 37.86090087890625, 37.85352325439453, 37.834320068359375, 37.834320068359375, 37.834320068359375, 37.679054260253906, 37.679054260253906, 37.601287841796875, 37.468544006347656, 36.79175567626953, 36.7529296875, 36.7529296875, 36.7529296875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.3934326171875, 36.2543830871582, 36.16362762451172, 35.941322326660156, 35.407257080078125, 35.1156120300293, 34.81349182128906, 34.79833221435547, 34.727142333984375, 34.71717834472656, 34.66648483276367, 34.66648483276367, 34.66648483276367, 34.66648483276367 ], "content": [ "It s not possible because neither bind1st nor bind2nd overloads operator like bind does to yield another functor .", "I think the story is though I m not old enough to tell the whole story boost : : bind was first created to replace the hard-to-use bind1st bind2nd in C++98 and it achieves its goal and now part of C++11 .", "Just for better understanding can I replace the call to boost : : bind in the following example with std : : bind1st 2nd", "That is using boost : : mem fn instead of boost : : bind provides a workaround but that is completely orthogonal to the change from std : : for each to boost : : for each .", "I have tried using boost : : lambda : : bind and boost : : bind as well .", "std : : any of v.begin v.end boost : : bind std : : set int : : find s boost : : lambda : : 1 s.end", "How can I use boost : : bind with std : : min element for this", "Generally it is not possible nor desirable to extract the object used as an argument to boost : : bind or std : : bind back from the result-of the bind .", "That will also work with boost : : lambda : : bind .", "The implementation of boost : : bind is going to be replaced with that of boost : : phoenix : : bind in the future .", "Perhaps boost : : lamda : : bind is smarter than boost : : bind in deducing return types", "boost : : bind handles boost : : shared-ptr the same way as raw pointers .", "boost : : thread boost : : bind Function q gives me 7 temporaries .", "As a bonus question : are there any simple introductory reads on boost : : bind and boost : : function", "Be aware that boost : : bind causes a copy of the functor .", "See boost : : bind documentation about ref and cref .", "I suspect boost : : bind has not been upgraded for C++11 .", "+1 This is the correct answer boost : : bind is completely unrelated .", "Try this : .. . .. . test func boost : : bind test.foo 1", "2 express the result-of the bind as boost-function .", "FYI there is never a reason to use boost : : bind since C++11", "When boost : : bind MyClass : : f c is assigned into boost : : function void const double did that bind another extra argument of type double around it inside boost : : function assign", "boost : : bind returns a Functor not a function pointer .", "@Simple : It s deep down in the implementation of std : : tr1 : : bind that an unqualified call to ref is made with a boost : : any as a parameter .", "The standard function and bind are based on and for the most part compatible with the Boost versions .", "This answer is orthogonal to the question it replaces the std : : for each loop by boost : : for each but does not tell how to use boost : : bind as argument to either .", "You say The implementation of boost : : bind is going to be replaced with that of boost : : phoenix : : bind in the future .", "boost : : bind does not make a copy of the functor but it does make a copy of parameters .", "i am facing problems combining boost : : function with boost : : bind and boost : : asio .", "Also is it true that boost : : phoenix is a superset of boost : : bind booost : : lambda libraries", "Also is it true that boost : : phoenix is a superset of boost : : bind booost : : lambda libraries", "Is it possible to bind arguments to a function template with boost-bind http : www.boost.org doc libs 1 47 0 libs bind bind.html", "In general .. . .. . bind expressions are pretty lightweight the compiler would usually inline the whole shebang .. . bind expressions do copy their bound parameters but this is easily mitigated doing boost : : bind MyClass : : fpp boost : : ref object .. . boost : : function and std : : function are ideally suited to storing bound expressions : .. . .. . boost : : function void stored bind .. . boost : : bind MyClass : : fpp boost : : ref object", "You don t need std : : mem fun ref just use : .. . .. . or you could replace boost : : bind with", "@Carl - also notice that boost : : mem fn is easier to use than boost : : bind in this case", "I want to use boost : : bind to create a boost : : function inserting a new key-value pair into a boost : : unoredered map but I got few compilation errors .", "It should be noted that function and bind have made it to C++11 standard and are now std : : function std : : bind and std : : placeholders : : n .", "For 1 I tried boost : : bind Foo : : f1 1 2 hello .", "The result-of boost : : bind is an unspecified type which will depend on the parameters .", "i.post boost : : bind Function q gives 6 temporaries .", "Boost : : bind is very limited in functionality by design .", "I bind it to a boost-function and I can use it .", "boost : : ref and boost : : cref can be used to make the function object store a reference to an object rather than a copy : int i 5 .. . .. . bind f ref i 1 .. . .. . bind f cref 42 1", "For example boost : : mem fn http : www.boost.org doc libs 1 53 0 libs bind mem fn.html could be used in-place of boost : : bind http : www.boost.org doc libs 1 53 0 libs bind bind.html .", "The point is that boost : : bind eth array : : get 0 1 still doesn t work in the std : : for each even using the .", "As for how boost : : function and boost : : bind can be used to provide a solution : .. . .. . Update : .. . .. . Finally regarding a tutorial : I found this http : www.newty.de fpt index.html useful when learning about functors which is what boost : : function is and boost : : bind returns in the past .", "So if boost : : bind or boost : : function have some way of getting around this problem that would also help .", "I am trying to encapsulatie boost : : signal and boost : : bind into my own Event class .", "Can I use boost : : bind or the boost-lambda library to create a functor that ignores its arguments and always returns a constant", "I can see that there are two different bind libraries for Boost one standalone that can be used by including boost bind.hpp and another by including boost-lambda bind.hpp .", "Also I made this to try and understand how to use boost : : function and boost : : bind but I will definitely look into boost : : asio thanks", "It won t even build as boost : : bind does not return a function pointer .", "callbackInfo SENDERTYPE ARG tmp boost : : bind x that 1 2", "Does anyone know how to bind a member function of a managed class using boost : : bind", "The magic of boost : : bind is done at compile-time you don t pay for extra CPU cycles to bind it again .", "I believe that the first bind operation should also use the placeholder eg : boost : : bind myPrinter someText 1", "Does boost : : bind bind binds extra arguments as it seems passing a bind function with no arguments into one expecting an argument double works fine", "So C++03 + TR1 it is . .. . .. . We somewhere have a function like this : .. . .. . which is then later used in a bind expression : .. . .. . This generates the following error : .. . .. . error : call of overloaded ref const boost : : any is ambiguous .. . note : candidates are : std : : tr1 : : reference wrapper Tp std : : tr1 : : ref Tp with Tp const boost : : any .. . note : const boost : : reference wrapper boost : : ref T with T const boost : : any .. . .. . I do understand that this is Koenig lookup hitting us .", "There is a similar question at boost : : bind and boost : : phoenix : : bind http : stackoverflow.com questions 1278158 what-is-the-difference-between-boostbind-and-boost-phoenixbind .. . .. . But if anyone can explain this with examples it would be great .", "Can I use boost : : bind mycallback this 1 2 across C code", "I assume you want to use whatever boost : : bind returns as a callback function for a C library", "Is there a way that I can use boost : : bind to bind elements from the vector to find from the unordered-set so that I don t have to write the predicate class", "If you re using C++0x the simplest way to name the result-of a call to bind is to use auto : .. . .. . Another simple way not restricted to C++03 is simply to not name the result but to use it on the spot : .. . .. . Or you can use type-erasure to store the result-of boost : : bind into a boost : : function which you seem to be familiar with .", "I m trying to achieve something with boost : : bind boost : : function but can t make it work .", "In addition you also have some redundant calls to boost : : bind and boost : : function .", "So I am trying to work it out with a Boost library : .. . .. . When I try to compile it unfortunately I am forced to use quite old software - gcc 4.4.7 boost 1.41 therefore C++11 support is very limited : .. . .. . compilation fails with this error : .. . .. . boost regexp.cpp : In function int main int char : boost regexp.cpp : 58 : error : ambiguous overload for operator in resolver boost : : assign : : map list of const Key const T with Key boost : : regex T boost : : bi : : bind t void void boost : : bi : : list0 const boost : : bi : : bind t void void boost : : bi : : list0 const boost : : bi : : bind t void void boost : : bi : : list0 boost : : bind with R void SuOpenedCallback .boost : : assign detail : : generic list T : : operator with U boost : : regex U0 boost : : bi : : bind t void void boost : : bi : : list0 T std : : pair boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : bi : : bind t void void boost : : bi : : list0 const boost : : regex const boost : : regex su closed const boost : : bi : : bind t void void boost : : bi : : list0 const boost : : bi : : bind t void void boost : : bi : : list0 boost : : bind with R void SuClosedCallback usr lib gcc x86 64-redhat-linux 4.4.7 . . . . . . . . include c++ 4.4.7 bits stl map.h : 251 : note : candidates are : std : : map Key Tp Compare Alloc std : : map Key Tp Compare Alloc : : operator const std : : map Key Tp Compare Alloc with Key boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Tp boost : : function void Compare std : : less boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Alloc std : : allocator std : : pair const boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : function void usr lib gcc x86 64-redhat-linux 4.4.7 . . . . . . . . include c++ 4.4.7 bits stl map.h : 266 : note : std : : map Key Tp Compare Alloc std : : map Key Tp Compare Alloc : : operator std : : map Key Tp Compare Alloc with Key boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Tp boost : : function void Compare std : : less boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Alloc std : : allocator std : : pair const boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : function void usr lib gcc x86 64-redhat-linux 4.4.7 . . . . . . . . include c++ 4.4.7 bits stl map.h : 286 : note : std : : map Key Tp Compare Alloc std : : map Key Tp Compare Alloc : : operator std : : initializer-list std : : pair const Key Tp with Key boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Tp boost : : function void Compare std : : less boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Alloc std : : allocator std : : pair const boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : function void make : all Error 1 .. . .. . Seems like my problem is close to this one http : stackoverflow.com questions 13125924 using-boostassign-with-a-stdset-nested-inside-a-stdmap however it does not inspire me .", "I would just like to know what costs implies the use of boost : : bind .", "See boost : : bind documentation about ref and cref for versions that do not copy parameters .", "I think it fails because I have not understood how boost-bind works .", "There is a directly related question here : Can I use boost-bind with a function template http : stackoverflow.com questions 7039474 can-i-use-boost-bind-with-a-function-template .", "I dont know how to write the signature of Subscribe and What to pass into boost : : bind ideally I will have boost : : bind MyClass : : MyHandler MyClassObject in Subscribe function and will Call it outside like MyEventObject.Subscribe MyClass : : MyHandler MyClass .", "I am trying to generate the helper function directly with boost : : bind .", "Other information : .. . .. . This is basically identical to the unanswered boost forum question from 6 years ago : http : lists.boost.org boost-users 2004 07 7125.php .. . Some reading suggests that using boost : : lambda : : bind with boost : : lambda : : unlambda and boost : : lambda : : protect may do what I m seeking .", "Yes and thus that still leaves the question of how can bind map void MyClass : DoSomething std : : string str int number to boost : : function void int via bind MyClass : : DoSomething instance Hello World 1", "I am trying to use boost : : bind and STL with boost : : tuple but each time I try to compile I get the following error .", "I am wondering if there is any solution for this http : stackoverflow.com questions 26910758 c98-valid-use-of-for-each-in-the-code using boost : : for each and boost : : bind .", "I have a simple thread pool implementation using boost : : function and boost : : bind to reduce the member function signature to void func void .", "I would love to have a boost : : bind that handles QPointers as raw pointers pointer .", "The issue is pretty much whether boost : : bind has an effect on the member nonmember nature of the function it works on .", "boost : : bind foo : : DoSomething 1 in1 in2 should work out of the box .", "Why code test func boost : : bind test t : : foo test 1 compiles in test t : : test and gives me the error in main", "Take a look at stackoverflow.com questions 2304203 http : stackoverflow.com questions 2304203 how-to-use-boost-bind-with-a-member-function", "Since you are using bind and want to call function with one argument it should be just boost : : function void int .", "The result-of boost : : bind is not a pointer to member so func1 cannot be initialized as such on the second line .", "I know I want to use BOOST bind and or function but I haven t really grasped the concept to it yet .", "boost : : bind is a very special function that deduces the arguments you pass into it and creates a functor for you .", ": - Strangely using boost : : lamba : : bind will compile without explicitly specifying the return-type .", "boost : : bind generates a functional object which can be optimized out if it is used as argument to function-templates but boost : : function prevents this optimization just like passing a pointer to a function will prevent its inlining .", "The error starts with : .. . .. . error C2780 : boost : : bi : : bind t bi : : dm result : : type boost : : mfi : : dm bi : : list av 1 : : type boost : : bind M T : : A1 : expects 2 arguments - 3 provided", "I d be interested to see what std : : bind does .", "To start with simply replace boost with std and include the C++ header functional instead of the Boost headers .", "Change the namespace from boost to std", "By the way your use of boost : : assign : : map list of in your boost : : bind call is wrong as you actually call the map list of function passing its result as the function to call which of course will give you errors .", "Why does valgrind s DRD tool complaines Conflicting load by thread .. . at size 4 : about such code : .. . .. . Does boost : : bind stores values by reference", "How do I need to setup my boost : : function to take a function object from boost : : bind that has the instance object set as a placeholder", "Yes you can use boost : : bind to create a suitable functor with a placeholder for the functor s parameter : .. . .. . In modern C++ I d prefer a new-style loop", "I don t think so only because boost : : bind in this case is looking for a function pointer not a function template .", "I have a long list of error regarding boost : : bind which I don t understand moreover it is multiple pages long .", "This is also indicated here http : www.radmangames.com programming how-to-use-boost-bind section Binding a template function .", "I would like to do the call to boost : : bind once and then reuse whatever it returned on subsequent call to the create function ." ] }
{ "confidence": [ 95.72515106201172, 68.42324829101562, 58.33396530151367, 55.73222732543945, 55.304569244384766, 54.96086120605469, 54.87687301635742, 54.54161834716797, 53.80815124511719, 53.67744445800781, 53.307621002197266, 52.847774505615234, 52.408084869384766, 52.16969299316406, 52.01026153564453, 51.42595291137695, 51.412593841552734, 50.72476577758789, 50.69743347167969, 50.477760314941406 ], "content": [ "Question : Just for better understanding can I replace the call to boost : : bind in the following example with std : : bind1st 2nd Or is it not possible because of returning a reference Example shortened : .. . Answer : It s not possible because neither bind1st nor bind2nd overloads operator like bind does to yield another functor . If you don t want to use bind you need to write the functor yourself or use a lambda . Comment : Thanks . After measuring using a function object turns out to be fastest for the target system any way .", "Question : I am trying to understand the difference between these different bind approaches . There is a similar question at boost : : bind and boost : : phoenix : : bind http : stackoverflow.com questions 1278158 what-is-the-difference-between-boostbind-and-boost-phoenixbind .. . .. . But if anyone can explain this with examples it would be great . Also is it true that boost : : phoenix is a superset of boost : : bind booost : : lambda libraries Comment : C++11 also has lamba built-in to the language . Latest Visual Studio and g++ support it . You should add that to the mix Comment : I think the point here is to differentiate various approaches provided by boost for binding not enlisting all lambdas available . Comment : The answer to the duplicate you linked to perfectly answers this question too . .. . Answer : I think the story is though I m not old enough to tell the whole story boost : : bind was first created to replace the hard-to-use bind1st bind2nd in C++98 and it achieves its goal and now part of C++11 . But also as last 10 years saw the rise of functional-programming style in C++ boost : : lambda pushes it so far at the time it was created that it supports a reasonably wide set of functional constructs with pure library approach in C++ . And then as I know from the news group the author of boost : : lambda and boost : : phoenix try to combine the two libraries as they deal with virtually the same problem . I guess that was the beautifully designed boost : : phoenix2 .. . .. . And then there comes boost : : proto which is a libary for writing expression-templates or I d say it s a meta-library . So the phoenix nirvana again reborn itself on boost : : proto then we see phoenix3 . I think phoenix3 is the most powerful among all above . On the other hand C++11 adds language support for lambda expression which I personally find very useful and handy . The only drawback is it s not polymorphic while phoenix3 allows creating polymorphic function objects . As a conclusion that I come with personal experience C++11 lambda expression is the choice for daily job if available . It s handy clear and compile-time friendly . Phoenix3 is polymophic very powerful very cool with the drawback of long compile-time . Comment : Good answer but two small nits . : - 1 The author of Boost.Lambda has made no direct contributions to any version of Phoenix only influence . 2 Phoenix v3 s compile times are actually faster than Boost.Lambda s if you only include the minimal required headers .", "Question : I want to be able to bind Foo.f1 s s1 without an instance of foo to create in essense .. . .. . Then I pass func1 and func2 as parameters to other functions inside which Foo is finally bound : .. . .. . Questions : Is this possible If yes 1 how to achieve it 2 What s the declaration of MyFooFunc Comment : It depends on SomeOtherFunction is declared . Note that your second typedef is not a function pointer it s pointer-to-member-function PTMF which is an entirely different and incompatible concept . Wrapping everything in std : : function or std : : tr1 : : function or boost : : function would probably be the most powerful solution . Comment : There are actually two issues here : 1 binding PTMF without an instance . 2 express the result-of the bind as boost-function . For 1 I tried boost : : bind Foo : : f1 1 2 hello . That didn t work . For 2 I suspect it s boost : : function int boost : : shared-ptr Foo int . .. . Answer : The result-of boost : : bind is not a pointer to member so func1 cannot be initialized as such on the second line . The result-of boost : : bind is an unspecified type which will depend on the parameters . If you re using C++0x the simplest way to name the result-of a call to bind is to use auto : .. . .. . Another simple way not restricted to C++03 is simply to not name the result but to use it on the spot : .. . .. . Or you can use type-erasure to store the result-of boost : : bind into a boost : : function which you seem to be familiar with . boost : : function double Foo int is a possibility but not the only choice . .. . .. . We now need to find the appropriate signature for SomeOtherFunction : again a pointer to member can t be initialized from the result-of a call to boost : : bind so void SomeOtherFunction MyFooFunc func won t work . You can make the function a template instead : .. . .. . If a template is not preferrable then you must use some kind of type-erasure such as again boost : : function . once again other boost : : function types are possible depending on details such as passing a ref-to-const as opposed to a ref-to-non-const Comment : Perfect thanks .", "Question : I have std : : map int std : : pair short float and I need to find the minimal short in this map . How can I use boost : : bind with std : : min element for this boost : : lambda .. . Answer : Of course somebody s going to complain that this is an abuse of STL and that these are extensions not in the C++ standard Comment : Well I would complain about nonstandard extensions but as far as STL abuse goes I think it s perfectly fine : +1 . Luckily the nonstandard bits are easy to write yourself .", "Question : I have std : : map int std : : pair short float and I need to find the minimal short in this map . How can I use boost : : bind with std : : min element for this boost : : lambda .. . Answer : The map iterator will give you a pair where first is the int key and second is the map s pair value so if you had an iterator it you d want the minimum of all the it- second.first values . The min element function expects a comparison function for its third argument so you need to build a comparison function that projects second.first of its two arguments . We ll start with some typedefs to make the code more readable : .. . .. . We re going to use Boost.Lambda for its overloaded operators allowing us to use operator . Boost.Bind can bind member variables as well as member-functions so we ll take advantage of that too . That will also work with boost : : lambda : : bind .", "Question : I am a new beginner with boost . And here is my test code .. . .. . build the project and yield an error : .. . .. . error C2665 : boost : : lambda : : function adaptor : : apply : none of the 2 overloads could convert all the argument types .. . .. . I wonder what s wrong Really appreciate . Comment : What are you trying to do with the strings in vector Comment : bind and lambda both have placeholders 1 bind in anonymous namespace lambda in lambda namespace . try not using entire boost : : lambda namespace .. . Answer : The first problem is that std : : vector : : push-back is an overloaded function in C++0x there is an overload with an lvalue reference parameter and an overload with an rvalue-reference parameter . The second problem is that the types of Standard Library member-functions are unspecified : implementers are permitted to add extra parameters with default-arguments to member-functions and they are permitted to add additional overloads of member-functions so any casting that you do would not be portable . The disambiguation example assumes that we ignore this second problem . You will need to cast the pointer-to-member-function to the correct type otherwise this won t work with a C++0x library implementation the pointer-to-member-function will be ambiguous . You ll need : .. . .. . Using the C++0x functional library the following works it should work with Boost as well if you replace std : : with boost : : I just can t test that : .. . .. . Note that this is a real mess and it s much clearer just to use a for-loop : .. . .. . Or if you have a compiler that supports lambda expressions : .. . .. . Or for more fun : Comment : Thanks the application works but I am a little confused with this code : void std : : vector int : : const int std : : vector int : : push-back . I need to learn more about that . Comment : @user : std : : vector int : : push-back takes the address of the named member function . The part that precedes it is a cast just as-if you had said int 3.0 which casts the double value 3.0 to type int . In this case we are casting to the type pointer to a function that is a member of std : : vector int and that takes one argument of type const int and returns void . Comment : Aha I see . thanks a lot Comment : I tried lambda expressions std : : for each strings.begin strings.end const std : : string s sizes.push back s.size and std : : transform .. . but yielded syntax-error : so I missed some header file or other reasons Comment : @leo : Your compiler may not support lambda expressions . The latest versions of Visual C++ Intel C++ and g++ all support them .", "Question : I ve got a map that stores a simple struct with a key . The struct has two member-functions one is const the other not . I ve managed calling the const function using std : : for each without any problems but I ve got some problems calling the non-const function . The call to the const member function works fine but it seems boost internally expects a const MyStruct somewhere and thus fails with the following compilation error in MSVC7.1 . boost-bind mem fn template.hpp 151 : error C2440 : argument : cannot convert from const MyStruct w64 to MyStruct const .. . .. . I d appreciate any help on how to set the template parameters correctly so bind does recognize the parameters correctly and let me call the non const function . thanks Carl Comment : How about if you back up and tell us what you re really trying to accomplish here Using for each with a map with boost : : bind might be reasonable but chances are pretty good that a different general approach will work better many times this kind of question arises it s because std : : for each is a poor choice for the situation and something like std : : copy or std : : accumulate would do the job much more simply . Comment : The MyStruct is used in a sort of particle-system where MyStruct is the particle . The const function is a draw function the non-const function computes the new position . The key in the map is the creation date . Anyway at the point I posted the question it was more about how to make that work than if this was a good design in the beginning . .. . Answer : IIRC Boost.Bind uses boost : : mem fn for its binding to members capability . Now if you look at mem fun http : www.boost.org doc libs 1 42 0 boost-bind mem fn.hpp scroll down to the data member support part you ll see that it typedefs its result type as a const while is still has overloads of the function-call operator supporting the extraction of a non-const member from a non-const argument . It thus seems that the problem is that this confuses Boost.Bind s return-type deduction mechanism . A solution would thus to explicitly tell Bind that the result is not const : Comment : +1 Nice detective work . : - Strangely using boost : : lamba : : bind will compile without explicitly specifying the return-type . Perhaps boost : : lamda : : bind is smarter than boost : : bind in deducing return types Comment : Wow thank you very much . That compiles just fine . Though I love to use Boost it s still quite hard for me to read most of their code so I failed . Thanks for your help . Comment : I think you mean boost : : mem fn Comment : @Manuel : Indeed . Fixed thanks .", "Question : I have some pretty basic test code . I have a class that just logs all operations on it . I bound it to a boost : : function object like this : .. . .. . I expect that the function object contains a copy of f . So creating at least one copy is mandatory . However I find that I get 13 temporaries . Output is : .. . .. . I can t use ref or cref because I do need it to make a copy of the object . Am I doing something horribly wrong Or do I need to use a wrapper like boost : : shared-ptr to avoid an absurd number of copies Full code and problem demonstration can be found on Codepad http : codepad.org DbOAjT2H . Comment : I d be interested to see what std : : bind does . Comment : Is this in debug or release Comment : @NicolBolas Just compiling with g++ no special flags or options except -O2 . Tried with and without c++11 no difference . Comment : @chris : With std : : function and std : : bind only two temporaries http : ideone.com 1aZ3VF are created . Comment : I suspect boost : : bind has not been upgraded for C++11 . .. . Answer : If you remove the func assignment part the number of copies are lowered to 4 which is quite better than 13 . So the solution is simple - don t use boost : : function Comment : boost : : thread boost : : bind Function q gives me 7 temporaries . Comment : i.post boost : : bind Function q gives 6 temporaries . Comment : hum yes in such case I think you were right to consider a shared-ptr if the object you are posting is not small enough to be faster passed by value or if you do not need too many of them . Test performance . Comment : I think you are right the solution is to avoid boost : : function if it all possible . If you can t understand the costs . Or go to c++11x", "Question : My question is pretty straightforward : can I do something like this Say class foo contains the following member function : .. . .. . Using foo : .. . .. . So is this possible The issue is pretty much whether boost : : bind has an effect on the member nonmember nature of the function it works on . I reckon I can t go about it the other way around like this : .. . .. . because std : : mem fun ref takes a unary or nullary function and DoSomething is binary . Comment : If you re going to use Boost Bind wouldn t you want to use Boost.Function http : www.boost.org doc libs 1 49 0 doc html function.html with it Comment : What version of Boost are you using boost : : bind foo : : DoSomething 1 in1 in2 should work out of the box . As is documented http : www.boost.org doc libs 1 49 0 libs bind bind.html with member pointers . Same goes for boost : : phoenix : : bind since Boost.Phoenix is supposed to be the superior alternative to Boost.Lambda which is supposed to be the superior alternative to Boost.Bind and so on . .. . Answer : You don t need std : : mem fun ref just use : .. . .. . or you could replace boost : : bind with Comment : Cool I guess I m still only getting to know the power of the boost library . Thanks", "Question : I ve got a map that stores a simple struct with a key . The struct has two member-functions one is const the other not . I ve managed calling the const function using std : : for each without any problems but I ve got some problems calling the non-const function . The call to the const member function works fine but it seems boost internally expects a const MyStruct somewhere and thus fails with the following compilation error in MSVC7.1 . boost-bind mem fn template.hpp 151 : error C2440 : argument : cannot convert from const MyStruct w64 to MyStruct const .. . .. . I d appreciate any help on how to set the template parameters correctly so bind does recognize the parameters correctly and let me call the non const function . thanks Carl Comment : How about if you back up and tell us what you re really trying to accomplish here Using for each with a map with boost : : bind might be reasonable but chances are pretty good that a different general approach will work better many times this kind of question arises it s because std : : for each is a poor choice for the situation and something like std : : copy or std : : accumulate would do the job much more simply . Comment : The MyStruct is used in a sort of particle-system where MyStruct is the particle . The const function is a draw function the non-const function computes the new position . The key in the map is the creation date . Anyway at the point I posted the question it was more about how to make that work than if this was a good design in the beginning . .. . Answer : If you find yourself having to do this a lot I recommend you use the Boost.RangeEx library : .. . .. . It s been accepted into Boost but it doesn t come with the official distribution yet . Until it does you can download it http : www.boostpro.com vault index.php action downloadfile filename range ex.zip directory Algorithms from the Boost Vault http : www.boostpro.com vault index.php direction 0 order directory Algorithms download link-to zip file . Comment : That looks a lot more readable and understandable than the bind solution . It s definitely worth a closer look . Thanks for the tip . Comment : @Carl - also notice that boost : : mem fn is easier to use than boost : : bind in this case Comment : This answer is orthogonal to the question it replaces the std : : for each loop by boost : : for each but does not tell how to use boost : : bind as argument to either . Even so it does provide a workaround . Comment : @David - I think the workaround is the best solution here . People trying to do overly complex things with bind remind me of that saying about regular expressions : some people when confronted with a problem.. . Comment : Yes but the workaround is using mem fn not the for each change . That is using boost : : mem fn instead of boost : : bind provides a workaround but that is completely orthogonal to the change from std : : for each to boost : : for each .", "Question : Suppose I have the following containers : .. . .. . And say I want result to look something like : .. . .. . I would like to use an STL algorithm I think either transform or for each should be ok . For transform I have the code : .. . .. . But this yields a compile error along the lines of no type named result type in class boost : : assign detail : : generic list int .. . .. . For for each I have the code : .. . .. . But this yields a compile error which is in summary : no match for call to boost : : mfi : : dm int std : : vector int std : : vector int boost : : assign detail : : generic list int .. . .. . What is the correct way to do this Please note that I can not use C++11 and I would like to use boost-bind in conjunction with an STL algorithm just for the sake of learning more about boost : : bind . .. . .. . WRT @Joachim s comment about calling map list of I made the following modification : .. . .. . Which yields the compile error : cannot convert boost : : assign : : map list of type to type std : : map int const std : : basic string int Comment : By the way your use of boost : : assign : : map list of in your boost : : bind call is wrong as you actually call the map list of function passing its result as the function to call which of course will give you errors . .. . Answer : Try this : Comment : You should probably use forward slashes in your includes .", "Question : I dislike having magic boxes scattered all over my code...how exactly do these two classes work to allow basically any function to be mapped to a function object even if the function has a completely different parameter set to the one im passing to boost : : bind .. . .. . It even works with different calling conventions i.e . member methods are thiscall under VC but normal functions are generally cdecl or stdcall for those that need to be compatible with C . Comment : Dupe : stackoverflow.com questions 112738 http : stackoverflow.com questions 112738 how-does-boost-bind-work-behind-the-scenes-in-general Comment : not really - this question is about bind and function Comment : Yes and thus that still leaves the question of how can bind map void MyClass : DoSomething std : : string str int number to boost : : function void int via bind MyClass : : DoSomething instance Hello World 1 Comment : 20 000 visits holy cow this needs to be on the boost front page .. . Answer : boost : : function allows anything with an operator with the right signature to be bound as the parameter and the result-of your bind can be called with a parameter int so it can be bound to function void int . This is how it works this description applies alike for std : : function : .. . .. . boost : : bind klass : : member instance 0 1 returns an object like this .. . .. . where the return-type and int are inferred from the signature of klass : : member and the function pointer and bound parameter are in fact stored in the object but that s not important .. . .. . Now boost : : function doesn t do any type checking : It will take any object and any signature you provide in its template parameter and create an object that s callable according to your signature and calls the object . If that s impossible it s a compile error . boost : : function is actually an object like this : .. . .. . where the return-type and argument type are extracted from Sig and f is dynamically allocated on the heap . That s needed to allow completely unrelated objects with different sizes bind to boost : : function . function impl is just an abstract-class .. . .. . The class that does all the work is a concrete class derived from boost : : function . There is one for each type of object you assign to boost : : function .. . .. . That means in your case the assignment to boost-function : .. . .. . 1 . instantiates a type function impl concrete void int unspecified type that s compile-time of course .. . 2 . creates a new object of that type on the heap .. . 3 . assigns this object to the f member of boost : : function .. . .. . When you call the function object it calls the virtual function of its implementation object which will direct the call to your original function . DISCLAIMER : Note that the names in this explanation are deliberately made up . Any resemblance to real persons or characters .. . you know it . The purpose was to illustrate the principles . Comment : so is the contents of struct unspecified type ie the code in the operator function basicly generated from the arguments past to boost : : bind on a case by case bases to allow any combination and number of arguments Comment : No there are templates of operator that handle all arities and different template arguments handle the combinations Comment : In the last code block it reads : arg0 const 0 return.. . .. . I ve never seen that before . I found one non-functioning example in a forum where a followup message linked to the C++ faq explaining that a pure-virtual function could have a body but I can t get any code to compile using syntax like that clang gcc . Comment : parashift.com c++-faq-lite pure-virtual-fns.html http : www.parashift.com c++-faq-lite pure-virtual-fns.html Comment : I should clarify my question slightly : A pure-virtual can be given a body when declared with 0 with the body given later eg void Base : : Blah .. . .. . I m asking specifically about the notation used above I m guessing it s just a typo .", "Question : I ve got a map that stores a simple struct with a key . The struct has two member-functions one is const the other not . I ve managed calling the const function using std : : for each without any problems but I ve got some problems calling the non-const function . The call to the const member function works fine but it seems boost internally expects a const MyStruct somewhere and thus fails with the following compilation error in MSVC7.1 . boost-bind mem fn template.hpp 151 : error C2440 : argument : cannot convert from const MyStruct w64 to MyStruct const .. . .. . I d appreciate any help on how to set the template parameters correctly so bind does recognize the parameters correctly and let me call the non const function . thanks Carl Comment : How about if you back up and tell us what you re really trying to accomplish here Using for each with a map with boost : : bind might be reasonable but chances are pretty good that a different general approach will work better many times this kind of question arises it s because std : : for each is a poor choice for the situation and something like std : : copy or std : : accumulate would do the job much more simply . Comment : The MyStruct is used in a sort of particle-system where MyStruct is the particle . The const function is a draw function the non-const function computes the new position . The key in the map is the creation date . Anyway at the point I posted the question it was more about how to make that work than if this was a good design in the beginning . .. . Answer : One problem I spotted : the second bind is called for a non function member . second is a data member not a method of std : : pair Comment : I found this technique in this article : informit.com articles article.aspx p 412354 seqNum 4 http : www.informit.com articles article.aspx p 412354 seqNum 4 It states You can bind to a member variable just as you can with a member function or a free function . . Since the for each code is essentially the same for both member-functions and the problem is only encountered in the call to the non-const member function I guess the article s correct .", "Question : I am currently working on network software . It has one main class server which obviously represents a server instance . A server instance can send requests and the user is notified of the response by a callback . The code is like : .. . .. . Now let s say that as a user I want to the callback to know about the instance that called it I can do the following thing : .. . .. . But I wonder : is there any overhead doing so Will the calls to mycallback be any slower than using a regular call Thank you . Foot note : I could of course change my typedef to : typedef boost : : function void const server sv int duration callback func and if boost : : bind cause any significant overhead that s probably what I will do in the end . I would just like to know what costs implies the use of boost : : bind . .. . Answer : Be aware that boost : : bind causes a copy of the functor . This can be very significant . For my operating-system news and deletes are very expensive . See boost : : bind documentation about ref and cref . I believe that member-functions also cause functor copies but there is no documentation about that . Comment : I was wrong . boost : : bind does not make a copy of the functor but it does make a copy of parameters . See boost : : bind documentation about ref and cref for versions that do not copy parameters .", "Question : Beware : This is GCC 4.1.2 . We re on a proprietary embedded platform . We cannot update to a new compiler . So C++03 + TR1 it is . .. . .. . We somewhere have a function like this : .. . .. . which is then later used in a bind expression : .. . .. . This generates the following error : .. . .. . error : call of overloaded ref const boost : : any is ambiguous .. . note : candidates are : std : : tr1 : : reference wrapper Tp std : : tr1 : : ref Tp with Tp const boost : : any .. . note : const boost : : reference wrapper boost : : ref T with T const boost : : any .. . .. . I do understand that this is Koenig lookup hitting us . However I lack ideas about how to circumvent this problem . Anyone out there Comment : Is the lack of ref in your code intentional Comment : @Simple : Where do you see a lacking ref Comment : Your two code samples don t have a call to ref whereas the error does . I was asking whether that is intentional or not . By your mention of ADL I wasn t sure . Comment : @Simple : It s deep down in the implementation of std : : tr1 : : bind that an unqualified call to ref is made with a boost : : any as a parameter . Koenig lookup seems to make boost : : ref just as good a match as std : : tr1 : : ref for this call . Hence the error . Anyway Dietmar s nice idea employing a special overload solved this . Comment : @sbi : it seems odd that the implementation seems to use an unqualified ref . If it uses ref it should really qualify it . .. . Answer : Define a version of boost : : ref specifically taking a boost : : any and have it return the proper type . Probably Comment : Thanks Dietmar very good idea", "Question : I ve two containers - one is of vector type and the other one is of unordered-set . Now I want to check if any of element from the vector exists in the unordered-set or not - something like find first of does - and return true false accordingly . Now since I wanted to exploit find of unordered-set I s thinking to use any of vector container.begin vector container.end predicate instead of using find first of . Is there a way that I can use boost : : bind to bind elements from the vector to find from the unordered-set so that I don t have to write the predicate class Comment : Why do you want to use Boost.Bind and not a lambda expression http : en.cppreference.com w cpp language lambda That is vector container : : value-type const v return set container.find v set container.end Comment : Because I cannot use C++0x Comment : I now realize that even any of is not available in C++98 . Is there any other similar algorithm .. . Answer : std : : any of v.begin v.end boost : : bind std : : set int : : find s boost : : lambda : : 1 s.end", "Question : I have std : : map int std : : pair short float and I need to find the minimal short in this map . How can I use boost : : bind with std : : min element for this boost : : lambda .. . Answer : bind cannot do this by itself because first and second are exposed as fields not methods so you can t get away with something like mem fun . You could do this using your own functor of course though : Comment : Also known as select1st in some C++ libraries . Comment : @ephemient : True -- wasn t aware that it was already included with SGI s STL . In that case I would recommend leaving the name this way because SGI s supports any pair-like interface while this one only works with std : : pair .", "Question : I am currently working on network software . It has one main class server which obviously represents a server instance . A server instance can send requests and the user is notified of the response by a callback . The code is like : .. . .. . Now let s say that as a user I want to the callback to know about the instance that called it I can do the following thing : .. . .. . But I wonder : is there any overhead doing so Will the calls to mycallback be any slower than using a regular call Thank you . Foot note : I could of course change my typedef to : typedef boost : : function void const server sv int duration callback func and if boost : : bind cause any significant overhead that s probably what I will do in the end . I would just like to know what costs implies the use of boost : : bind . .. . Answer : boost : : bind generates a functional object which can be optimized out if it is used as argument to function-templates but boost : : function prevents this optimization just like passing a pointer to a function will prevent its inlining . boost : : function itself need not introduce more overhead than a virtual function all or call via a pointer to function . PS . I agree with Tam s Szelei : make 10 million requests and measure it . Comment : Even if passed as an argument to a template function it depends on your compiler : the other day I was testing a straight loop with iterators vs std : : for each with boost : : bind : gcc 4.5 optimized it to almost the same code with gcc 4.1 and 4.2 it produced sizable bloat . Comment : boost : : function uses heap allocation for objects not very small . So you better check whether your bind objects are below the limit .", "Question : I would like to create a key-value data structure that would be useful for responding to the events of string-matching to regex patterns . So I am trying to work it out with a Boost library : .. . .. . When I try to compile it unfortunately I am forced to use quite old software - gcc 4.4.7 boost 1.41 therefore C++11 support is very limited : .. . .. . compilation fails with this error : .. . .. . boost regexp.cpp : In function int main int char : boost regexp.cpp : 58 : error : ambiguous overload for operator in resolver boost : : assign : : map list of const Key const T with Key boost : : regex T boost : : bi : : bind t void void boost : : bi : : list0 const boost : : bi : : bind t void void boost : : bi : : list0 const boost : : bi : : bind t void void boost : : bi : : list0 boost : : bind with R void SuOpenedCallback .boost : : assign detail : : generic list T : : operator with U boost : : regex U0 boost : : bi : : bind t void void boost : : bi : : list0 T std : : pair boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : bi : : bind t void void boost : : bi : : list0 const boost : : regex const boost : : regex su closed const boost : : bi : : bind t void void boost : : bi : : list0 const boost : : bi : : bind t void void boost : : bi : : list0 boost : : bind with R void SuClosedCallback usr lib gcc x86 64-redhat-linux 4.4.7 . . . . . . . . include c++ 4.4.7 bits stl map.h : 251 : note : candidates are : std : : map Key Tp Compare Alloc std : : map Key Tp Compare Alloc : : operator const std : : map Key Tp Compare Alloc with Key boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Tp boost : : function void Compare std : : less boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Alloc std : : allocator std : : pair const boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : function void usr lib gcc x86 64-redhat-linux 4.4.7 . . . . . . . . include c++ 4.4.7 bits stl map.h : 266 : note : std : : map Key Tp Compare Alloc std : : map Key Tp Compare Alloc : : operator std : : map Key Tp Compare Alloc with Key boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Tp boost : : function void Compare std : : less boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Alloc std : : allocator std : : pair const boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : function void usr lib gcc x86 64-redhat-linux 4.4.7 . . . . . . . . include c++ 4.4.7 bits stl map.h : 286 : note : std : : map Key Tp Compare Alloc std : : map Key Tp Compare Alloc : : operator std : : initializer-list std : : pair const Key Tp with Key boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Tp boost : : function void Compare std : : less boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char Alloc std : : allocator std : : pair const boost : : basic regex char boost : : regex traits char boost : : cpp regex traits char boost : : function void make : all Error 1 .. . .. . Seems like my problem is close to this one http : stackoverflow.com questions 13125924 using-boostassign-with-a-stdset-nested-inside-a-stdmap however it does not inspire me . It would be nice if someone could show me the mistake . ANSWER As @sehe has mentioned this code is correct for up-to-date versions of gcc but cannot be handled with gcc 4.4 . Unfortunately for me . .. . Answer : I d say that should just compile . You might try the more direct approach without bind though which is probably a lot easier on the compiler : .. . .. . EDIT Since that didn t work try making it more explicit still : Comment : Unfortunately this crashes the compilation with almost the same error . Comment : That s not crashing though . I can only say live with it or upgrade the compiler : Comment : @sehe.. . OKAY : - Comment : @VitalyIsaev Added one more desperate-attempt workaround idea : Comment : thank you for the provided examples . Unfortunately my outdated gcc could not compile any of them but gcc 4.8.2 did it properly . Unfortunately I can t update my workstation so I ll try to find other solution .", "Question : I m trying to achieve something with boost : : bind boost : : function but can t make it work . I see how to bind a member function http : stackoverflow.com questions 2304203 how-to-use-boost-bind-with-a-member-function of an object with some arguments to be used later as a void void function . But how to bind it to any object . I d like to have a pointer to a member function of my class that could be used with any object of the class with binded arguments : .. . .. . I tried that : .. . .. . But it fails to compile : .. . .. . Note : I m unfortunatley not using C++11 yet so please no auto .. . - Comment : Editing the question to remove const is not very classy after you got an answer . Of course just drop const in various places from my answer then Comment : @sehe : Sorry I was just commenting this on your answer . Itried to remove all the const in your code but it does not compile reports impossible de convertir le param tre 2 de boost : : bi : : bind t R F L en boost : : function Signature .. . Answer : Many subtle tweaks most simplifications : .. . .. . Live On Coliru http : coliru.stacked-crooked.com a 903219da70f72f10 c++03 .. . .. . Notes .. . .. . Use boost : : function void A const because you dereference const iterators .. . Use A : : dispatch vect boost : : bind A : : func1 1 3 .. . Mark func1 and func2 const .. . .. . void func1 int i const .. . void func2 std : : string const i const .. . .. . .. . Output : Comment : Thanks sehe this works pretty well when functions are const but I can t make it work when they are not const it was the case in my OP except I was passing a const ref to the vector which was a mistake when I created my MCVE for the OP . Really sorry about that . Comment : Literally just erased const : coliru.stacked-crooked.com a a335b444d44d6a08 http : coliru.stacked-crooked.com a a335b444d44d6a08 well const in the case of iterator Comment : Got it . I had other problems actually with includes funny thing is that objects passed to the function in const reference must be defined no forward-declaration else boost : : bind refuses to bind . It works now . Thanks a lot for your help and sorry for the const - Comment : Well you take the address of a member . It makes sense that the compiler needs to know what the class looks like Comment : I meant function parameters like std : : string for func2 . See this question I just asked : stackoverflow.com questions 33667356 http : stackoverflow.com questions 33667356 why-boostbind-incompatible-with-forward-declaration" ] }
[ "yes-answer-long", "yes-answer-short" ]
std
UNK_RELATION
autonomy@s@164
autonomy -- autonomy corporation was a multinational enterprise software company who has been acquired by hewlett-packard hp in october 2011 and is now part of hp @placeholder software business unit .
{ "confidence": [ 46.258548736572266, 44.28268814086914, 36.84967803955078, 36.484413146972656, 33.83604431152344, 32.112789154052734, 32.112789154052734, 32.112789154052734, 30.53146743774414, 29.21371078491211, 29.21371078491211, 27.461549758911133, 27.42709732055664, 24.182294845581055, 21.538253784179688, 19.191692352294922, 18.73849868774414, 18.729354858398438, 17.478710174560547, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 17.03691291809082, 15.449071884155273, 15.20582103729248, 14.854787826538086, 14.756328582763672, 14.736512184143066, 14.601792335510254, 14.526023864746094, 14.526023864746094, 14.226232528686523, 14.226232528686523, 14.226232528686523, 14.226232528686523, 14.226232528686523, 14.226232528686523, 14.226232528686523, 14.201783180236816, 14.201783180236816, 12.706872940063477, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941, 12.346100807189941 ], "content": [ "I asked the same question to Autonomy HP support that also said that isn t possible to delete a user via API or even via DbAdmin .", "I need to add a new parameter to my Autonomy HTTP fetch configuration .", "Can someone point me to a tutorial or API resource for Autonomy IDOL search", "I asked this question in another forum http : knowledgemanagement.ittoolbox.com groups technical-functional autonomy-l unencrypted-communications-are-disallowed-4885126 that seems to be more active for users of the Autonomy Interwoven suite of products .", "Using the Autonomy Interwoven products Desksite or Filesite it is possible to drag a document out of the application onto the desktop which creates a .NRL file .", "Does anyone know some site where I can find information about autonomy", "what is the autonomy Search Engine is it a Computer Language C PHP VB etc or it s a Technic or what is it .", "is there any tutorial or article can help me in autonomy search-engine or any example on it", "I m looking after code samples architecture posts and things like that both about .. . .. . autonomy IDOL search-engine .. . autonomy interwoven content-management server .. . .. . side note : .. . .. . I cannot understand why there re so many barriers to access theese product s developer resources .", "Specifically regarding the Autonomy IDOL server and the calls you can make - some resources .. . .. . The IDOL Administrator manual : Probably the most complete document available .", "I found that most active discussions regarding Autonomy s product suite can be found here http : knowledgemanagement.ittoolbox.com groups technical-functional autonomy-l .", "I am trying to use Autonomy SDK to do some admin operation But when i try to connect to database i keep getting an exception : .. . .. . NRTSession TrustedLogin Cannot request exclusive semaphores at interrupt time .", "Using Autonomy WorkSite 8.5 SP2 SDK I am attempting to programmicaly add a shortcut to another users My Matters which I have been told can be done by first subscribing to the other users My Matters add the shortcut then unsubscribe .", "I am attempting to learn how to develop applications to interact with the Autonomy WorkSite 8.5 server and have found the WorkSite DB Administratiors COM Developers Reference Guide it has helped me somewhat and I can now see the types of objects that I can interface with however I am stumbling on showing the members of a group .", "I thought that HP would change autonomy s policy about this but It stills the same : there s absolutely NO access to libraries code samples etc.. . you re forced to have a partner account.. .", "Are you referring to this : autonomy.com content Solutions enterprise-search index.en.html http : www.autonomy.com content Solutions enterprise-search index.en.html", "It s a software that allows you to search for structured as well for unstructured data within a database that is an organized collection of data I m not talking about any specific DBMS .", "My only slight concern was that I noticed that if you have the web interface installed for viewing documents outside the company then iManage also puts a URL into the NRL file .", "Probably my response will be a bit late for you but I hope that it will help anybody else who will have the same issue .", "I stop the HTTPFetch service and after the config modification I started the service .", "The problem is that the change made is only applied to the new documents .", "The old documents don t have the new parameter .", "If I remove all the documents indexed works but is a production environment and I can t do that .", "How can i force the indexation of the old documents without losing data", "Thank you .", "Look at the Content engine parameter KillDuplicates .", "KillDuplicates DREREFERENCE should do what you want .", "A full re-crawl would be required to update the existing documents with the new ones .", "The NXT has lots of support and you can use many languages see here http : en.wikipedia.org wiki Lego Mindstorms NXT .", "I have been looking at the lego mindstorm robot as an entry level robot to dip my feet in the robotics water mindstorms.lego.com en-us Default.aspx http : mindstorms.lego.com en-us Default.aspx .", "If your controller has to run uninterrupted that might be something to consider .", "Hi G David I appreciate you responding to my cry for help as I don t have access to the worksite SDK I have been trying to search the web for some help you have been the first to respond again thanks you .", "The best way forward is to build your own network of people who know the product and have had experience with implementations .", "If you wanna do something smaller maybe look at Arduino which has so much support around its platform that you ll probably find what you need .", "I have been writing a small application using C to copy a document into an individuals My Documents folder on our DMS server .", "Whereas the console applications class-library thread-state and management hadn t been defined within the project and was being handled with the default .NET config .", "This file contains metadata including the name of the Interwoven server the document id version of the document etc .", "Assuming we have a reference to an existing IManage.IManDocument object is it possible to generate one of these nrl files programmatically via the SDK", "Sure - this is simple .", "Here is a basic C function that will do just this with the IManDocument object named aDoc :", "Thanks Ryan .", "This is almost identical to what I ended up doing .", "However this is not a requirement for this particular client .", "The IManage.IManDocument has the method GetCopy available which will download a local copy to a specified directory but this isn t really what I m after .", "This has the added benefit of respecting the document s permissions and checking the document out to the user so they can make amends to the file if required .", "This map has to be with your robot and if it starts from the same reference location initialize your robot with some start location and start orientation .", "I m just starting as an analyst programmer for a firm and working on code to save all open files before a reboot then restore open those files after the next startup .", "I m struggling with our DMS FileSite and so far haven t had any luck in tracking down the support documentation or figuring out our customer service relationship .", "I ve done all my coding in VBScript so far though I m open to converting to VB or C .", "I m starting to suspect that VBScript just isn t the right tool for this but because insert uninteresting details here I m temporarily stuck with VBScript .", "Any answers that don t include switching languages just yet would be greatly appreciated .", "But if you do know for sure that I can t do what I want in VBScript that would also be really helpful info .", "I need to do the following : .. . .. . Connect to FileSite .. . Open a file whose name I already know .. . .. . I ve looked at sample code online but without the support documentation I m having trouble making sense of it .", "I try to modify and run the code and get errors like ActiveX can t create object : iManage.NRTDMS and Class not defined : IManage .", "A couple discussions suggested running regsvr32 on the libraries but that throws an incompatibility error .", "We do have WorkSite integrated with Outlook if that makes any difference in the way I need to go about things .", "Any help would be greatly appreciated .", "Thanks", "I got some help from RKnott2 on Autonomy s DevNet .", "Turns out there s a pretty simple protocol-handler for this if you re already connected to FileSite :", "I am therefore attempting to subscribe to another users My Matters however I am having issues with how to subscribe with the below code I am able to locate the user s My Matters : .. . .. . And from reading the COM Reference guide I should be able to subscribe to a users My Matters with the following code : .. . .. . The problem I am encountering is AddNewSubscriptionFolderShortcutInheriting expects an object of the type IManSubScriptionFolder where FindRootSubscriptionFoldersNotSubscribedTo returns a IManFolders object .", "Can anyone point me in the direction of what I need to do to get an instance of the users My Matters as a IManSubscriptionFolder object", "Answering your question in order to get an instance of other users My Matters as a IManSubscriptionFolder object you just need to loop through the collection of objFolders and cast each folder to the IManSubScriptionFolder type .", "Please find below my working solution : .. . .. . Please note that code from above was included for reference purpose only and it is not a production code .", "Thanks thats pretty similar to what I ended up developing .", "Is it possible to delete a WorkSite user using the API", "I have the following dlls referenced .", "I can create a user using IMANADMIN.NRTDatabase.CreateUser", "No Worksite doesn t allow delete a user .", "Only rename via DbAdmin It s not possible do it using iManage API to another user or disable him .", "As far as I know it isn t possible to do via API You may only forbid user to log in .", "You can use the following : .. . .. . IMANADMIN.NRTDatabase.DeleteUser", "Do you mean using a new release of Worksite", "We are using 8.5", "I m using 9.0 and DeleteUser function doesn t exists .", "I m using Release 10.0 .", "Much better .", "Hope that helps .", "Clyde .", "My code is as follows .", "This is for a VB.NET Windows Forms application .", "However when I debug this code in Visual Studio 2008 I get the error Cannot create ActiveX component at the line ObjNRDMS GetObject IMANADMIN.NRTDMS .. . .. . I have run regsvr32 iManAdmin.dll .", "Can anyone offer any assistance on this problem", "I have read on page 21 of the DB Admin COM guide that it mentions to execute iManAdmin - REGSERVER from the command-prompt however this will not work for me with Windows reporting that the file doesnt have a open with program set .", "I am running Windows 7 64bit .", "Thanks .. . .. . Matt", "I ended up resolving this issue by using the Interop.iManAdmin.dll .", "can you expand on your solution", "i am getting the same error but i don t understand how to use Interop.iManAdmin.dll", "Im looking into to starting to do some AI programming especially aiming at robots .", "Creating robots that think and act for themselves .", "Just wanting some advice on what coding platforms languages are out there that are best suited to this area", "Im a microsoft developer through and through so would I be able to accomplish this with the MS Robotics studio at all .", "Or is that all based on remote control robot development", "Am a little confused because there is so much contradicting information out there .", "Please help .", "Thanks in advance", "I loved the tag robots.txt you added .", "@KPL LuLz politeness is very important on the internet", "Nobody likes a pesky robot" ] }
{ "confidence": [ 60.22353744506836, 58.483726501464844, 56.49785232543945, 43.626983642578125, 43.146236419677734, 40.630393981933594, 39.820316314697266, 39.34375762939453, 38.725486755371094, 37.23310089111328, 36.16875076293945, 34.08236312866211, 15.259173393249512, 13.06669807434082, 13.06669807434082, 12.56859302520752, 12.174057960510254, 12.174057960510254, 12.174057960510254, 12.174057960510254 ], "content": [ "Question : what is the autonomy Search Engine is it a Computer Language C PHP VB etc or it s a Technic or what is it . and if there a tutorial or article for it kindly share it with me .. . .. . Kindly Best Regards Comment : Are you referring to this : autonomy.com content Solutions enterprise-search index.en.html http : www.autonomy.com content Solutions enterprise-search index.en.html .. . Answer : It s a software that allows you to search for structured as well for unstructured data within a database that is an organized collection of data I m not talking about any specific DBMS . You can interact with the engine by using its apis or a dedicated interface . Comment : is there any tutorial or article can help me in autonomy search-engine or any example on it", "Question : Does anyone know some site where I can find information about autonomy I m looking after code samples architecture posts and things like that both about .. . .. . autonomy IDOL search-engine .. . autonomy interwoven content-management server .. . .. . side note : .. . .. . I cannot understand why there re so many barriers to access theese product s developer resources . I thought that HP would change autonomy s policy about this but It stills the same : there s absolutely NO access to libraries code samples etc.. . you re forced to have a partner account.. . If I could I d move to opener alternatives.. . but it s not completly in my hand - .. . Answer : There is little public information available about Autonomy s products . The best way forward is to build your own network of people who know the product and have had experience with implementations . The information that is shipped with the product can also help . Specifically regarding the Autonomy IDOL server and the calls you can make - some resources .. . .. . The IDOL Administrator manual : Probably the most complete document available . It will help you understand the components which make up an IDOL architecture . However it will not go into too much detail on complex architectures . The Online Help : http : : a help Most components have an online help which documents all the calls and parameters . The GRL : http : : a grl Gives you the most recent commands sent to a component . The best way to reverse engineer how to components are interacting with each other . I found that most active discussions regarding Autonomy s product suite can be found here http : knowledgemanagement.ittoolbox.com groups technical-functional autonomy-l .", "Question : Is it possible to delete a WorkSite user using the API I have the following dlls referenced . I can create a user using IMANADMIN.NRTDatabase.CreateUser .. . Answer : You can use the following : .. . .. . IMANADMIN.NRTDatabase.DeleteUser Comment : Do you mean using a new release of Worksite We are using 8.5 Comment : I m using 9.0 and DeleteUser function doesn t exists . I asked the same question to Autonomy HP support that also said that isn t possible to delete a user via API or even via DbAdmin . Comment : I m using Release 10.0 . Much better . Hope that helps . Clyde .", "Question : Using the Autonomy Interwoven products Desksite or Filesite it is possible to drag a document out of the application onto the desktop which creates a .NRL file . This file contains metadata including the name of the Interwoven server the document id version of the document etc . Assuming we have a reference to an existing IManage.IManDocument object is it possible to generate one of these nrl files programmatically via the SDK .. . Answer : Sure - this is simple . Here is a basic C function that will do just this with the IManDocument object named aDoc : Comment : Thanks Ryan . This is almost identical to what I ended up doing . My only slight concern was that I noticed that if you have the web interface installed for viewing documents outside the company then iManage also puts a URL into the NRL file . However this is not a requirement for this particular client .", "Question : I need to add a new parameter to my Autonomy HTTP fetch configuration . I stop the HTTPFetch service and after the config modification I started the service . The problem is that the change made is only applied to the new documents . The old documents don t have the new parameter . If I remove all the documents indexed works but is a production environment and I can t do that . How can i force the indexation of the old documents without losing data Thank you . .. . Answer : Look at the Content engine parameter KillDuplicates . KillDuplicates DREREFERENCE should do what you want . A full re-crawl would be required to update the existing documents with the new ones .", "Question : Can someone point me to a tutorial or API resource for Autonomy IDOL search Thanks . .. . Answer : Also the API is pretty well documented if you go to the following URL - .. . .. . http : autonomy url action help", "Question : I am trying to leverage the IDOL Web API if that is its name so that I can programmatically validate document creation modification actions triggering an IDOL crawl of said document . We had a situation where a few documents were seemingly crawled by IDOL but never made it to one of the 13 content engines . What I want to do is execute a script hourly to quickly validate that all documents created modified in the preceding hour are in the IDOL index . This should be easy based upon some of the examples I have found . Executing this http : server : 9000 ACTION licenseInfo and I get this response in the browser : .. . .. . Executing this http : server : 9000 ACTION query text toys and I get this : .. . .. . Is there something I am missing in my IIS setup .. . Answer : I asked this question in another forum http : knowledgemanagement.ittoolbox.com groups technical-functional autonomy-l unencrypted-communications-are-disallowed-4885126 that seems to be more active for users of the Autonomy Interwoven suite of products . Basically the version of the IDOL indexer that comes built-in with the WorkSite Indexer does not allow Web API calls .", "Question : Can someone point me to a tutorial or API resource for Autonomy IDOL search Thanks . .. . Answer : Do you have access to an automater acount The knowledge base section contains some examples . If you are using the JAVA API there are JAVADOC with some examples The COM API contains sample code .", "Question : I am trying to use Autonomy SDK to do some admin operation But when i try to connect to database i keep getting an exception : .. . .. . NRTSession TrustedLogin Cannot request exclusive semaphores at interrupt time . My code is in C .. . .. . Any help is really appreciable . .. . Answer : Check if the user that you are using to connect is enabled in DbAdmin . Also you can try this :", "Question : Can someone point me to a tutorial or API resource for Autonomy IDOL search Thanks . .. . Answer : There are three main sources I tend to use for almost any IDOL Server work : the built-in help the IDOL Server Administration guide and the support site . Experimentation can be worthwhile once you have some familiarity with the system .", "Question : I am attempting to learn how to develop applications to interact with the Autonomy WorkSite 8.5 server and have found the WorkSite DB Administratiors COM Developers Reference Guide it has helped me somewhat and I can now see the types of objects that I can interface with however I am stumbling on showing the members of a group . My code is as follows . This is for a VB.NET Windows Forms application . However when I debug this code in Visual Studio 2008 I get the error Cannot create ActiveX component at the line ObjNRDMS GetObject IMANADMIN.NRTDMS .. . .. . I have run regsvr32 iManAdmin.dll . Can anyone offer any assistance on this problem I have read on page 21 of the DB Admin COM guide that it mentions to execute iManAdmin - REGSERVER from the command-prompt however this will not work for me with Windows reporting that the file doesnt have a open with program set . I am running Windows 7 64bit . Thanks .. . .. . Matt .. . Answer : I ended up resolving this issue by using the Interop.iManAdmin.dll . Comment : can you expand on your solution i am getting the same error but i don t understand how to use Interop.iManAdmin.dll", "Question : Using Autonomy WorkSite 8.5 SP2 SDK I am attempting to programmicaly add a shortcut to another users My Matters which I have been told can be done by first subscribing to the other users My Matters add the shortcut then unsubscribe . I am therefore attempting to subscribe to another users My Matters however I am having issues with how to subscribe with the below code I am able to locate the user s My Matters : .. . .. . And from reading the COM Reference guide I should be able to subscribe to a users My Matters with the following code : .. . .. . The problem I am encountering is AddNewSubscriptionFolderShortcutInheriting expects an object of the type IManSubScriptionFolder where FindRootSubscriptionFoldersNotSubscribedTo returns a IManFolders object . Can anyone point me in the direction of what I need to do to get an instance of the users My Matters as a IManSubscriptionFolder object .. . Answer : Probably my response will be a bit late for you but I hope that it will help anybody else who will have the same issue . Answering your question in order to get an instance of other users My Matters as a IManSubscriptionFolder object you just need to loop through the collection of objFolders and cast each folder to the IManSubScriptionFolder type . Please find below my working solution : .. . .. . Please note that code from above was included for reference purpose only and it is not a production code . Comment : Thanks thats pretty similar to what I ended up developing .", "Question : Im looking into to starting to do some AI programming especially aiming at robots . Creating robots that think and act for themselves . Just wanting some advice on what coding platforms languages are out there that are best suited to this area Im a microsoft developer through and through so would I be able to accomplish this with the MS Robotics studio at all . Or is that all based on remote control robot development Am a little confused because there is so much contradicting information out there . Please help . Thanks in advance Comment : I loved the tag robots.txt you added . Comment : @KPL LuLz politeness is very important on the internet Nobody likes a pesky robot : .. . Answer : What kind of robotics are you trying to do i.e . is it a robot where a laptop or another powerful device might be an acceptable controller Or are you looking at a small true embedded robot If it s the first MS Robotics might be right for you . It uses .Net IIRC so there s a nice low entry barrier . If you wanna do something smaller maybe look at Arduino which has so much support around its platform that you ll probably find what you need . Arduino uses something very very much like C++ . Regardless of what you choose find a kit robot . I can t stress this enough . You want to spend time doing AI not getting hardware to all work correctly . If you wanna try something weird and interesting the Parallax Propeller Microcontroller is a relatively cheap arudino-weight processor with 8 cores . Might be nice for AI where thinking generally is best done in parallel . Comment : I have been looking at the lego mindstorm robot as an entry level robot to dip my feet in the robotics water mindstorms.lego.com en-us Default.aspx http : mindstorms.lego.com en-us Default.aspx . Is AI and Mindstorms a possible combination Comment : That sounds like a very good idea honestly . The NXT has lots of support and you can use many languages see here http : en.wikipedia.org wiki Lego Mindstorms NXT .", "Question : I have been writing a small application using C to copy a document into an individuals My Documents folder on our DMS server . I ve beased the code around the listing provided in the WorkSite SDK 8 : Utilize the IMANEXT2Lib.IManRefileCmd to File New Document Folders blog . Using this code in a WinForm application I have no problems copying the file from the source folder into the users DMS My Documents folder . However if I use the code in a command-line application .dll or any other type of application other than WinForm during the copy process I receive the error messages .. . .. . 1 . Error occurred when try to log the event .. . IManExt : Error occurred when try to log the event .. . Access is denied . 2 . The document was imported to the database but could not be added to the folder . .. . IManExt : The document was imported to the database but could not be added to the folder . .. . IManExt.LogRuleEventsCmd.1 : Error occurred when try to log the event .. . IManExt.LogRuleEventsCmd.1 : Access is denied . Error occurred when try to log the event - - .. . .. . Does anyone know why I d receiving the Access Denied error messages when using a non-WinForms application to copy documents What would I need to do to get around this issue Any help would be amazing Code in-place : Comment : I m not sure if you monitor this anymore but I was hoping maybe you could point me to where you got this code I m trying to interact with iManage Worksite but don t have access to any documentation cause of some annoying corporate politics . .. . Answer : Just in case this helps someone else . It seems my issue was the result-of a threading issue . I noticed the C winform apps I had created were automatically set to run on a single ApartmentState thread STAThread . Whereas the console applications class-library thread-state and management hadn t been defined within the project and was being handled with the default .NET config . To get this to work : In the console-application I just added the STAThread tag on the line above my Main method call . In the class-library I defined a thread for the function referencing the IMANxxx.dll and set ApartmentState e.g . In both cases ensuring single ApartmentState thread was implemented set would resolve the issue .", "Question : I m basically trying to create a link from a worksite folder in FileSite to take the user to our Web based CRM system or Case management system as shown below . When the user right clicks the matter the option button Goto CRM will be available for then to click I have created this in the following regkey .. . .. . Once the button Goto CRM is clicked the matter numbers all fields if possible are used to compile the URL for the CRM webpage . e.g . http : Casemangesyatem test9999.1.apx .. . .. . I don t know how this is achieved or what the file compiled is or how to create it any examples notes would be greatly appreciated . So how or what is used to compile the file that is location called by the regkey .. . What do I use to create this file and how do I do it .. . .. . Thanks you . This is the only site that I have found with any reference to work-site sdk . I m new to work-site sdk and would appreciate any kind of help with example code . .. . Answer : To run some custom code when a user selects your new right-click option you ll need to create a new DLL in Visual Studio to do the actions you need e.g . redirecting the user to a custom website . The worksite SDK contains some sample ICommands in VB.NET and C to get you started . The main requirement for your custom code is that it implement the IManExtLib.ICommand interface like below : .. . .. . In the registry key below the Commands value should contain the comma separated list of the ClassIDs of the ICommands you want to appear in the right-click menus at that level . For example the following value includes some of the standard entries and our custom class from above and would appear in the right-click menu of a workspace within Filesite . Comment : Hi G David I appreciate you responding to my cry for help as I don t have access to the worksite SDK I have been trying to search the web for some help you have been the first to respond again thanks you . I have found a couple of documents like MHDLL32 and the extension library which are very good if I know what I was supposed to do with them I m not a developer but I m learning very slowly lol . Can I be cheeky to ask if you have any samples or steps that I can follow to achieve this as my first project I would be very gratefully if you can get me started . Many thanks R", "Question : I am using the WorkSite COM API to open an IMANEXT2Lib.IManFileOpenDlg which is working perfectly . Clicking on the document I can retrieve the metadata such as the document name version number etc . Is there a method or technique available to read the document from WorkSite and prompt a download open through a browser The IManage.IManDocument has the method GetCopy available which will download a local copy to a specified directory but this isn t really what I m after . .. . Answer : If the clients have Worksite 8.5 or greater you can use the IWL protocol in a hyperlink to force the client to use the IWL handler to download and launch the file themselves instead of streaming it from the browser . This has the added benefit of respecting the document s permissions and checking the document out to the user so they can make amends to the file if required . An IWL formatted anchor tag in a web browser would look like the following : .. . .. . Note that this will only work if the clients have Worksite 8.5 or newer installed . Comment : Thanks for this I will give it a go soon and get back to you . Comment : Works great many thanks .", "Question : Is it possible to delete a WorkSite user using the API I have the following dlls referenced . I can create a user using IMANADMIN.NRTDatabase.CreateUser .. . Answer : No Worksite doesn t allow delete a user . Only rename via DbAdmin It s not possible do it using iManage API to another user or disable him .", "Question : Is it possible to delete a WorkSite user using the API I have the following dlls referenced . I can create a user using IMANADMIN.NRTDatabase.CreateUser .. . Answer : As far as I know it isn t possible to do via API You may only forbid user to log in .", "Question : I m just starting as an analyst programmer for a firm and working on code to save all open files before a reboot then restore open those files after the next startup . I m struggling with our DMS FileSite and so far haven t had any luck in tracking down the support documentation or figuring out our customer service relationship . I ve done all my coding in VBScript so far though I m open to converting to VB or C . I m starting to suspect that VBScript just isn t the right tool for this but because insert uninteresting details here I m temporarily stuck with VBScript . Any answers that don t include switching languages just yet would be greatly appreciated . But if you do know for sure that I can t do what I want in VBScript that would also be really helpful info . I need to do the following : .. . .. . Connect to FileSite .. . Open a file whose name I already know .. . .. . I ve looked at sample code online but without the support documentation I m having trouble making sense of it . I try to modify and run the code and get errors like ActiveX can t create object : iManage.NRTDMS and Class not defined : IManage . A couple discussions suggested running regsvr32 on the libraries but that throws an incompatibility error . We do have WorkSite integrated with Outlook if that makes any difference in the way I need to go about things . Any help would be greatly appreciated . Thanks .. . Answer : I got some help from RKnott2 on Autonomy s DevNet . Turns out there s a pretty simple protocol-handler for this if you re already connected to FileSite :", "Question : Im looking into to starting to do some AI programming especially aiming at robots . Creating robots that think and act for themselves . Just wanting some advice on what coding platforms languages are out there that are best suited to this area Im a microsoft developer through and through so would I be able to accomplish this with the MS Robotics studio at all . Or is that all based on remote control robot development Am a little confused because there is so much contradicting information out there . Please help . Thanks in advance Comment : I loved the tag robots.txt you added . Comment : @KPL LuLz politeness is very important on the internet Nobody likes a pesky robot : .. . Answer : Try using webots for designing the control . I found it very intuitive and friendly.. . lets you focus on your core programming logic . Hardware should start from Boebot the very basics and graduate to Arduino platforms as you gain knowledge . Try getting a Pioneer once you move to real robotics excellent sensor suite but prohibitively priced . Or try flying bots like A.R.Drone etc . It would be nice to program and will give you insight into UAVs as well ." ] }
[ "yes-answer-long", "yes-answer-short" ]
s
UNK_RELATION
ubuntu-cloud@ubuntu@41
ubuntu-cloud -- an openstack cloud with @placeholder os .
{ "confidence": [ 34.985538482666016, 33.048805236816406, 29.63959503173828, 27.731109619140625, 27.24036407470703, 26.511730194091797, 24.997196197509766, 24.937274932861328, 24.21368408203125, 23.389915466308594, 23.364511489868164, 23.01343536376953, 21.770824432373047, 21.66620635986328, 20.826068878173828, 20.312944412231445, 20.04994010925293, 19.26453399658203, 19.195083618164062, 18.87500762939453, 17.97168731689453, 16.334962844848633, 15.271197319030762, 13.71985912322998, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 12.15832233428955, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 10.930004119873047, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465, 9.457831382751465 ], "content": [ "I am trying to build a cloud infrastructure using VM s .. . .. . In the Openstack manuals it is mentioned that the images in this link http : cloud-images.ubuntu.com trusty current contain Openstack pre-installed .", "I launched an instance using ubuntu-server cloud image with heat flavor .", "I am studying about using Ubuntu Cloud MAAS on my work and I have only one machine available for me at the moment it is powerful enough .", "I want to download a file from a cloud server to my PC using wget command in ubuntu .", "So it seems there is something fishy about running this in the context of cloud-init .", "From https : help.ubuntu.com lts clouddocs installer I understood that when setting up Ubuntu Openstack on a single machine it does not use install MAAS .", "I have a cloud-init script that works on Ubuntu 14.04 when I launch an AWS instance : .. . .. . Now I want to pick up Ubuntu 15.04 but suddenly the service does not start properly and my CREATE USER command fails : .. . .. . I can do this from command-prompt indeed I can do it after the cloud-init scripts runs by stopping and starting the service so I do not understand what the problem could be .", "I do not know the default username and password of that OS .", "I found a guide pointing out that there are Azure-ready Ubuntu Images to be found here : .. . .. . http : cloud-images.ubuntu.com .. . .. . What I did so far : .. . .. . Downloaded the Trusty Tahr .vhd.zip file from their website .", "Also a different question I would like to build a Cloud using the 2 Virtual Machines is it possible to use the same image", "Try using the openstack CLI .", "So I have tried do that as part of the cloud-init script padded with appropriate calls to sleep pstree and inspecting status but that does not work either .", "The default username for ubuntu image is ubuntu .", "I am new to Openstack I ve installed it using devstack .", "Is it possible to use the single machine installer and then expand my cloud from a single machine to have multiple machines nodes use MAAS for better performance and management and keep everything working without cleaning the first machine and setup from zero", "I m trying to get a cloud config script working properly with my DigitalOcean droplet but I m testing on local lxc containers in the interim .", "I have tested with .. . .. . http : thecloudmarket.com image ami-9e0aa4e9--ubuntu-images-hvm-io1-ubuntu-utopic-14-10-amd64-server-20141022-3 - this works .. . http : thecloudmarket.com image ami-ecde819b--ubuntu-images-hvm-io1-ubuntu-vivid-15-04-amd64-server-20150818 - does not .", "Once the instance is up and cloud-init has finished I can do sudo service postgresql stop + sudo service postgresql start after which my sudo -u postgres psql -c CREATE USER foo WITH PASSWORD foo just works .", "I am trying to install ceph giant in Ubuntu-14.04 but it is giving error .", "Also sudo elevation for ubuntu account is passwordless .", "Not sure what the equivilent of the command for ubuntu is : sudo service potsgresql start or etc init.d postgresql start", "yes there are some steps you should take - Linux-specific https : azure.microsoft.com en-us documentation articles virtual-machines-linux-classic-create-upload-vhd and Ubuntu-specific https : azure.microsoft.com en-us documentation articles virtual-machines-linux-create-upload-ubuntu .", "I tried reinstaling devstac reinstaling ubuntu.. . so maybe someone know whats the problem", "How", "Help please .", "What happens when you start postgres .", "Is the PostgreSQL service running", "Anything you can find in the system database logfile", "No the service is not running var log postgresql postgresql-9.4-main.log is empty and var log syslog has nothing interesting in it .", "Update : I raised a bug and added a workaround for now : pg ctlcluster --force 9.4 main stop true pg ctlcluster --force 9.4 main start true", "I tried it using ceph-deploy also from remote machine but it giving same error .", "I have edited ceph.list file also as given in there documentation .", "etc apt sources.list.d ceph.list file looks like this : .. . .. . and the error is following .. . .. . Please help .", "Thanks in advance", "I downloaded the trusty-server-cloudimg-amd64-disk1.img file and I loaded it using KVM .", "I instantiated a Virtual Machine using this image but I am not able to login using the console or ssh into it .", "There is not a default password and you can not ssh to the machine using username password or connect through the VNC console .", "You have to use public private key authentication method with ssh .", "After accessing for the first time your virtual-machine you can change those settings and enable username password authentication for ssh .", "Regarding your second question .. . Yes you can use the same image for multiple virtual-machine .", "I can ssh to the instance .", "The problem is when trying to do : .. . .. . I have .. . .. . 0 connecting to nova.clouds.archive.ubuntu.com ip@ .. . .. . It keeps changing the ip@ then error cannot initiate connection to nova connect 101 : network unreachable .. . .. . I am associating floating IP to my instance .. . .. . Update", "I had to do sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE in the host", "I am trying to setup a custom Linux VM in MS Azure .", "Unpacked it and uploaded it to a BLOB Storage using Azure Managament Studio .. . Created a new Virtual Disk using the stored .vhd file .. . Created a VM that used the new Disk .", "It seems to boot just fine but when I try to SSH onto its public ip adress it gives me : Server Unexptectedly closed connection .", "If I create a Linux VM from the existing MS-Azure Templates everything works fine so it doesn t seem to be a network problem on my end .", "Anyone done this before", "Are there steps that must be done PRIOR to uploading the image to azure", "I ve never done this before so a verified step-by-step guide would be highly appriciated .", "Thanks in advance", "Regards Flo .. . .. . UPDATE : .. . .. . I updated my resource group with a security group in which i defined an ssh-in rule .", "I then linked my VM s Nic to that Group .", "Heres the inbound rule : .. . .. . ssh-in rule http : i.stack.imgur.com U5Uqx.png I am still getting a timeout when I try to connect via putty over ssh .", "Could this be related : superuser.com questions 826485 http : superuser.com questions 826485 putty-server-unexpectedly-closed-network-connection", "Unexpected closed connection can be somehow services-related .", "You can take some steps from the Linux access troubleshooting guide https : azure.microsoft.com en-us documentation articles virtual-machines-linux-troubleshoot-ssh-connection .", "You can take look at what is going on with the Linux boot using Boot Diagnostics and Console https : azure.microsoft.com en-us blog boot-diagnostics-for-virtual-machines-v2 .", "That is the way i would recommend to do first then try to upload manually .", "Then check if SSH is enabled - go to your VM Settings Network interfaces click on the Network Security Group name Inbound security rules .", "Create your 22 SSH rule .", "I activated the boot diagnostics and it I could see that system was indeed booted .", "The Question that I have is if i need to configure SSH specifically in the azure Portal OR in the VM .", "Awesome that the VM is OK . You should check if you have SSH endpoint configured in the Endpoints menu with the port 22 .", "I dont think there are endpoints in the new resource manager layout.. .", "I have a resource group containing the VM a NIC a public IP and a vitual network", "Yep .", "Go to your VM Settings Network interfaces click on the Network Security Group name Inbound security rules .", "When i try to launch an instance on my devstack kilo from horizon dashboard i get a message There was an error submitting the form .", "Please try again .", "Cinder .. . .. . ERROR cinder.api.middleware.fault req-6eb7575e-aaf5-4884-ac3d-bfefb31f833d 28ad1bada6134e23b2b7ade80c745771 54b3a044c5824f269938c8d3c3d5e6b0 Caught error : Entity class cinder.db.sqlalchemy.models.Snapshot has no property tenant id .. . .. . Horizon .. . .. . 2015-06-29 08 : 14 : 12.535521 File usr local lib python2.7 dist-packages cinderclient client.py line 272 in request 2015-06-29 08 : 14 : 12.535525 raise exceptions.from response resp body 2015-06-29 08 : 14 : 12.535530 ClientException : The server has either erred or is incapable of performing the requested operation .", "HTTP 500 Request-ID : req-f98235a2-f894-4a07-9aa2-ef3c5aa7e9ef .. . .. . Last week everything worked well .", ": -", "You might get a useful error message .", "I tried cli and everything worked well .", "I think that the problem is bug in horizon it doesnt provide tenant id to cinder .", "I git-clone from main branch and this is live project it changes every day .", "I will try stable version havana .", "Actualy not havana kilo is the latest stable version .", "One consistent problem I have is that I can never get the write files directive working properly for more than one file .", "It seems to behave in weird ways that I cannot understand .", "For example this configuration is incorrect and only outputs a single file .tarsnaprc in tmp : .. . .. . However if I swap the two items in the write files array it magically works and creates both files .tarsnaprc and lxc .", "What am I doing wrong do I have a syntax-error", "Following is what I executed in terminal .", "It says file backup.sql is saved .", "But when I check in my downloads I don t see a file like that .", "Please help me to find where I have been done the wrong thing .", "By the way the -output-document backup.sql parameter is working correctly on my version of wget GNU Wget 1.15 built on linux-gnu .", "could you add your version of wget", "Yeah. .", "It is the same version of mine GNU Wget 1.15 built on linux-gnu .", "When I execute the command for the very first time it worked very well .", "But now I do not see the file in my downloads .", "what directory are you using wget from", "could you specify an absolute path for the output file so you would be sure of the output location", "I did not specifically give an absolute path .", "Since I am downloading the file and gonna save it locally shouldn t it be saved in downloads", "Because at the very first time I could see the file in my downloads .", "it should be saved in the path you ran wget if you ran it in your home-directory it will be there if you ran it from Downloads it would be there that is why you have more control by specifying an absolute path" ] }
{ "confidence": [ 52.69126510620117, 47.390663146972656, 39.75565719604492, 36.63130569458008, 22.31739044189453, 22.118114471435547, 21.639541625976562, 19.978717803955078, 17.81920051574707, 7.601161479949951 ], "content": [ "Question : I am trying to build a cloud infrastructure using VM s .. . .. . In the Openstack manuals it is mentioned that the images in this link http : cloud-images.ubuntu.com trusty current contain Openstack pre-installed . I downloaded the trusty-server-cloudimg-amd64-disk1.img file and I loaded it using KVM . I instantiated a Virtual Machine using this image but I am not able to login using the console or ssh into it . I do not know the default username and password of that OS . Also a different question I would like to build a Cloud using the 2 Virtual Machines is it possible to use the same image .. . Answer : The default username for ubuntu image is ubuntu . There is not a default password and you can not ssh to the machine using username password or connect through the VNC console . You have to use public private key authentication method with ssh . Also sudo elevation for ubuntu account is passwordless . After accessing for the first time your virtual-machine you can change those settings and enable username password authentication for ssh . Regarding your second question .. . Yes you can use the same image for multiple virtual-machine .", "Question : null .. . Answer : I am studying about using Ubuntu Cloud MAAS on my work and I have only one machine available for me at the moment it is powerful enough . From https : help.ubuntu.com lts clouddocs installer I understood that when setting up Ubuntu Openstack on a single machine it does not use install MAAS . Is it possible to use the single machine installer and then expand my cloud from a single machine to have multiple machines nodes use MAAS for better performance and management and keep everything working without cleaning the first machine and setup from zero How", "Question : I am new to Openstack I ve installed it using devstack . I launched an instance using ubuntu-server cloud image with heat flavor . I can ssh to the instance . The problem is when trying to do : .. . .. . I have .. . .. . 0 connecting to nova.clouds.archive.ubuntu.com ip@ .. . .. . It keeps changing the ip@ then error cannot initiate connection to nova connect 101 : network unreachable .. . .. . I am associating floating IP to my instance .. . .. . Update .. . Answer : I had to do sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE in the host", "Question : null .. . Answer : I have a cloud-init script that works on Ubuntu 14.04 when I launch an AWS instance : .. . .. . Now I want to pick up Ubuntu 15.04 but suddenly the service does not start properly and my CREATE USER command fails : .. . .. . I can do this from command-prompt indeed I can do it after the cloud-init scripts runs by stopping and starting the service so I do not understand what the problem could be . I have tested with .. . .. . http : thecloudmarket.com image ami-9e0aa4e9--ubuntu-images-hvm-io1-ubuntu-utopic-14-10-amd64-server-20141022-3 - this works .. . http : thecloudmarket.com image ami-ecde819b--ubuntu-images-hvm-io1-ubuntu-vivid-15-04-amd64-server-20150818 - does not . Help please . Comment : What happens when you start postgres . Not sure what the equivilent of the command for ubuntu is : sudo service potsgresql start or etc init.d postgresql start Comment : Is the PostgreSQL service running Anything you can find in the system database logfile Comment : No the service is not running var log postgresql postgresql-9.4-main.log is empty and var log syslog has nothing interesting in it . Comment : Once the instance is up and cloud-init has finished I can do sudo service postgresql stop + sudo service postgresql start after which my sudo -u postgres psql -c CREATE USER foo WITH PASSWORD foo just works . So I have tried do that as part of the cloud-init script padded with appropriate calls to sleep pstree and inspecting status but that does not work either . So it seems there is something fishy about running this in the context of cloud-init . Comment : Update : I raised a bug and added a workaround for now : pg ctlcluster --force 9.4 main stop true pg ctlcluster --force 9.4 main start true", "Question : null .. . Answer : I m trying to get a cloud config script working properly with my DigitalOcean droplet but I m testing on local lxc containers in the interim . One consistent problem I have is that I can never get the write files directive working properly for more than one file . It seems to behave in weird ways that I cannot understand . For example this configuration is incorrect and only outputs a single file .tarsnaprc in tmp : .. . .. . However if I swap the two items in the write files array it magically works and creates both files .tarsnaprc and lxc . What am I doing wrong do I have a syntax-error", "Question : I am trying to setup a custom Linux VM in MS Azure . I found a guide pointing out that there are Azure-ready Ubuntu Images to be found here : .. . .. . http : cloud-images.ubuntu.com .. . .. . What I did so far : .. . .. . Downloaded the Trusty Tahr .vhd.zip file from their website . Unpacked it and uploaded it to a BLOB Storage using Azure Managament Studio .. . Created a new Virtual Disk using the stored .vhd file .. . Created a VM that used the new Disk . It seems to boot just fine but when I try to SSH onto its public ip adress it gives me : Server Unexptectedly closed connection . If I create a Linux VM from the existing MS-Azure Templates everything works fine so it doesn t seem to be a network problem on my end . Anyone done this before Are there steps that must be done PRIOR to uploading the image to azure I ve never done this before so a verified step-by-step guide would be highly appriciated . Thanks in advance Regards Flo .. . .. . UPDATE : .. . .. . I updated my resource group with a security group in which i defined an ssh-in rule . I then linked my VM s Nic to that Group . Heres the inbound rule : .. . .. . ssh-in rule http : i.stack.imgur.com U5Uqx.png I am still getting a timeout when I try to connect via putty over ssh . Comment : Could this be related : superuser.com questions 826485 http : superuser.com questions 826485 putty-server-unexpectedly-closed-network-connection .. . Answer : yes there are some steps you should take - Linux-specific https : azure.microsoft.com en-us documentation articles virtual-machines-linux-classic-create-upload-vhd and Ubuntu-specific https : azure.microsoft.com en-us documentation articles virtual-machines-linux-create-upload-ubuntu . Unexpected closed connection can be somehow services-related . You can take some steps from the Linux access troubleshooting guide https : azure.microsoft.com en-us documentation articles virtual-machines-linux-troubleshoot-ssh-connection . You can take look at what is going on with the Linux boot using Boot Diagnostics and Console https : azure.microsoft.com en-us blog boot-diagnostics-for-virtual-machines-v2 . That is the way i would recommend to do first then try to upload manually . Then check if SSH is enabled - go to your VM Settings Network interfaces click on the Network Security Group name Inbound security rules . Create your 22 SSH rule . Comment : I activated the boot diagnostics and it I could see that system was indeed booted . The Question that I have is if i need to configure SSH specifically in the azure Portal OR in the VM . Comment : Awesome that the VM is OK . You should check if you have SSH endpoint configured in the Endpoints menu with the port 22 . Comment : I dont think there are endpoints in the new resource manager layout.. . I have a resource group containing the VM a NIC a public IP and a vitual network Comment : Yep . Go to your VM Settings Network interfaces click on the Network Security Group name Inbound security rules . Create your 22 SSH rule .", "Question : null .. . Answer : I want to download a file from a cloud server to my PC using wget command in ubuntu . Following is what I executed in terminal . It says file backup.sql is saved . But when I check in my downloads I don t see a file like that . Please help me to find where I have been done the wrong thing . Comment : By the way the -output-document backup.sql parameter is working correctly on my version of wget GNU Wget 1.15 built on linux-gnu . could you add your version of wget Comment : Yeah. . It is the same version of mine GNU Wget 1.15 built on linux-gnu . When I execute the command for the very first time it worked very well . But now I do not see the file in my downloads . Comment : what directory are you using wget from could you specify an absolute path for the output file so you would be sure of the output location Comment : I did not specifically give an absolute path . Since I am downloading the file and gonna save it locally shouldn t it be saved in downloads Because at the very first time I could see the file in my downloads . Comment : it should be saved in the path you ran wget if you ran it in your home-directory it will be there if you ran it from Downloads it would be there that is why you have more control by specifying an absolute path", "Question : null .. . Answer : When i try to launch an instance on my devstack kilo from horizon dashboard i get a message There was an error submitting the form . Please try again . Cinder .. . .. . ERROR cinder.api.middleware.fault req-6eb7575e-aaf5-4884-ac3d-bfefb31f833d 28ad1bada6134e23b2b7ade80c745771 54b3a044c5824f269938c8d3c3d5e6b0 Caught error : Entity class cinder.db.sqlalchemy.models.Snapshot has no property tenant id .. . .. . Horizon .. . .. . 2015-06-29 08 : 14 : 12.535521 File usr local lib python2.7 dist-packages cinderclient client.py line 272 in request 2015-06-29 08 : 14 : 12.535525 raise exceptions.from response resp body 2015-06-29 08 : 14 : 12.535530 ClientException : The server has either erred or is incapable of performing the requested operation . HTTP 500 Request-ID : req-f98235a2-f894-4a07-9aa2-ef3c5aa7e9ef .. . .. . Last week everything worked well . I tried reinstaling devstac reinstaling ubuntu.. . so maybe someone know whats the problem : - Comment : Try using the openstack CLI . You might get a useful error message . Comment : I tried cli and everything worked well . I think that the problem is bug in horizon it doesnt provide tenant id to cinder . I git-clone from main branch and this is live project it changes every day . I will try stable version havana . Comment : Actualy not havana kilo is the latest stable version .", "Question : null .. . Answer : I am trying to install ceph giant in Ubuntu-14.04 but it is giving error . I tried it using ceph-deploy also from remote machine but it giving same error . I have edited ceph.list file also as given in there documentation . etc apt sources.list.d ceph.list file looks like this : .. . .. . and the error is following .. . .. . Please help . Thanks in advance", "Question : The default of the startup script is to run as root I need to run the startup script as a specific user the one used to create the image for the instance . I ve tried all possible variations of su etc but when specifying that way execution fails with no output . I might just be missing something stupid but any help would be appreciated . Thanks . .. . Answer : For anyone else having problem and looking for a solution. . I had the same issue . I created another script opt c2d startup-script-user and called it from the default start script using su like this :" ] }
[ "yes-answer-long", "yes-answer-short" ]
ubuntu
UNK_RELATION
system.net.websockets@implementation@81
system.net.websockets -- the system.net.websockets namespace provides a managed @placeholder of the websocket interface for developers .
{ "confidence": [ 16.30730628967285, 16.30730628967285, 16.30730628967285, 16.30730628967285, 16.30730628967285, 16.30730628967285 ], "content": [ "I need to set the User-Agent HTTP header in a ClientWebSocket object but it is not possible .", "Although there is a ClientWebSocket.SetRequestHeader header value the method fails if I try to set that header : System.ArgumentException : This header must be modified using the appropriate property or method . .. . .. . Looking at the ClientWebSocket source code it seems that the MS people forgot completely about this : .. . .. . So the only way I see is replacing this method with reflection and re-write the code properly checking for special headers and using the special properties like httpWebRequest.UserAgent .", "Any other better idea", "connect.microsoft.com VisualStudio feedback details 840553 https : connect.microsoft.com VisualStudio feedback details 840553 system-net-websockets-clientwebsocket-does-not-allow-to-set-the-http-header-user-agent", "There is no way .", "I have created a fork of the class that allows to set that header :" ] }
{ "confidence": [ 15.133660316467285 ], "content": [ "Question : I need to set the User-Agent HTTP header in a ClientWebSocket object but it is not possible . Although there is a ClientWebSocket.SetRequestHeader header value the method fails if I try to set that header : System.ArgumentException : This header must be modified using the appropriate property or method . .. . .. . Looking at the ClientWebSocket source code it seems that the MS people forgot completely about this : .. . .. . So the only way I see is replacing this method with reflection and re-write the code properly checking for special headers and using the special properties like httpWebRequest.UserAgent . Any other better idea Comment : connect.microsoft.com VisualStudio feedback details 840553 https : connect.microsoft.com VisualStudio feedback details 840553 system-net-websockets-clientwebsocket-does-not-allow-to-set-the-http-header-user-agent .. . Answer : There is no way . I have created a fork of the class that allows to set that header :" ] }
[ "yes-answer-long", "yes-answer-short" ]
implementation
UNK_RELATION
tgifimage@graphics@69
tgifimage -- tgifimage is a full tgraphic implementation of the gif @placeholder format .
{ "confidence": [ 40.618412017822266, 38.507164001464844, 38.507164001464844, 35.418792724609375, 21.378202438354492, 21.378202438354492, 21.010141372680664, 20.54802703857422, 20.54802703857422, 20.025012969970703, 18.82868194580078, 17.908790588378906, 17.908790588378906, 17.908790588378906, 17.908790588378906, 17.40312957763672, 15.94343090057373, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738, 10.711102485656738 ], "content": [ "Apparently TGIFImage wasn t the only library to make that particular mistake .", "I have discovered that animated GIFs created using Delphi 2009 s TGIFImage sometimes doesn t play correctly in some GIF viewers .", "I loaded the GIF removed the GCE from frame 0 thus making the loop extension the first and saved it again all using TGIFImage .", ".. . .. . The NETSCAPE loop extension must be the first extension : .. . .. . See : The TGIFImage FAQ http : melander.dk delphi gifimage faq 5 .", "The output is a rather large animated GIF .", "Is there something wrong with the output GIF file", "If I open a problematic GIF in The GIMP and let GIMP re save it as an animated GIF the result works in every viewer .", "Is there a way to avoid this problem during GIF creation", "@LU RD : What about the GIF in the Q", "Sample GIF animation displaying the issue http : privat.rejbrand.se lorenz50.gif .. . .. . In Internet Explorer 11 the model is rotated 360 degrees before the animation is restarted .", "Since the LZW end block marker is also a zero byte a strict GIF reader might choke on this or interpret it as the end of the GIF although the end of file marker is 3B .", "Instead I was working on a Lorenz system simulator and produced this GIF animation which does play in IE but not in Chrome : .. . .. .", "It is somewhat strange that even if I set the width and height of the GIF image the corresponding values in the Logical Screen Descriptor are not there .", "The reason some GIF readers can handle this is probably that GIFs with this problem was common many years ago .", "Apart from that I see nothing wrong with your GIF but you could reduce the size a bit with a global color table .", "Sample GIF animation that has been GIMPed http : privat.rejbrand.se lorenz50 GIMPed.gif .. . .. . Comparing the two files using a hex editor and using the Wikipedia article https : en.wikipedia.org wiki GIF Animated GIF as a reference it seems for instance like the NETSCAPE string is at the wrong place in the original unGIMPed version .", "Oddly enough ever time I run the above code and the GIF is recreated the length of the movie in Google Chrome is changed four seconds three seconds ten seconds .. . .", "I created a small form that I want to put on top of other forms when they are working .", "Basically like a small Loading.. .", "Please wait notification .", "It includes an animated TGIFImage .", "The problem is that when another form is working hard the animation and updating of this form stutters .", "Probably since they are running in the same thread", "Is there a quick and easy way to have this little form always update nicely", "Perhaps a quick way to make sure it s handled in it s own thread", "Move the hard work into an actual thread of its own .", "See the TThread class .", "Display your Form normally then start the thread then close the Form when the thread is done with its work .", "Have the thread post status updates to the main thread asynchronously if needed such as for progress bars etc so the worker thread is not slowed down waiting for the main thread .", "Thanx for the answer Remy Lebeau .", "I wanted to have to change as little as possible to the existing code though and not move existing code into threads etc .", "So what I ended up doing was to have a little factory for my notifications that spawns a thread and create the form in that thread .", "That way I basically only need to wrap my existing code with a Show and a Hide call .", "The problem is that the animation is restarted prematurely .", "Consider the following example : .. . .. . This is the simplest example I could find that exhibits the problem .", "In Internet Explorer 11 the entire 15-second movie is played properly but in Google Chrome the movie is prematurely restarted after only about four seconds .", "Why is this", "1 .", "2 .", "If so is there something wrong with my code above or is there a problem with GIFImg", "3 .", "If not what is the nature of the problem in the viewer", "What fraction of the available viewers have this problem", "For the benefit of the SO user the above code is a minimal working example .", "Of course I wasn t creating these psychedelic patterns when I discovered the issue .", "In Google Chrome the animation is restarted prematurely after only some 20 degrees .", "The Lorenz image works in Internet Explorer 11.0.9600.17239 The GIMP 2.8.0 Opera 12.16 .. . The Lorenz image does not work in Google Chrome 36.0.1985.143 m Firefox 26.0 27.0.1 31.0 .", "The following is the GIMPed version of the Lorenz animation : .. . .. .", "Compiling the test with XE6 and displaying in Chrome results in 15 seconds movie .", "It looks as you describe premature restart .", "I see .", "Maybe there is an issue with the 2009 version then .", "It s a bug in TGIFImage s LZW encoder .", "In some very rare circumstances the LZW encoder will output an extra zero byte at the end of the LZW steam .", "To fix the problem make the following modification to gifimg.pas change marked with :", "This appears to solve the issue .", "Thank you very much", "Excellent answer", "But what happens if you call function TGIFWriter.Write const Buffer Count : Longint : Longint with a count that would make more than one call to FlushBuffer", "That would block the writing .", "AFAIR the encoder only writes a single byte at a time so it s will never become a real problem .", "Apart from that I agree that it smells .", "FNeedsFlush should be set inside the inner loop in TGIFWriter.Write instead of outside the outer loop .", "Edit : This turned out not to be the answer but I m keeping it as the rule about the loop extension still applies .", "Thank you for your answer .", "Unfortunately it seems not to resolve the issue.. .", "Strange It worked for me .", "I ve just tried again and now it doesn t work .", "Will investigate further.. ." ] }
{ "confidence": [ 51.128883361816406, 45.81809997558594, 10.822410583496094, 10.822410583496094 ], "content": [ "Question : I have discovered that animated GIFs created using Delphi 2009 s TGIFImage sometimes doesn t play correctly in some GIF viewers . The problem is that the animation is restarted prematurely . Consider the following example : .. . .. . This is the simplest example I could find that exhibits the problem . The output is a rather large animated GIF . In Internet Explorer 11 the entire 15-second movie is played properly but in Google Chrome the movie is prematurely restarted after only about four seconds . Why is this 1 . Is there something wrong with the output GIF file 2 . If so is there something wrong with my code above or is there a problem with GIFImg 3 . If not what is the nature of the problem in the viewer What fraction of the available viewers have this problem Is there a way to avoid this problem during GIF creation For the benefit of the SO user the above code is a minimal working example . Of course I wasn t creating these psychedelic patterns when I discovered the issue . Instead I was working on a Lorenz system simulator and produced this GIF animation which does play in IE but not in Chrome : .. . .. . Sample GIF animation displaying the issue http : privat.rejbrand.se lorenz50.gif .. . .. . In Internet Explorer 11 the model is rotated 360 degrees before the animation is restarted . In Google Chrome the animation is restarted prematurely after only some 20 degrees . The Lorenz image works in Internet Explorer 11.0.9600.17239 The GIMP 2.8.0 Opera 12.16 .. . The Lorenz image does not work in Google Chrome 36.0.1985.143 m Firefox 26.0 27.0.1 31.0 . If I open a problematic GIF in The GIMP and let GIMP re save it as an animated GIF the result works in every viewer . The following is the GIMPed version of the Lorenz animation : .. . .. . Sample GIF animation that has been GIMPed http : privat.rejbrand.se lorenz50 GIMPed.gif .. . .. . Comparing the two files using a hex editor and using the Wikipedia article https : en.wikipedia.org wiki GIF Animated GIF as a reference it seems for instance like the NETSCAPE string is at the wrong place in the original unGIMPed version . It is somewhat strange that even if I set the width and height of the GIF image the corresponding values in the Logical Screen Descriptor are not there . Comment : Oddly enough ever time I run the above code and the GIF is recreated the length of the movie in Google Chrome is changed four seconds three seconds ten seconds .. . . Comment : Compiling the test with XE6 and displaying in Chrome results in 15 seconds movie . Comment : @LU RD : What about the GIF in the Q Comment : It looks as you describe premature restart . Comment : I see . Maybe there is an issue with the 2009 version then . .. . Answer : Edit : This turned out not to be the answer but I m keeping it as the rule about the loop extension still applies . .. . .. . The NETSCAPE loop extension must be the first extension : .. . .. . See : The TGIFImage FAQ http : melander.dk delphi gifimage faq 5 . Apart from that I see nothing wrong with your GIF but you could reduce the size a bit with a global color table . Comment : Thank you for your answer . Unfortunately it seems not to resolve the issue.. . Comment : Strange It worked for me . I loaded the GIF removed the GCE from frame 0 thus making the loop extension the first and saved it again all using TGIFImage . I ve just tried again and now it doesn t work . Will investigate further.. .", "Question : I have discovered that animated GIFs created using Delphi 2009 s TGIFImage sometimes doesn t play correctly in some GIF viewers . The problem is that the animation is restarted prematurely . Consider the following example : .. . .. . This is the simplest example I could find that exhibits the problem . The output is a rather large animated GIF . In Internet Explorer 11 the entire 15-second movie is played properly but in Google Chrome the movie is prematurely restarted after only about four seconds . Why is this 1 . Is there something wrong with the output GIF file 2 . If so is there something wrong with my code above or is there a problem with GIFImg 3 . If not what is the nature of the problem in the viewer What fraction of the available viewers have this problem Is there a way to avoid this problem during GIF creation For the benefit of the SO user the above code is a minimal working example . Of course I wasn t creating these psychedelic patterns when I discovered the issue . Instead I was working on a Lorenz system simulator and produced this GIF animation which does play in IE but not in Chrome : .. . .. . Sample GIF animation displaying the issue http : privat.rejbrand.se lorenz50.gif .. . .. . In Internet Explorer 11 the model is rotated 360 degrees before the animation is restarted . In Google Chrome the animation is restarted prematurely after only some 20 degrees . The Lorenz image works in Internet Explorer 11.0.9600.17239 The GIMP 2.8.0 Opera 12.16 .. . The Lorenz image does not work in Google Chrome 36.0.1985.143 m Firefox 26.0 27.0.1 31.0 . If I open a problematic GIF in The GIMP and let GIMP re save it as an animated GIF the result works in every viewer . The following is the GIMPed version of the Lorenz animation : .. . .. . Sample GIF animation that has been GIMPed http : privat.rejbrand.se lorenz50 GIMPed.gif .. . .. . Comparing the two files using a hex editor and using the Wikipedia article https : en.wikipedia.org wiki GIF Animated GIF as a reference it seems for instance like the NETSCAPE string is at the wrong place in the original unGIMPed version . It is somewhat strange that even if I set the width and height of the GIF image the corresponding values in the Logical Screen Descriptor are not there . Comment : Oddly enough ever time I run the above code and the GIF is recreated the length of the movie in Google Chrome is changed four seconds three seconds ten seconds .. . . Comment : Compiling the test with XE6 and displaying in Chrome results in 15 seconds movie . Comment : @LU RD : What about the GIF in the Q Comment : It looks as you describe premature restart . Comment : I see . Maybe there is an issue with the 2009 version then . .. . Answer : It s a bug in TGIFImage s LZW encoder . In some very rare circumstances the LZW encoder will output an extra zero byte at the end of the LZW steam . Since the LZW end block marker is also a zero byte a strict GIF reader might choke on this or interpret it as the end of the GIF although the end of file marker is 3B . The reason some GIF readers can handle this is probably that GIFs with this problem was common many years ago . Apparently TGIFImage wasn t the only library to make that particular mistake . To fix the problem make the following modification to gifimg.pas change marked with : Comment : This appears to solve the issue . Thank you very much Excellent answer Comment : But what happens if you call function TGIFWriter.Write const Buffer Count : Longint : Longint with a count that would make more than one call to FlushBuffer That would block the writing . Comment : AFAIR the encoder only writes a single byte at a time so it s will never become a real problem . Apart from that I agree that it smells . FNeedsFlush should be set inside the inner loop in TGIFWriter.Write instead of outside the outer loop .", "Question : I created a small form that I want to put on top of other forms when they are working . Basically like a small Loading.. . Please wait notification . It includes an animated TGIFImage . The problem is that when another form is working hard the animation and updating of this form stutters . Probably since they are running in the same thread Is there a quick and easy way to have this little form always update nicely Perhaps a quick way to make sure it s handled in it s own thread .. . Answer : Move the hard work into an actual thread of its own . See the TThread class . Display your Form normally then start the thread then close the Form when the thread is done with its work . Have the thread post status updates to the main thread asynchronously if needed such as for progress bars etc so the worker thread is not slowed down waiting for the main thread .", "Question : I created a small form that I want to put on top of other forms when they are working . Basically like a small Loading.. . Please wait notification . It includes an animated TGIFImage . The problem is that when another form is working hard the animation and updating of this form stutters . Probably since they are running in the same thread Is there a quick and easy way to have this little form always update nicely Perhaps a quick way to make sure it s handled in it s own thread .. . Answer : Thanx for the answer Remy Lebeau . I wanted to have to change as little as possible to the existing code though and not move existing code into threads etc . So what I ended up doing was to have a little factory for my notifications that spawns a thread and create the form in that thread . That way I basically only need to wrap my existing code with a Show and a Hide call ." ] }
[ "yes-answer-long", "yes-answer-short" ]
graphics
UNK_RELATION
emacs-ecb@emacs@61
emacs-ecb -- emacs code browser - a source code browser for @placeholder .
{ "confidence": [ 64.14946746826172, 49.76952362060547, 48.532772064208984, 46.45408630371094, 46.441749572753906, 46.441749572753906, 46.293067932128906, 46.07063293457031, 46.03484344482422, 45.03087615966797, 44.374671936035156, 44.101951599121094, 44.101951599121094, 43.80561065673828, 43.376609802246094, 43.326271057128906, 43.036460876464844, 43.036460876464844, 43.036460876464844, 43.036460876464844, 43.036460876464844, 42.85005569458008, 42.78246307373047, 42.59679412841797, 42.354393005371094, 42.188743591308594, 42.188743591308594, 41.833717346191406, 41.47864532470703, 41.35401916503906, 41.235191345214844, 40.31313705444336, 40.31313705444336, 40.10671615600586, 40.07197952270508, 39.88292694091797, 39.702293395996094, 39.311431884765625, 39.084983825683594, 39.063926696777344, 38.62348937988281, 38.57209014892578, 38.48984909057617, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.449562072753906, 38.31470489501953, 38.18074035644531, 38.14482879638672, 37.756553649902344, 37.22138977050781, 37.22138977050781, 36.918312072753906, 36.808677673339844, 36.767120361328125, 36.767120361328125, 36.609283447265625, 36.19261169433594, 35.976661682128906, 35.64228057861328, 35.64228057861328, 35.64228057861328, 35.423973083496094, 35.423973083496094, 35.423973083496094, 34.77996826171875, 34.75067138671875, 34.58174133300781, 34.58174133300781, 34.58174133300781, 34.58174133300781, 34.348976135253906, 34.348976135253906, 34.222084045410156, 33.9598388671875, 33.79926300048828, 33.79926300048828, 33.74153137207031, 33.62852096557617, 32.89929962158203, 32.89929962158203, 32.53224563598633, 32.53224563598633, 32.53224563598633, 32.53224563598633, 32.53224563598633, 32.53224563598633, 32.53224563598633, 32.53224563598633, 32.53224563598633 ], "content": [ "I m using emacs with CEDET+emacs code browser ECB .", "I recently installed emacs code browser and noticed that CVS is integrated into it .", "I m trying to figure out how to use Emacs Code Browser ECB and one of the things you can do with it is set ecb-windows-width to decide how wide the ecb windows are .", "I m trying to add a remote directory to my ecb directory pane by modifying the ecb-source-path variable in my .emacs file under Emacs 24.2 ecb 2.40 OS X 10.8.2 .", "I m using ecb on emacs-24 with no problems .", "Running Ubuntu 12.10 with Emacs 24.3.1 and ECB 2.40 .", "ecb-activate brings up the code browser .", ".. . .. . UPDATE : See below : workgroups.el and emacs-code-browser seem to collide .", "Emacs Code Browser rocks but it took me a few days to figure out how to set it up to my satisfaction on my current Emacs 24.5.1 .", "In .emacs : .. . .. . add-to-list load-path git ecb .. . require ecb .. . .. . .. . Done .", "Because ECB emacs code browser would come up fairly top due to the search term similarity browse .. . .. . I wonder what other skilled emacs users use for c c++ objective-c source code browsing .", "I ve been using Emacs as a PHP IDE for quite some time now with emacs-starter-kit ECB Geben .", "With each new release for emacs-starter-kit or Emacs 24 ECB introduces new errors window issues .", "I m use sr-speedbar to file browser http : emacswiki.org emacs SrSpeedbar", "I recently discovered the Emacs code browsing package ECB and it seems to be very useful .", "Using the CEDET that comes with Emacs 24.3.1 and the ECB that is in Melpa I get the following message trying - ecb-activate : .. . .. . My setup for ECB in .emacs file is", "I m new to emacs and ecb -- I installed it the first time today .", "I have emacs 23.1 on Linux CEDET 1.0.1 ECB snapshot .", "Q2 : How can I enable CEDET and ECB in Emacs 24.2", "Except Emacs build-in packages I only use two Cedet and Ecb .", "Anyone have a way of getting ECB to work with Emacs 24.3", "I m using ECB http : ecb.sourceforge.net Emacs Code Browser and my default layout is as follows : .. . .. . By default the methods are presented in the order they appear in the edited buffer yet I m searching for a way of having them sorted by name .", "I am not using the emacs starter kit like this answer http : stackoverflow.com questions 8833235 install-ecb-with-emacs-starter-kit-in-emacs-24 .", "My original attempt set ecb-source-path to a string containing the directory that emacs was run from not nil .", "emacs-nav http : code.google.com p emacs-nav offer a file browser similar to the one in ECB and you can use something like helm http : github.com emacs-helm helm to jump to various stuff in your project like files tags imenu entries etc .", "Emacs ECB 2.40 has a layout called left-symboldef it has the ECB Symboldefinition buffer and I want to set .. . .. . there .", "There is a fork of ECB https : github.com alexott ecb that works with fresh Emacs CEDET versions .", "I ve mainly used cscope only to browse source code in emacs .", "I have ECB installed and autostarted in emacs : .. . .. . ECB shows its First steps after activating ECB first time info node each time .", "How can I fix it and install ECB as simply as possible in emacs 24", "Using the CEDET that comes with Emacs 24.3.1 and the ECB that is in Melpa I get the following trying ecb-activate : .. . .. . Here is the info from the emacs pacakage manager : .. . .. . My question how to get this to work .", "After editing http : i.stack.imgur.com lWCtR.png .. . .. . I use Emacs23 emacs-code-browser and python-mode.el .", "You can see it on the screenshot below : .. . .. . It think that emacs-code-browser and the settings of my workgroup collide .", "I had similar problem with speedbar it is emacs file browser .", "When el-get has finished it will show a message : ecb has been installed successfully or something to that effect .. . .. . Step 3 : Add the following to your emacs init file either .emacs.d init.el or .emacs -- make the edits to whichever of these two files is already present .. . .. . Step 4 : Restart emacs open a python source file as a test example in emacs and then type : M-x ecb-activate .. . .. . If you get a methods list window on the left and the source file view on the right you ve got it working .", "emacswiki.org emacs WindMove http : emacswiki.org emacs WindMove", "This is ECB 2.40 running on Emacs 24.0.93 The error is let : ECB 2.40 - Error : Can t use winner-mode functions in the ecb-frame . I should point out that it is specified in the docs that winner-mode cannot be used with ECB .", "I just downloaded the ECB package from MELPA and run Emacs without any config loaded the ECB into it and everything works fine .", "On updating to Kubuntu 12.04 and Emacs 24.1.50 - I can t access folder in ecb s tree browser .", "I met the similar issue use this to fix the activate failure : .. . .. . According to : Emacs 24.3.1 CEDET 2.0 built-in and ECB 20131116.1319 : Errors during the layout setup of ECB http : stackoverflow.com questions 20129637 emacs-24-3-1-cedet-2-0-built-in-and-ecb-20131116-1319-errors-during-the-layou", "I hope that Emacs 24.3 will have fresh version of CEDET .. . I have a fork of ECB http : alexott.blogspot.de 2012 06 ecb-fresh-emacscedet.html that works with fresh CEDET 1.1 or bzr with CEDET bundled with Emacs - but you need to install it manually .. . You can enable CEDET bundled with GNU Emacs or CEDET from bzr with following config https : github.com alexott emacs-configs blob master rc emacs-rc-cedet.el for CEDET 1.1 you can use following config https : github.com alexott emacs-configs blob master rc emacs-rc-cedet-old.el .", "Currently I m struggling with the windows Emacs emacs-24.3-bin-i386.zip form http : ftp.gnu.org gnu emacs windows .", "I ve install cedet and ecb on my emacs and ecb seems right but sth is wrong here .", "Yesterday I installed ECB on my Emacs and I find method window and history window quite useful .", "I figured out a solution to only show the directory from which I run emacs in the ECB window :", "Also the point of the question was to make ecb show ONLY the directory that emacs was run from but it was showing that AND the root directory .", "I have emacs 24.091 ECB 2.40 and hitting Ret on methods - does bring point to the appropriate method in the edit window .", "Is there a way to remove the ECB definitions so that winner works as before short of restarting Emacs", "the only thing I had to add to my .emacs was : .. . .. . it prevents from throwing errors on ecb startup .", "just to mention I think that emacs cache + properly configured anything helm is much more convenient to use than ecb .", "I don t use ECB but g is the usual Emacs binding for a refresh buffer contents function .", "I am a bit confused of what I need to do to run CEDET and ECB in Emacs 24.2.1 .", "The advantage of using el-get is that it will automagically take care of adding ecb to your emacs load path .", "The suggestions from here : How to remove directory window and add a cscope window in Emacs ECB", "In emacs with ecb running as a minor mode I would like to set my layout as default .", "I ve tried the past few days build by myself a fully functional Python IDE with Emacs and ECB .", "After I installed the ECB version- 20130202.1459 via package-intall-package ecb through MELPA site and added require ecb in .emacs file running the emacs leads to the following error : .. . .. . error : Recursive require for feature speedbar .. . .. . When I start Emacs with the --debug-init option to check error backtrace I got following message : .. . .. . ECB 2.40 uses CEDET 2.0 contains semantic 2.2 eieio 1.4 speedbar .", "I tried starting EMACS with just ecb and got a similar error : Debugger entered--Lisp error : error ECB 2.40 : Errors during the layout setup of ECB .", "The relevant code is in the ecb-activate--impl function : .. . .. . As you can see the info buffer is displayed if ecb-source-path is nil .", "I m trying to install ECB to use with Emacs 24.3.1 using Emacs Package Manager but I got this error when installing : .. . .. . Any body help me please .", "Everything is possible in Emacs .", "Please install it and restart Emacs", "When I try to get there or just activate the ecb Emacs opens tramp scpc C buffer and it says : .. . .. . it was working fine before the update to Kubuntu 12.04 and Emacs 24.1.50 .. . .. . All my ecb-related configs : .. . .. . as You see - no C : in there .", "The following works via tramp from within emacs : .. . .. . I m not sure whether I have the syntax wrong but I ve tried the following to add the path to ecb : .. . .. . Which cause emacs to hang when issuing ecb-activate with no error messages displayed in the message buffer .. . .. . Which result in message : Warning : Source-path ENTERED PATH is not accessible - ignored .. . .. . Has anyone done this and know the correct syntax for adding remote paths to ecb-source-path", "Try emailing Marc Schwartz directly -- he is a happy emacs ess ecb or was it cedet", "Longer answer : Unfortunately ECB completely takes over Emacs window management at a very low-level .", ".. . TODO : please explain what code you need to load the most useful IDE tools provided by CEDET .. . .. . I got a basic configuration to work with the following in my .emacs : .. . .. . .. . global-ede-mode 1 .. . require semantic sb .. . semantic-mode 1 .. . .. . .. . Q1 : Are CEDET and ECB now bundled with Emacs", "From looking at the source code it seems that customising the variable ecb-source-path should prevent the info buffer being displayed .", "What worked for me after some more googling was to edit ecb ecb-cedet-wrapper.el - find the following line in that file : .. . .. . And replace the first 1 to a 2 : .. . .. . Restarted emacs and everything is working fine .", "I m setting up emacs for Ruby on Rails development and would like the ECB window to show only the directory for the project I m working on .", "Using the ignore-errors .. . trick to launch it just results in a message The ECB is now deactivated and pretty much kills emacs after this point .", "If I open this file http : opencores.org websvn filedetails repname w11 path 2Fw11 2Ftrunk 2Frtl 2Fw11a 2Fpdp11 mmu sadr.vhd on Emacs with ecb the method window is empty .", "I ve installed Emacs on OSX Snow Leopard using Homebrew brew install emacs --cocoa .", "See https : www.gnu.org software emacs manual html node emacs GDB-Graphical-Interface.html for details", "This doesn t apply to the initial emacs frame on startup because your .emacs is read after the frame is already created .", "The Emacswiki has the following text http : www.emacswiki.org CollectionOfEmacsDevelopmentEnvironmentTools : .. . .. . How to enable the CEDET tools which were merged with Emacs .. . .. . In Emacs 23.2 CEDET was merged into the main Emacs distribution .", "I am a complete novice at both OSX and Emacs so unsurprisingly I m struggling to install ECB on Aquamacs .", "You are telling emacs to treat gud as a regexp .", "Alternatively you can set it directly in your .emacs :", "Try www.iis.ee.ethz.ch zimmi emacs vhdl-mode.html", "But the issue is that they never refresh without restarting Emacs .", "It started when I rebooted my computer and I ran Emacs and did M-X ecb-activate I would get the following error : .. . .. . ECB 2.40 - Error : ECB can only be used with cedet 1.0pre6 1.1.9", "I m a newbie with emacs and so with ecb when I type ecb-activate the current frame gets split into my windows layout of preference according to the sizes I saved with ecb-store-window-size which I can later restore which are just percentages applied to the current frame sizes .", "Using the Emacs Lisp example code I solved it with the following that could be added to a hook for emacs-lisp-mode and should be easy to tweak for other languages .", "Most of my work in emacs is for programming R and I m using ESS http : ess.r-project.org and ECB http : ecb.sourceforge.net to do so quite happily .", "I cannot understand why I only see a few methods in ECB method window and if I click on half of shown methods I get : .. . .. . and cursor jump to this function : .. . .. . Emacs is : GNU Emacs 23.2.1 x86 64-pc-linux-gnu GTK+ Version 2.24.4 .. . .. . Any help", "All in all using heavyweight tools like ECB is not the Emacs way and I guess this is the reason while its development has stagnated - few Emacs users would use a tool like that given there a smaller more flexible alternatives .", "From the get go : sorry if I m not using the proper emacs terminology -- I m relatively wet behind the ears in the emacs world .", "I haven t tried it for the main emacs frame that is after launching emacs : add-hook after-make-frame-functions lambda the-frame setq xx 1", "What s emacs version do you use", "How can I customize emacs to get this behavior", "Let s assume that I start emacs after I cd to the project s directory .", "The I found the directory window was empty when I started emacs : .. . .. .", "Wondering if there s a project-manager IDE emacs plugin that s today s defacto", "Double vote for Helm now will checkout emacs-nav projectile", "Then after I ve close emacs - it made the same tramp file .", "Seems like it is writter somewhere in a tramp - in the latest emacs sources .", "Is there any way to set some windows non visitable in emacs", "Be patient and don t exit emacs if it tells you it has an active process running. .", "Emacs itself doesn t have it if it came from Linux - then you need to uninistall it.. ." ] }
{ "confidence": [ 64.1760482788086, 63.616943359375, 61.04777145385742, 60.89331817626953, 60.78107452392578, 60.35246658325195, 60.06306076049805, 59.328189849853516, 58.69941711425781, 58.57920837402344, 58.43396759033203, 58.33153533935547, 57.92241668701172, 56.990386962890625, 56.82255554199219, 55.51247787475586, 53.53151321411133, 53.25351333618164, 53.03762435913086, 53.016090393066406 ], "content": [ "Question : I am a bit confused of what I need to do to run CEDET and ECB in Emacs 24.2.1 . The Emacswiki has the following text http : www.emacswiki.org CollectionOfEmacsDevelopmentEnvironmentTools : .. . .. . How to enable the CEDET tools which were merged with Emacs .. . .. . In Emacs 23.2 CEDET was merged into the main Emacs distribution . The configuration code which is explained in CEDET tutorials doesn t work anymore . For instance you cannot use semantic-load-enable-gaudy-code-helpers to enable the useful features . .. . TODO : please explain what code you need to load the most useful IDE tools provided by CEDET .. . .. . I got a basic configuration to work with the following in my .emacs : .. . .. . .. . global-ede-mode 1 .. . require semantic sb .. . semantic-mode 1 .. . .. . .. . Q1 : Are CEDET and ECB now bundled with Emacs If so why is there a separate Sourceforge project for it Q2 : How can I enable CEDET and ECB in Emacs 24.2 Do I still need to download the source code from the respective websites and install them separately .. . Answer : Emacs Code Browser rocks but it took me a few days to figure out how to set it up to my satisfaction on my current Emacs 24.5.1 . Hopefully the following instructions will help make it more popular going forwards . Step 1 : on Ubuntu : install texinfo via : .. . .. . This actually installs makeinfo which is needed in order to install ecb . Macs may already have makeinfo installed -- I don t think I had to install texinfo on my Mac . Step 2 : Use el-get to install ecb . Do a web search on el-get emacs to find out more about el-get . The advantage of using el-get is that it will automagically take care of adding ecb to your emacs load path . BTW it seems to take a good 15 or so minutes to install ecb using el-get . Be patient and don t exit emacs if it tells you it has an active process running. . When el-get has finished it will show a message : ecb has been installed successfully or something to that effect .. . .. . Step 3 : Add the following to your emacs init file either .emacs.d init.el or .emacs -- make the edits to whichever of these two files is already present .. . .. . Step 4 : Restart emacs open a python source file as a test example in emacs and then type : M-x ecb-activate .. . .. . If you get a methods list window on the left and the source file view on the right you ve got it working .", "Question : On updating to Kubuntu 12.04 and Emacs 24.1.50 - I can t access folder in ecb s tree browser . When I try to get there or just activate the ecb Emacs opens tramp scpc C buffer and it says : .. . .. . it was working fine before the update to Kubuntu 12.04 and Emacs 24.1.50 .. . .. . All my ecb-related configs : .. . .. . as You see - no C : in there . Edit 2 : .. . .. . I ve found to have a .emacs.d tramp file and it has : .. . .. . I ve deleted that file then have opened the emacs have activated ECB tried to get to in the directory tree it made the same error . Then after I ve close emacs - it made the same tramp file . Seems like it is writter somewhere in a tramp - in the latest emacs sources . .. . Answer : I ran into the same problem and found that customizing the source path as noted in ECB First Steps http : ecb.sourceforge.net docs First-steps.html fixed the problem for me .", "Question : I ve mainly used cscope only to browse source code in emacs . It s very hard to google what other people mainly use to browse source code . Because ECB emacs code browser would come up fairly top due to the search term similarity browse .. . .. . I wonder what other skilled emacs users use for c c++ objective-c source code browsing . .. . Answer : I mostly use ctags gtags for navigation in code + semantic s built-in navigation routines . But I work mostly with C C++ code with some Java Hadoop snippets", "Question : I ve mainly used cscope only to browse source code in emacs . It s very hard to google what other people mainly use to browse source code . Because ECB emacs code browser would come up fairly top due to the search term similarity browse .. . .. . I wonder what other skilled emacs users use for c c++ objective-c source code browsing . .. . Answer : I use GNU Global and Speedbar . I wrote a blog article http : www.wolinlabs.com blog emacs.global.speedbar.html about how to set it up and use it if you re interested in trying it.. .", "Question : null .. . Answer : I m using emacs with CEDET+emacs code browser ECB . For the most part ECB works great . Hwoever I m trying to get the window sizes saved so I don t have to drag the panes around everytime I restart emacs . When I choose from the menu : ECB Layout administration Store current window-sizes something a few lines do indeed get added to my .emacs file . However when I start up the dimensions of the windows are not restored . Any ideas on how to fix this", "Question : I ve been using Emacs as a PHP IDE for quite some time now with emacs-starter-kit ECB Geben . With each new release for emacs-starter-kit or Emacs 24 ECB introduces new errors window issues . It doesn t seem well-maintained anymore last release was 2009 . Wondering if there s a project-manager IDE emacs plugin that s today s defacto Something that does file-browsing like sr-speedbar method list possibly even auto ctags .. . Answer : I m use sr-speedbar to file browser http : emacswiki.org emacs SrSpeedbar", "Question : I ve been using Emacs as a PHP IDE for quite some time now with emacs-starter-kit ECB Geben . With each new release for emacs-starter-kit or Emacs 24 ECB introduces new errors window issues . It doesn t seem well-maintained anymore last release was 2009 . Wondering if there s a project-manager IDE emacs plugin that s today s defacto Something that does file-browsing like sr-speedbar method list possibly even auto ctags .. . Answer : The answer is that unfortunately no such thing exists . emacs-nav http : code.google.com p emacs-nav offer a file browser similar to the one in ECB and you can use something like helm http : github.com emacs-helm helm to jump to various stuff in your project like files tags imenu entries etc . Small utils like projectile http : github.com bbatsov projectile might also be helpful to you . All in all using heavyweight tools like ECB is not the Emacs way and I guess this is the reason while its development has stagnated - few Emacs users would use a tool like that given there a smaller more flexible alternatives . Comment : Double vote for Helm now will checkout emacs-nav projectile", "Question : I m trying to figure out how to use Emacs Code Browser ECB and one of the things you can do with it is set ecb-windows-width to decide how wide the ecb windows are . The problem is this sequence : .. . .. . 1 . Frame pops up on screen . 2 . ecb-activate gets called scaled according to ecb-windows-width . 3 . default-frame-alist parameters kick in frame gets resized . The problem is that due to this order the width of the ecb window is set before the frame gets resized and then doesn t get scaled . So I d like to run ecb-redraw-layout or ideally just ecb-activate but it has to happen after 3 . Otherwise some sort of ecb-dynamic-width-scale option would also work . For what it s worth ecb-auto-activate doesn t work so I can t find out if that would solve it . Comment : Sounds like a bug you should email the maintainers of ecb . .. . Answer : I m unfamiliar with ECB but after-make-frame-functions might be helpful in running the functions you want or running some hook function where you want to do special things with the ecb frame . after-make-frame-functions is a list of functions that take one argument the newly created frame and is run after the frame is created . This doesn t apply to the initial emacs frame on startup because your .emacs is read after the frame is already created . Comment : Yeah I tried that hook but it doesn t seem to actually call the function nothing happens . In fact if I just do this : add-hook after-make-frame-functions lambda setq xx 1 and then try to evaluate xx after emacs has started it turns out the variable hasn t been set . Comment : The hook-function must take a single frame parameter . So after I do the following and call make-frame the variable xx does get set to 1 . I haven t tried it for the main emacs frame that is after launching emacs : add-hook after-make-frame-functions lambda the-frame setq xx 1", "Question : On updating to Kubuntu 12.04 and Emacs 24.1.50 - I can t access folder in ecb s tree browser . When I try to get there or just activate the ecb Emacs opens tramp scpc C buffer and it says : .. . .. . it was working fine before the update to Kubuntu 12.04 and Emacs 24.1.50 .. . .. . All my ecb-related configs : .. . .. . as You see - no C : in there . Edit 2 : .. . .. . I ve found to have a .emacs.d tramp file and it has : .. . .. . I ve deleted that file then have opened the emacs have activated ECB tried to get to in the directory tree it made the same error . Then after I ve close emacs - it made the same tramp file . Seems like it is writter somewhere in a tramp - in the latest emacs sources . .. . Answer : I am using Kubuntu 12.04 and ran into this same problem don t know if it is specific to Kubuntu or 12.04 generally . Somehow the C : nppdf32Log debuglog.txt file http : askubuntu.com questions 144408 what-is-the-file-c-nppdf32log-debuglog-txt was being picked up by the internal ecb-filename-cache - I couldn t figure out exactly how ecb-filename-cache was being populated but I was able to see this by running ecb-remote-patch-cache-dump - this was the source of the tramp error for me . To get around it I removed all semantic cache directories all traces of the debuglog.txt file and any tramp files that I could find . Viola ECB works again .", "Question : I recently installed emacs code browser and noticed that CVS is integrated into it . Can ecb configured to use git as well Thanks . .. . Answer : I don t remember about CVS-specific support in ECB so I ll try to answer about generic Git support . Emacs VCS should support Git out of box - you can read about VC in official documentation or in my article about VC http : alexott.net en writings emacs-vcs EmacsVC.html . There is also DVC package http : download.gna.org dvc that is designed to work with different distributed version-control systems and have slightly more features than VC you can find more details in its manual or in this article http : alexott.net en writings emacs-vcs EmacsDVC.html . Although the best package for Git is magit http : philjackson.github.com magit - it support most of Git s commands and have extended features comparing to VC and DVC packages . There are also other Git-related packages I described them and also magit in other my article http : alexott.net en writings emacs-vcs EmacsGit.html . P.S . all these articles are parts of big article about version-control in Emacs http : alexott.net en writings emacs-vcs that describes many other version-control systems . Comment : There are version-control icons in ECB when you re using CVS so I guess that s what @morej is asking about . Comment : I ll try to check although ECB isn t working with fresh CEDET on my current machine Comment : ECB is poorly maintained for some time now . That ultimately made me stop using it . Comment : @Bozhidar : I was referring to the icons as well as the fact in ECB when I right-click a directory within the version-control menu I only see CVS options i.e . cvs status cvs examine cvs update . Since you no longer use ECB what do you use instead Comment : It s better to use Version control submenu from Tools menu - it provides access to VC commands that will work with any supported VCS", "Question : On updating to Kubuntu 12.04 and Emacs 24.1.50 - I can t access folder in ecb s tree browser . When I try to get there or just activate the ecb Emacs opens tramp scpc C buffer and it says : .. . .. . it was working fine before the update to Kubuntu 12.04 and Emacs 24.1.50 .. . .. . All my ecb-related configs : .. . .. . as You see - no C : in there . Edit 2 : .. . .. . I ve found to have a .emacs.d tramp file and it has : .. . .. . I ve deleted that file then have opened the emacs have activated ECB tried to get to in the directory tree it made the same error . Then after I ve close emacs - it made the same tramp file . Seems like it is writter somewhere in a tramp - in the latest emacs sources . .. . Answer : Weird maybe it s reusing an old C : something in your old trammp file also reading this scpc link http : www.gnu.org software tramp index-method-scpc-67 maybe your newly updated kubuntu doesn t support it Try the command the link says to see if it works . Sounds more like a tramp issue than an ECB . Comment : I ve found some more details - see the updated question .", "Question : null .. . Answer : I m trying to add a remote directory to my ecb directory pane by modifying the ecb-source-path variable in my .emacs file under Emacs 24.2 ecb 2.40 OS X 10.8.2 . The following works via tramp from within emacs : .. . .. . I m not sure whether I have the syntax wrong but I ve tried the following to add the path to ecb : .. . .. . Which cause emacs to hang when issuing ecb-activate with no error messages displayed in the message buffer .. . .. . Which result in message : Warning : Source-path ENTERED PATH is not accessible - ignored .. . .. . Has anyone done this and know the correct syntax for adding remote paths to ecb-source-path According to the documentation should work . If the syntax is indeed correct are there any tips for debugging what might be going on and causing emacs to freeze Or is this an issue with ecb itself", "Question : I understand from this question http : stackoverflow.com questions 18149939 emacs-cedet-installation-package-assoc-is-obsolete lq 1 that CEDET is installed in emacs 24 without additional installation so I don t need to follow those instructions here http : cedet.sourceforge.net setup.shtml or the CEDET part here http : ecb.sourceforge.net . I am not using the emacs starter kit like this answer http : stackoverflow.com questions 8833235 install-ecb-with-emacs-starter-kit-in-emacs-24 . So when I use elpa to install ecb I get the following error : .. . .. . Another answer pointed me to this repository https : github.com alexott ecb tree master ecb2 which has jn-utils . Can I just drop these files into my emacs.d elpa ecb-20131116.1319 ecb2 directory to replace the existing jn-utils In general : .. . .. . 1 . Why is this failing 2 . How can I fix it and install ECB as simply as possible in emacs 24 .. . Answer : I just installed ecb in under a minute . 1 . From bash : .. . .. . cd git git-clone https : github.com alexott ecb .. . .. . .. . 2 . In .emacs : .. . .. . add-to-list load-path git ecb .. . require ecb .. . .. . .. . Done . ecb-activate brings up the code browser . Comment : ECB can be also installed from MELPA repository - it points right now to my github", "Question : I m setting up emacs for Ruby on Rails development and would like the ECB window to show only the directory for the project I m working on . Is that possible Let s assume that I start emacs after I cd to the project s directory . I ve added the following to my .emacs : .. . .. . Notice I ve created a list containing only the start-dir . However ECB shows both the start-dir and the root dir . Comment : If you use Aquamacs apart from those settings I would recommend this setting to enable ECB context menu : stackoverflow.com questions 7541693 http : stackoverflow.com questions 7541693 ecb-context-menu-in-aquamacs 7591540 .. . Answer : Try setq ecb-source-path quote path to project . Your present setup makes ecb-source-path nil which you can see if you do describe-variable . Comment : My original attempt set ecb-source-path to a string containing the directory that emacs was run from not nil . Also the point of the question was to make ecb show ONLY the directory that emacs was run from but it was showing that AND the root directory .", "Question : I am a bit confused of what I need to do to run CEDET and ECB in Emacs 24.2.1 . The Emacswiki has the following text http : www.emacswiki.org CollectionOfEmacsDevelopmentEnvironmentTools : .. . .. . How to enable the CEDET tools which were merged with Emacs .. . .. . In Emacs 23.2 CEDET was merged into the main Emacs distribution . The configuration code which is explained in CEDET tutorials doesn t work anymore . For instance you cannot use semantic-load-enable-gaudy-code-helpers to enable the useful features . .. . TODO : please explain what code you need to load the most useful IDE tools provided by CEDET .. . .. . I got a basic configuration to work with the following in my .emacs : .. . .. . .. . global-ede-mode 1 .. . require semantic sb .. . semantic-mode 1 .. . .. . .. . Q1 : Are CEDET and ECB now bundled with Emacs If so why is there a separate Sourceforge project for it Q2 : How can I enable CEDET and ECB in Emacs 24.2 Do I still need to download the source code from the respective websites and install them separately .. . Answer : You need to take into account several things : .. . .. . CEDET is bundled with GNU Emacs 24.2 but it s slightly outdated.. . CEDET 1.1 or CEDET from bzr is better from functional point of view . I hope that Emacs 24.3 will have fresh version of CEDET .. . I have a fork of ECB http : alexott.blogspot.de 2012 06 ecb-fresh-emacscedet.html that works with fresh CEDET 1.1 or bzr with CEDET bundled with Emacs - but you need to install it manually .. . You can enable CEDET bundled with GNU Emacs or CEDET from bzr with following config https : github.com alexott emacs-configs blob master rc emacs-rc-cedet.el for CEDET 1.1 you can use following config https : github.com alexott emacs-configs blob master rc emacs-rc-cedet-old.el . P.S . I ll try to answer to more questions here or you can write to me directly via e-mail Comment : Now Emacs 24.3 is out I noticed that the bundled version of cedet is 2.0 defined by cedet-version but on sf.net cedet s latest version is only 1.1 .. . Comment : If you ll take version from bzr then it will also list 2.0 if I remember correctly .. . Comment : I can t find your modified ECB anymore . Wondering where to download it nowadays . Thanks in advance . Comment : Something is wrong with github - I see the repo in the list but can t access it : - you can install latest version from MELPA archive Comment : Ok they ve fixed the issue with repository.. .", "Question : I am a bit confused of what I need to do to run CEDET and ECB in Emacs 24.2.1 . The Emacswiki has the following text http : www.emacswiki.org CollectionOfEmacsDevelopmentEnvironmentTools : .. . .. . How to enable the CEDET tools which were merged with Emacs .. . .. . In Emacs 23.2 CEDET was merged into the main Emacs distribution . The configuration code which is explained in CEDET tutorials doesn t work anymore . For instance you cannot use semantic-load-enable-gaudy-code-helpers to enable the useful features . .. . TODO : please explain what code you need to load the most useful IDE tools provided by CEDET .. . .. . I got a basic configuration to work with the following in my .emacs : .. . .. . .. . global-ede-mode 1 .. . require semantic sb .. . semantic-mode 1 .. . .. . .. . Q1 : Are CEDET and ECB now bundled with Emacs If so why is there a separate Sourceforge project for it Q2 : How can I enable CEDET and ECB in Emacs 24.2 Do I still need to download the source code from the respective websites and install them separately .. . Answer : Q1 : Yes and no : CEDET is bundled but ECB is not . While CEDET is bundled the main development keeps happening outside of Emacs s repository for partly historical and partly technical reasons . Q2 : semantic-mode 1 and global-ede-mode 1 should be sufficient to enable CEDET no need to require semantic sb . As for ECB since it s not bundled .. . Comment : Is DECET in the first line a typo Comment : Yes thanks . I just corrected it .", "Question : I have ECB installed and autostarted in emacs : .. . .. . ECB shows its First steps after activating ECB first time info node each time . How do I stop it doing that Edit : .. . .. . Of course brute-force solves it : .. . .. . but I thought - may be there is a ECB variable that knows wither it activation of the ECB is for the first time or not . Edit : .. . .. . So one has to put for example : .. . .. . This tell ECB that the project is at home boris its plts and should be reffered to as plts . Comment : works also by putting in custom.el : ecb-source-path quote home boris its plts plts .. . Answer : From looking at the source code it seems that customising the variable ecb-source-path should prevent the info buffer being displayed . The relevant code is in the ecb-activate--impl function : .. . .. . As you can see the info buffer is displayed if ecb-source-path is nil .", "Question : Using the CEDET that comes with Emacs 24.3.1 and the ECB that is in Melpa I get the following trying ecb-activate : .. . .. . Here is the info from the emacs pacakage manager : .. . .. . My question how to get this to work . Alex Ott s fork of ECB https : github.com alexott ecb seems to indicate it should . Comment : hmmm that s very strange - ecb-examples isn t referred anywhere in the ECB itself.. . Feel free to file an issue on github.. . Comment : I just downloaded the ECB package from MELPA and run Emacs without any config loaded the ECB into it and everything works fine . Can you enable toggle-debug-on-error run ecb-activate again and post the stacktrace to alexott at gmail Comment : I tried starting EMACS with just ecb and got a similar error : Debugger entered--Lisp error : error ECB 2.40 : Errors during the layout setup of ECB . error-type : error error-data : Variable binding depth exceeds max-specpdl-size Comment : Having the same error here.. . There is no ecb-examples in the ECB but it is somehow being added to ecb-autocontrol sync-fcn-register . I ll try to go further on this later . .. . Answer : I was able to get past this error after executing this command in the scratch .. . .. . setq ecb-examples-bufferinfo-buffer-name nil .. . .. . YMMV .", "Question : I m using ECB http : ecb.sourceforge.net Emacs Code Browser and my default layout is as follows : .. . .. . By default the methods are presented in the order they appear in the edited buffer yet I m searching for a way of having them sorted by name . I wanted to use something like ecb-methods-sort-method but it does not seem to exist . Any hint on how to set it up Comment : potentially this could be done for example by changing ECB code introduce new customization parameter . Do you still need this Comment : yes but that s not crucial obviously simply I see it present on other editors such as TextMate and it definitively makes sense . Now I confess I m not sufficiently good lisp programmer to go into ECB code.. . Comment : Please write to me via e-mail or file corresponding issue at github.com alexott ecb https : github.com alexott ecb - I ll try to find time to implement this .. . Answer : I took quick look at the docs Look slike you can customize ecb-methods-menu-sorter . From the docs : Comment : Let me know if you need help implementing the sort function Comment : thanks for seeing it", "Question : I recently discovered the Emacs code browsing package ECB and it seems to be very useful . I would like to activate ECB mode by default only when I open .c .cu cpp and .py files . Please let me know how I should modify my .emacs file for this . Thank you .. . .. . Gaurish .. . Answer : Probably best to follow the setting up semantic and file parisng guide for ECB here . ECB File Semantic http : www.xemacs.org Documentation sources xemacs-packages packages xemacs-packages ecb ecb 1.html SEC7 Comment : Thank you this is helpful ." ] }
[ "yes-answer-long", "yes-answer-short" ]
emacs
UNK_RELATION
managed-c++@c++@169
managed-c + + -- managed-c + + is a now deprecated microsoft set of deviations from c++ including grammatical and syntactic extensions keywords and attributes to bring the @placeholder syntax and language to the .net framework .
{ "confidence": [ 124.30956268310547, 57.842159271240234, 52.87282180786133, 51.4974365234375, 49.08235168457031, 47.55097579956055, 46.81056594848633, 46.118690490722656, 45.37834548950195, 45.18812942504883, 45.10417556762695, 44.11478042602539, 43.71823501586914, 43.218780517578125, 43.035640716552734, 42.95401382446289, 42.67579650878906, 42.67579650878906, 42.64524841308594, 42.356597900390625, 41.93883514404297, 41.778785705566406, 41.778785705566406, 41.51502990722656, 41.510318756103516, 41.43943405151367, 41.353492736816406, 41.197166442871094, 41.09792709350586, 40.970252990722656, 40.666168212890625, 40.38322830200195, 40.38322830200195, 40.15339279174805, 40.05381774902344, 39.8857536315918, 39.81321716308594, 39.69951629638672, 39.69951629638672, 39.69951629638672, 39.6495246887207, 39.547630310058594, 39.547630310058594, 39.533809661865234, 39.41473388671875, 39.273399353027344, 39.261077880859375, 38.53690719604492, 38.43906021118164, 38.36520767211914, 38.319793701171875, 38.30490493774414, 38.30490493774414, 38.253963470458984, 38.253963470458984, 38.253963470458984, 38.253963470458984, 38.253963470458984, 37.68406295776367, 37.54619598388672, 37.47056579589844, 37.351295471191406, 37.348175048828125, 37.339599609375, 37.14413833618164, 37.14413833618164, 37.14413833618164, 37.14413833618164, 36.974403381347656, 36.892330169677734, 36.69364929199219, 36.536407470703125, 36.39039611816406, 36.388553619384766, 36.190528869628906, 36.190528869628906, 36.088157653808594, 35.96185302734375, 35.88829040527344, 35.87971496582031, 35.87971496582031, 35.85547637939453, 35.782501220703125, 35.782501220703125, 35.782501220703125, 35.47881317138672, 35.28248977661133, 35.20338821411133, 35.119659423828125, 35.03803253173828, 34.98345947265625, 34.919795989990234, 34.919795989990234, 34.919795989990234, 34.911216735839844, 34.88365173339844, 34.625083923339844, 34.39850616455078, 34.328956604003906, 33.968467712402344 ], "content": [ "Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework .", "Managed C++ is a language invented by Microsoft that compiles to bytecode run by the .NET Framework .", "Managed C++ was made to ease transition from classic C++ to the .NET Framework .", "This is managed-c++ syntax .", "This managed C++ CLI standard uses the .Net framework along with the MSIL Microsoft Intermediate Language .", "Microsoft calls their managed-c++ code C++ CLI .", "Is there a way to add assembly attributes to a Managed C++ assembly", "The syntax for IDisposable in managed C++ is also weird but it is in the docs .", "managed-c++ is not c++ .", "1 The term Managed C++ and the extensions it refers to are thus deprecated and superseded by the new extensions... . - So yeah you are absolutely correct .", "is there List in managed-c++", "I have a managed C++ wrapper class for a non-managed C library .", "That s not C++ that s managed-c++ .", "I have a managed C++ function which returns a class array : .. . .. . Managed C++ code : .. . .. . TestFunction is called in a C application .", "Managed C++ uses the CLR Common Language Runtime The CLR along with the .net framework class libraries make up the .NET Framework .", "The managed C++ assembly has dependencies on several more managed C assemblies .", "Are you using managed C++", "A Managed C++ assembly .. . 3 .", "I m guessing Microsoft has put more effort into managed C than managed C++ .", "native C C++ and managed code .", "C++ managed C++ C++ CLI C++ CX are all different languages .", "Do you mean Managed C++", "I have C++ Managed project .", "Working in managed-c++ code .", "By the way keep in mind that for new projects you should use the new C++ CLI language instead of the old Managed C++ extensions .", "Managed C++ and C++ CLI are two different beasts .", "Managed C++ has been replaced by C++ CLI and managed C is just C .", "Then I need to invoke functions of this Managed C++ from C application .", "The syntax is different C++ CLI managed code is a lot easier to differentiate from standard C++ at a glance and C++ CLI also has syntax for .NET 2.0 features such as generics .", "You ll be using managed C++ when want to use a native C++ class-library from managed code .", "We re looking at writing a .Net-callable wrapper for some legacy C++ libraries using managed C++ .", "What is the difference between a handle to an object in Managed C++ .. . .. . such as : .. . .. . and the ordinary C++ pointers", "You are not talking about the older Managed C++ but about C++ CLI right", "gc is a keyword of the Managed C++ .", "For completeness we should say that the old language was properly called Managed Extensions for C++ .", "I am developing a managed lib using Microsoft Web Services and I am including it into a c++ project .", "We have an old project written using Managed C++ syntax .", "How would one code the following C code in Managed C++ .. . .. . Clarificaton : For managed objects .", "please clarify how to port managed code C into C++ Win32 Un-Managed code .", "I only mentioned it because Managed C++ doesn t use handles managed pointers declared as type but C++ CLI does .", "Managed C++ is the version in VS2002 and VS2003 .", "Managed C++ was not a complete standalone or full-fledged programming language .", "Managed C++ refers to a language that was included in Visual Studio.NET VisualStudio.NET 2003 .", "It allows you to compile C++ code into a managed .NET assembly .", "A C assembly .. . .. . The Managed C++ assembly defines an interface let s call it ISetupHelper .", "In Managed C++ the structure looks like below .", "You re using Managed C++ or C++ CLI https : secure.wikimedia.org wikipedia en wiki Managed C 2B 2B programming language as it is known now", "I have a Managed C++ assembly that my customers use to link with C .NET projects .", "Here is my C code : .. . .. . How can I convert this managed C++ class array into C one", "I don t think so - because Managed C++ is still a managed language transformed to IL code calling it from C should not incur large performance overhead", "2 I want to convert the structures from managed C++ to native C++ and viceversa .", "To to that in Managed C++ just use stack semantics .", "Do you really mean Managed C++", "NMath is written in C plus a small Managed C++ layer .", "C++ CLI is basically a managed extension over C++ standard .", "The code looks like managed-c++ which can t reasonably be said to be c++ .", "I have a solution with a managed C++ project and a C project .", "What is exactly the difference between the old Managed C++ and the new C++ CLI", "All you have to do is to create a managed-c++ assembly write a managed class that is visible from c and call the unmanaged code out of that .", "I don t see why it shouldn t be - it s a normal .NET class so it should be available for managed C++ .", "There is a class in the C assembly that implements this interface The C assembly has a reference to the managed C++ assembly .", "I have a Managed C++ dll that I am referencing from a C project .", "Working on a VisStudio 2008 addin using managed C++ C++ CLR in the New Project wizard .", "I don t have much experience with managed C++ but isn t vector unmanaged", "I have created a class-library in managed-c++ .", "MyLib.lib was compiled with Md as was the Managed C++ assembly .", "The Managed C++ Project compiles fine and runs fine .", "A caution on the advice to not use managed-c++ for new projects .", "http : stackoverflow.com questions 3461805 is-a-wpf-application-managed-code-only So I have to choose between using managed C++ or managed C .", "C++ CLI is great when crossing the border of managed world and a c++ library .", "You can t use a managed lib from an unmanaged c++ application .", "For dllexports without managed types this is easy I just define my static c ++ function in a header like this : .. . .. . But now the static c ++ function should return a managed type and here I got a problem .", "Also all memory allocated in the Managed C++ layer and used by native-code is allocated from the managed heap .", "This is probably a better choice if you have managed C++ code and need to access this from other .NET languages .", "From Visual Studio 2008 onwards Managed c++ has some features that are superior to c .", "With this change it is OK - app starts I can call functions of Managed C++ dll from C test app .", "I ve got a legacy managed-c++ dll and I need to call some function which is returning a managed type .", "The C++ CLI array declare initialize syntax is not dissimilar from that in C .", "When you run in debugger C++ native project which use C++ managed dll you may get this exception .", "1 How to declare the fixed size array in Managed C++", "trying to wrap a native cpp class using managed-c++ class .", "These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code .", "Tetgen is in Native c++ my project in managed .", "Is method 1 supposed to work or be valid in managed C++", "I experimented with managed C++ years ago .", "http : blogs.msdn.com vcblog archive 2006 12 08 managed-extensions-for-c-to-c-cli-conversion-tool.aspx Here are a couple other resources I found useful when I made our switch C++ CLI Migration Primer http : msdn.microsoft.com en-us ms235289.aspx Managed Extensions for C++ Syntax Upgrade Checklist http : msdn.microsoft.com en-us b23b94s7.aspx .. . .. . The Microsoft tool is just a start .", "The solution is applying .. . .. . at VS C++ project option : C C++ - Output Files - Object File Name .. . .. . But this solution is failing for Managed C++ project .", "Is there a way of using the C objects from the C++ project without having a dynamically linked library generated by the C project is there a way to embed the C types into the managed C++ project", "My experience was that if I ever touched any of the STL types in managed C++ ALL of them became managed implementations .", "The .snk file is all I need in my C .NET 3.5 project.. . Why will it not work in my managed-c++ project as well", "NOW I need to know how to call the managed C++ from my unmanaged code .", "My anonymous pipe client in managed-c++ in WinMain : .. . .. . My code for the C anonymous pipes server part :", "In our experience it is far better if possible to go C - managed C++ wrapper- static library if you have the ability to do that .", "Since the Wise setup can t call directory to the C assembly we have this managed C++ assembly in between .", "I solved this by never exposing the STL types to managed C++ .", "I came across an issue where it seems that the pointer I am sending from my managed C++ class is not pointing to the same memory location which is used by the non-managed C code library method .", "This bug was corrected in Microsoft Visual C++ .NET 2003 .", "C++ CLI allows you to mix in native C++ pretty much at will but using C++ CLI makes your app depend on the .NET framework .", "I d consider stackoverflow.com questions 1369459 cs-lock-in-managed-c http : stackoverflow.com questions 1369459 cs-lock-in-managed-c 7527111 7527111 superior in that it is both more in C++ nature RAII as well as closer to the C lock keyword", "It allows you to utilize CLR classes and data types in your C++ CLI project and also expose this to managed language ." ] }
{ "confidence": [ 139.8495635986328, 137.9747772216797, 136.65858459472656, 136.30197143554688, 120.93360137939453, 116.25887298583984, 58.550804138183594, 51.022003173828125, 48.765525817871094, 46.41221618652344, 46.41221618652344, 46.41221618652344, 44.88541793823242, 43.89118576049805, 43.7014274597168, 43.28064727783203, 43.150089263916016, 42.1138916015625, 41.76526641845703, 41.607757568359375 ], "content": [ "Question : The topics title is actually my question . And the second question is : When do I use what of these two Comment : Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework . These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code . Managed C++ was not a complete standalone or full-fledged programming language . en.wikipedia.org wiki https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 .. . Answer : Managed C++ refers to a language that was included in Visual Studio.NET VisualStudio.NET 2003 . It has since been deprecated https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 with the latest .net C++ being C++ CLI .", "Question : The topics title is actually my question . And the second question is : When do I use what of these two Comment : Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework . These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code . Managed C++ was not a complete standalone or full-fledged programming language . en.wikipedia.org wiki https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 .. . Answer : You ll be using managed C++ when want to use a native C++ class-library from managed code . In this case you wrap unmanaged classes in managed C++ ones then you use them in any CLR language .", "Question : The topics title is actually my question . And the second question is : When do I use what of these two Comment : Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework . These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code . Managed C++ was not a complete standalone or full-fledged programming language . en.wikipedia.org wiki https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 .. . Answer : Managed C++ means that memory allocation management garbage-collection is handled by the virtual-machine . Whereas in regular C++ you would have to allocate and deallocate memory .", "Question : The topics title is actually my question . And the second question is : When do I use what of these two Comment : Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework . These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code . Managed C++ was not a complete standalone or full-fledged programming language . en.wikipedia.org wiki https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 .. . Answer : I think you should look at this question http : stackoverflow.com questions 57923 what-exactly-is-managed-code .", "Question : The topics title is actually my question . And the second question is : When do I use what of these two Comment : Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework . These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code . Managed C++ was not a complete standalone or full-fledged programming language . en.wikipedia.org wiki https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 .. . Answer : When not specified C++ is unmanaged C++ compiled to machine code . In unmanaged C++ you must manage memory allocation manually . Managed C++ is a language invented by Microsoft that compiles to bytecode run by the .NET Framework . It uses mostly the same syntax as C++ hence the name but is compiled in the same way as C or VB.NET basically only the syntax changes e.g . using - to point to a member of an object instead of . in C using : : for namespaces etc . Managed C++ was made to ease transition from classic C++ to the .NET Framework . It is not intended to be used to start new projects C is preferred . Comment : A caution on the advice to not use managed-c++ for new projects . From Visual Studio 2008 onwards Managed c++ has some features that are superior to c . These relate to the handling of IDisposable objects . See msdn.microsoft.com en-us library ms235315.aspx http : msdn.microsoft.com en-us library ms235315.aspx Comment : Managed C++ and C++ CLI are two different beasts . Managed C++ is a hideous extension to C++ that should never have seen the light of day . C++ CLI is officially a separate language so new keywords can be added and is much nicer to work with .", "Question : The topics title is actually my question . And the second question is : When do I use what of these two Comment : Managed Extensions for C++ or just Managed C++ is a now deprecated Microsoft set of deviations from C++ including grammatical and syntactic extensions keywords and attributes to bring the C++ syntax and language to the .NET Framework . These extensions allowed C++ code to be targeted to the Common Language Runtime CLR in the form of managed code as well as continue to interoperate with native-code . Managed C++ was not a complete standalone or full-fledged programming language . en.wikipedia.org wiki https : en.wikipedia.org wiki Managed Extensions for C 2B 2B .E2.80.A6to C.23 .. . Answer : You can code native C++ two different ways . The first is compiling directly to machine code with just the operating-system between you and the Platform Hardware . The second native coding is done with MFC Microsoft Foundation Classes . This is the same as the first example except for the use of MFC . Managed C++ uses the CLR Common Language Runtime The CLR along with the .net framework class libraries make up the .NET Framework . This managed C++ CLI standard uses the .Net framework along with the MSIL Microsoft Intermediate Language . This standard works by mapping to machine code only when the program is executing by the use of a just in time compiler . If your code will be running on different hardware platforms the use of managed code will be much easier . As with all thing there is a slight price to pay for convenience as native-code will run faster .", "Question : What is exactly the difference between the old Managed C++ and the new C++ CLI .. . Answer : Managed C++ is the version in VS2002 and VS2003 . It had race conditions and other serious bugs as well as being confusing . It s no longer supported . In VS2005 Microsoft introduced C++ CLI which has also been accepted as an ISO standard . It s also supported in VS2008 and the upcoming VS2010 . Both of them had the same goal which is to create .NET assemblies using the C++ language . The syntax is different C++ CLI managed code is a lot easier to differentiate from standard C++ at a glance and C++ CLI also has syntax for .NET 2.0 features such as generics . Comment : For completeness we should say that the old language was properly called Managed Extensions for C++ .", "Question : I m trying to write an application in Managed C++ but I cannot work out how to declare an array of strings . String linet .. . .. . throws an error .. . .. . System : : String : a native array cannot contain this managed type .. . .. . So I suppose there s a different way to do this for managed data types . What exactly is it Comment : Just a little nitpick : While Managed C++ C++ CLI will to my knowledge be compiled into the same code they re actually two distinct languages . .. . Answer : http : www.codeproject.com KB mcpp cppcliarrays.aspx .. . .. . That should have all the answers you need : .. . .. . When working with Managed C++ aka . C++ CLI aka . C++ CLR you need to consider your variable types in everything you do . Any managed type basically everything that derives from System : : Object can only be used in a managed context . A standard C++ array basically creates a fixed-size memory-block on the heap with sizeof type x NumberOfItems bytes and then iterates through this . A managed type can not be guarenteed to stay the same place on the heap as it originally was which is why you can t do that : Comment : Just a little nitpick : While Managed C++ C++ CLI will to my knowledge be compiled into the same code they re actually two distinct languages . Comment : From en.wikipedia.org wiki Managed Extensions for C 2B 2B https : en.wikipedia.org wiki Managed Extensions for C 2B 2B ...These new extensions were designated C++ CLI and included in Microsoft Visual Studio 2005 . 1 The term Managed C++ and the extensions it refers to are thus deprecated and superseded by the new extensions... . - So yeah you are absolutely correct . Comment : I only mentioned it because Managed C++ doesn t use handles managed pointers declared as type but C++ CLI does . ...Now that I think about it the person who asked the question got the two mixed up too .", "Question : We have an old project written using Managed C++ syntax . I would like to propose to the team a reasonably pain-free I don t mind some level of human interaction I think I m realistic in my expectations that we ll still have to do some work by hand method of updating the existing code to C++ CLI syntax so that we can also add XML documentation the project is a library into other projects and having documentation would be immensely useful . So are there any good tools out there to help with this Or is it just a case of switching to the new C++ CLI syntax compiler and fixing errors as we go .. . Answer : Microsoft has a tool http : www.microsoft.com downloads details.aspx FamilyID a3581805-1af2-4c34-9d0e-6029cc078441 displaylang en that will help a little . Visual c++ blog post about it . http : blogs.msdn.com vcblog archive 2006 12 08 managed-extensions-for-c-to-c-cli-conversion-tool.aspx Here are a couple other resources I found useful when I made our switch C++ CLI Migration Primer http : msdn.microsoft.com en-us ms235289.aspx Managed Extensions for C++ Syntax Upgrade Checklist http : msdn.microsoft.com en-us b23b94s7.aspx .. . .. . The Microsoft tool is just a start . there were many files that it could not convert .", "Question : I m having a problem linking a C++ project in VS2008 when using the clr compile option . I am getting the following build errors : .. . .. . I have no idea what PROPSHEETPAGEA and PROPSHEETPAGEW are referring to . I checked online to see Microsoft s description of the error but am at a loss as to what it means . http : support.microsoft.com kb 324088 .. . .. . To resolve this problem add unique identifiers when you use Managed Extensions for C++ so that you avoid using anonymous structures as global-variables . .. . Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article . This bug was corrected in Microsoft Visual C++ .NET 2003 . Any ideas would be greatly appreciated . EDIT .. . .. . After doing a ildasm on Class1.obj I extracted two messages : .. . .. . I m not sure what all this means but it looks as-if the second entry is identical to the first with the exception of the attributes being defined backwards . Comment : I modified my solution set-up to house all the managed code in a single project instead of multiple-projects and the error has disappeared . It will forever be a mystery.. . .. . Answer : I solved this issue simply by doing a clean on the overall solutuion . Seems that this just can happen if VS mixes things up .", "Question : I m having a problem linking a C++ project in VS2008 when using the clr compile option . I am getting the following build errors : .. . .. . I have no idea what PROPSHEETPAGEA and PROPSHEETPAGEW are referring to . I checked online to see Microsoft s description of the error but am at a loss as to what it means . http : support.microsoft.com kb 324088 .. . .. . To resolve this problem add unique identifiers when you use Managed Extensions for C++ so that you avoid using anonymous structures as global-variables . .. . Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article . This bug was corrected in Microsoft Visual C++ .NET 2003 . Any ideas would be greatly appreciated . EDIT .. . .. . After doing a ildasm on Class1.obj I extracted two messages : .. . .. . I m not sure what all this means but it looks as-if the second entry is identical to the first with the exception of the attributes being defined backwards . Comment : I modified my solution set-up to house all the managed code in a single project instead of multiple-projects and the error has disappeared . It will forever be a mystery.. . .. . Answer : In my case one class declaration was dependent on some define declared in a .h testing ifdef which I forgot to include in one of the files using it . In result linker had 2 different descriptions of the class . In this situation check all files that include the related file with conditional declaration .", "Question : I m having a problem linking a C++ project in VS2008 when using the clr compile option . I am getting the following build errors : .. . .. . I have no idea what PROPSHEETPAGEA and PROPSHEETPAGEW are referring to . I checked online to see Microsoft s description of the error but am at a loss as to what it means . http : support.microsoft.com kb 324088 .. . .. . To resolve this problem add unique identifiers when you use Managed Extensions for C++ so that you avoid using anonymous structures as global-variables . .. . Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article . This bug was corrected in Microsoft Visual C++ .NET 2003 . Any ideas would be greatly appreciated . EDIT .. . .. . After doing a ildasm on Class1.obj I extracted two messages : .. . .. . I m not sure what all this means but it looks as-if the second entry is identical to the first with the exception of the attributes being defined backwards . Comment : I modified my solution set-up to house all the managed code in a single project instead of multiple-projects and the error has disappeared . It will forever be a mystery.. . .. . Answer : In one of the dependent projects stdafx.h did not contain the following declaration : .. . .. . The result is different compilation file prsht.h in various projects . In this file name is declared structure with PROPSHEETPAGE . VS 2008", "Question : WPF applications are at its core managed applications Right http : stackoverflow.com questions 3461805 is-a-wpf-application-managed-code-only So I have to choose between using managed C++ or managed C . I experimented with managed C++ years ago . It seemed to be not quite be ready for primetime . I m guessing Microsoft has put more effort into managed C than managed C++ . So it seems like using managed C is the best alternative between the two . Is this the case What experiences have you had with WPF in either language Thanks in advance . .. . Answer : Managed C++ has been replaced by C++ CLI and managed C is just C . I would strongly recommend you to use C for a new project and use C++ CLI only when needed . C has a better support has a larger user base and is easier to work with inside Visual Studio 2010 . Additionally keep in mind that C++ and C++ CLI are two different languages . For my first .Net project I chose C++ CLI because I already knew C++ and this was a very bad idea : the learning curve from C++ to C++ CLI is similar to learning C from C++ : don t fall into that trap .", "Question : I m having a problem linking a C++ project in VS2008 when using the clr compile option . I am getting the following build errors : .. . .. . I have no idea what PROPSHEETPAGEA and PROPSHEETPAGEW are referring to . I checked online to see Microsoft s description of the error but am at a loss as to what it means . http : support.microsoft.com kb 324088 .. . .. . To resolve this problem add unique identifiers when you use Managed Extensions for C++ so that you avoid using anonymous structures as global-variables . .. . Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article . This bug was corrected in Microsoft Visual C++ .NET 2003 . Any ideas would be greatly appreciated . EDIT .. . .. . After doing a ildasm on Class1.obj I extracted two messages : .. . .. . I m not sure what all this means but it looks as-if the second entry is identical to the first with the exception of the attributes being defined backwards . Comment : I modified my solution set-up to house all the managed code in a single project instead of multiple-projects and the error has disappeared . It will forever be a mystery.. . .. . Answer : I had this exact same problem today on one of my projects . I solved it by rearranging my header-files . Problem was I had moved a header file to the top of the cpp file before the file that was including windows.h . So once I reverted the include order and put windows.h back at the top of the cpp file it fixed everything . very wierd fix but it worked for me . Comment : Here is a link-to MSDN which kind of explains what is going on . msdn.microsoft.com en-us library aa712965 VS.71 .aspx http : msdn.microsoft.com en-us library aa712965 VS.71 .aspx", "Question : WPF applications are at its core managed applications Right http : stackoverflow.com questions 3461805 is-a-wpf-application-managed-code-only So I have to choose between using managed C++ or managed C . I experimented with managed C++ years ago . It seemed to be not quite be ready for primetime . I m guessing Microsoft has put more effort into managed C than managed C++ . So it seems like using managed C is the best alternative between the two . Is this the case What experiences have you had with WPF in either language Thanks in advance . .. . Answer : C is the most used so if you have trouble there is more online support for C . C also has better support by Microsoft . It s overall just a more finished product even now . If you really don t care yourself i d go with C . Comment : Not true . C++ CLI is a finished and wonderful product especially with C++0x specifications and the ability to use C++ header-only template libraries . However it is seldom the right tool for the job . Comment : I think C++ is better for games where you need to get to a basic level often . WPF is trying to do the exact oposite get away from drawing and let me do everything for you . C just fits that concept better .", "Question : We re looking at writing a .Net-callable wrapper for some legacy C++ libraries using managed C++ . It all looks pretty easy . Is there anything we need to watch out for .. . Answer : It is pretty straight-forward and works well . It is a lot easier than PInvoke . The big thing you need to watch out for is not having any unmanaged members in your managed headers including private members method signatures etc . It is okay to have private members that are pointers to managed types though just use forward declarations for your classes . Also watch out for object-lifetime . It is easy to introduce memory-leaks since many .NET programmers are not used to cleaning up after themselves . Make sure any wrapper classes that you create are disposable if they contain pointers and make sure you dispose of them in your managed code . The syntax for IDisposable in managed C++ is also weird but it is in the docs . Also remember that you incur a slight hit every time you cross the managed unmanaged boundary so try to plan your interface accordingly . If anything gets called repeatedly in loops it is probably better to move that loop across the boundary so you only cross once . Don t worry too much about this though unless you are talking millions of calls . This article goes the other way but it has some useful points . Use Our ManWrap Library to Get the Best of .NET in Native C++ Code http : msdn.microsoft.com en-ca magazine cc300632.aspx .. . .. . See also .. . .. . Managed Code in Visual Studio 2005 http : msdn.microsoft.com en-us magazine cc163602.aspx and .. . Deleting Managed Objects Wrapping a Library and More http : msdn.microsoft.com en-us magazine cc300523.aspx", "Question : null .. . Answer : I m hoping someone out there can explain this behavior that I m seeing . There are 3 main parts to my problem : .. . .. . 1 . A Wise setup .. . 2 . A Managed C++ assembly .. . 3 . A C assembly .. . .. . The Managed C++ assembly defines an interface let s call it ISetupHelper . There is a class in the C assembly that implements this interface The C assembly has a reference to the managed C++ assembly . Let s call this class SetupHelper . Since the Wise setup can t call directory to the C assembly we have this managed C++ assembly in between . There is a method that the setup calls to create an interface of a class that implements ISetupHelper . I does this by passing 2 strings to the C++ method the assembly path to the C assembly and the type name . The C++ method looks like this : .. . .. . This has worked very well for us for a number of years . Now we are trying to add support for Windows Server 2012 R2 . These versions of Windows come with 4.5 and 4.5.1 installed respectively . Here is where the odd problem happens . If the setup is run from a path with a long name it does not work if you run it from the short version of the path . When I say it doesn t work I mean the cast fails . For example : .. . .. . Running from this directory works : c : reallylongname .. . This does not work : c : really 1 .. . .. . I turned on the Fusion logger and when the cast fails it tries to load the C++ assembly again : .. . .. . LOG : IJW explicit bind . File path : C : reallylongname ManagedCPP.dll . LOG : IJW assembly bind returned a different path : C : REALLY 1 ManagedCPP.dll . Use the file provided . If you do this exact same thing on a Windows Server 2008 R2 machine with only .NET 4.0 installed running from the short path works just fine the cast is successful . It seems as-if something in the CLR has changed in the way it loads assemblies and in particular when loading an assembly with the same name as one that has already been loaded . Comment : This is really obscure . I d assume it has more to do with the operating-system . It is getting pretty common to turn short name mapping off . And that this runs as a setup program probably isn t a minor detail Windows has pretty heavy appcompat to keep ancient installers still working . A call to Microsoft Support is probably your best bet . Comment : I don t think it is OS related . I did not mention this but we tried this on a Server 2008 R2 machine with .NET 4.5 installed and it behaved the same way as the Server 2012 machine . So it certainly seems to be related to .NET 4.5 . Comment : I am from Microsoft .NET team would like to understand this better . Could you send standalone code that reproduces the issue to netfx45compat at Microsoft dot com Regards", "Question : WPF applications are at its core managed applications Right http : stackoverflow.com questions 3461805 is-a-wpf-application-managed-code-only So I have to choose between using managed C++ or managed C . I experimented with managed C++ years ago . It seemed to be not quite be ready for primetime . I m guessing Microsoft has put more effort into managed C than managed C++ . So it seems like using managed C is the best alternative between the two . Is this the case What experiences have you had with WPF in either language Thanks in advance . .. . Answer : IMO without a doubt C or VB F . C++ CLI is great when crossing the border of managed world and a c++ library . Complexity is higher though as subtle issues arises from the fact that one combine a managed language and an unmanaged . Compile times are longer though as well in C++ CLI especially since the code templates are modelled after how the C compiler works not on how the C++ compiler works .", "Question : I am developing a managed lib using Microsoft Web Services and I am including it into a c++ project . The project doesn t use clr option so when I include my library s header file VS2005 show me an error saying I have to use clr option . Doing this I have a incompatibility with EHs command-line option error D8016 but changing from EHs to no exception-handling not solving problem and keep showing me same error . Any suggestion is welcome . Thank you in advance . Comment : You can t write C and C++ code in the same project . Comment : You cannot create a managed lib without using the clr option . Comment : @CodyGray : Yes you can read up on .netmodule http : msdn.microsoft.com en-us library k669k83h.aspx files . Comment : @user765829 : EHa must be used in conjunction with clr . Comment : @ildjarn : Where does that link say anything about C .. . Answer : You can embed a mono environment and start an AppDomain . mono s runtime API will allow you to instantiate classes and call members on them . It will be clumsy but is will work .. . .. . http : www.mono-project.com Embedding Mono .. . .. . Note that Mono is a full .Net 4.0 compliant CLR and it can work with the Microsoft core libraries on Windows . On windows and Unix it can work with the Mono corlib class libraries . There are areas not covered in Mono but they seem to get sparse . You can use the MoMa tool to spot whether your application uses incompatible incomplete APIs . Or you can just use the Microsoft .NET framework assuming you re on windows anyway", "Question : For deployment reasons I am trying to use IJW to wrap a C assembly in C++ instead of using a COM Callable Wrapper . I ve done it on other projects but on this one I am getting an EEFileLoadException . Any help would be appreciated Managed C++ wrapper code this is in a DLL : .. . .. . Test Code this is an EXE : .. . .. . For what it s worth the Event Log reports the following : .NET Runtime version 2.0.50727.143 - Fatal Execution Engine Error 79F97075 80131506 .. . .. . Unfortunately Microsoft has no information on that error . Comment : Do you have tests in-place to verify that the assembly loads from the same directory Comment : When I manually copy the managed DLL into to exe s directory it worked without this extra code . .. . Answer : The first issue is to make sure the Debugger type is set to mixed . Then you get useful exceptions . Comment : I ve got his problem with an Excel addin written in Managed C++ and I actually found with mixed debugging that I get less useful exceptions in particular I don t see the EEFileLoadException itself just several subsequent rethrows . Comment : This advice probably saved me an hour of debugging ." ] }
[ "yes-answer-long", "yes-answer-short" ]
c++
UNK_RELATION
border-box@css@59
border-box -- this is one of the 3 allowed values for the @placeholder box-sizing property .
{ "confidence": [ 69.45075225830078, 63.04784393310547, 55.88349151611328, 53.90373611450195, 53.80866622924805, 52.2567138671875, 50.94920349121094, 50.83814239501953, 50.38430404663086, 50.28271484375, 50.278018951416016, 50.278018951416016, 48.63099670410156, 48.61064910888672, 47.196224212646484, 46.65699768066406, 46.394107818603516, 45.645240783691406, 45.197818756103516, 45.197818756103516, 44.97728729248047, 44.81816101074219, 44.64262771606445, 44.243289947509766, 44.12240982055664, 43.58926010131836, 43.55079650878906, 43.55079650878906, 43.55079650878906, 43.55079650878906, 43.5350341796875, 43.52464294433594, 43.24925231933594, 43.18968200683594, 43.10877227783203, 42.862152099609375, 42.17454528808594, 42.052398681640625, 41.96116638183594, 41.798316955566406, 41.57679748535156, 41.57679748535156, 41.4483642578125, 41.39619445800781, 41.379573822021484, 41.131805419921875, 41.104209899902344, 41.0216064453125, 41.00339889526367, 40.85554885864258, 40.85554885864258, 40.79199981689453, 40.79199981689453, 40.688758850097656, 40.63132858276367, 40.63132858276367, 40.63132858276367, 40.618350982666016, 40.355587005615234, 40.314144134521484, 39.78555679321289, 39.73140335083008, 39.45718765258789, 39.29890823364258, 39.208526611328125, 39.20075225830078, 38.9447135925293, 38.9447135925293, 38.361351013183594, 38.34014129638672, 38.34014129638672, 38.269012451171875, 38.269012451171875, 38.18749237060547, 37.8633918762207, 37.63786315917969, 37.583580017089844, 37.396453857421875, 37.275726318359375, 37.275726318359375, 37.20142364501953, 37.0677375793457, 36.62199020385742, 36.62199020385742, 36.62199020385742, 36.62199020385742, 36.55691909790039, 36.55691909790039, 36.55691909790039, 36.356380462646484, 36.16453552246094, 35.958656311035156, 35.695892333984375, 35.62870788574219, 35.62870788574219, 35.37071228027344, 35.16225051879883, 35.138702392578125, 35.094993591308594, 34.78898620605469 ], "content": [ "One one page we see a box-sizing property of border-box in the Web Inspector or console .", "On the other page there is no mention of the box-sizing property in the Web Inspector or console .", "Add box-sizing : border-box to .box .", "This can be done with box-sizing : border-box .", "I m also under the impression due to various websites including Mozilla s that the default-value of the box-sizing property for Webkit and Mozilla is content-box .", "The situation is this : .. . .. . box-sizing : border-box is applied to everything .", "Margin is not part of the border-box sizing .", "In the box model we would solve that with box-sizing : border-box .", "Your CSS says box-sizing : border-box - you have a space rather than a dash in border-box .", "I use box-sizing : border-box .", "box-sizing : border-box didn t seem to fix the issue .", "@MrLister That s the definition of box-sizing : border-box isn t it", "If you remove padding or box-sizing : border-box it goes away .", "You might want to read this as well paulirish.com 2012 box-sizing-border-box-ftw http : paulirish.com 2012 box-sizing-border-box-ftw", "What s happening is that box-sizing : border-box causes the content box of each element to shrink both horizontally and vertically once you add a border .", "Please aware that I use box-sizing : border-box if it s important", "I m having a problem with the box-sizing border-box on the top and bottom borders of one of my images .", "I m one of those who believe that box-sizing : border-box is one of the best commands there is in CSS with all its limitations .", "Is there a responsive grid-system or an example of a fully responsive grid-system that does NOT rely on box-sizing : border-box .", "Tried to use box-sizing : border-box method but that didnt solve my problem .", "Why not just put your box-sizing -moz-box-sizing -webkit-box-sizing rule in the site stylesheet", "container .. . width : 700px .. . border : 1px solid .. . overflow : hidden .. . box-sizing : border-box .. . .. . .. . left-box .. . width : 21.7 .. . height : 150px .. . float : left .. . box-sizing : border-box .. . .. . .. . right-box .. . width : 78.3 .. . height : 150px .. . float : right .. . border-left : 1px solid .. . box-sizing : border-box .. . .. . .. . .. . div id container .. . div id left-box div .. . div id right-box div .. . div", "However notice how the border offsets the element even when I use box-sizing : border-box and explicitly define the widths and heights of the elements .", "Here s a good argument for why you should use box-sizing : border-box https : css-tricks.com international-box-sizing-awareness-day .", "The image below from the CSS Tricks http : css-tricks.com box-sizing article on this topic illustrates the difference between the standard box-model and box-sizing : border-box : .. . .. .", "Note box-sizing does work with flex-box .", "Example Code : .. . .. . HTML : .. . .. . CSS : .. . .. . From my testing it appears it is related to the setting box-sizing : border-box .", "So I found out the hard way that flexbox doesn t respect the box-sizing : border-box CSS declaration .", "As an aside I tend to apply box-sizing : border-box to all elements using the selector .", "Consider the following example : .. . .. . On browser that support the border-box box-sizing this is rendered as I want : .. . .. .", "offsetWidth .. . .. . without border-box : .. . .. . offsetWidth width + padding + border .. . .. . with border-box : .. . .. . offsetWidth width .. . .. . clientWidth .. . .. . without border-box : .. . .. . clientWidth width + padding .. . .. . with border-box : .. . .. . clientWidth width - border", "@Vandervals Border being 0 is not enough but if the border and padding are both 0 then the box-sizing does not change the end result .", "Consider this code .. . .. . .. . div .. . box-sizing : border-box .. . .. . width : 0 .. . height : 0 .. . max-width : 0 .. . max-height : 0 .. . .. . border : 1px solid gray .. . padding : 12px .. . overflow : hidden .. . .. . .. . .. . div Hi div .. . .. . According to everything I ve ever read understood and used https : developer.mozilla.org en-US docs Web CSS box-sizing about box-sizing : border-box This should show nothing since the width and height are zero and padding border are inside of the zero width and height .", "https : css-tricks.com international-box-sizing-awareness-day .. . .. . http : www.paulirish.com 2012 box-sizing-border-box-ftw .. . .. . Edit .. . .. . It s also worth noting that the CSS working group consider this a mistake in the design of CSS : .. . .. . Box-sizing should be border-box by default .", "The borders are included in the box-sizing .", "In Twitter Bootstrap 3 you can remove the box-sizing in line 293 .", "You need the Calc function https : developer.mozilla.org en-US docs Web CSS calc .. . .. . Here you are .. . .. . .. . html .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . : before .. . : after .. . -webkit-box-sizing : inherit .. . -moz-box-sizing : inherit .. . box-sizing : inherit .. . .. . .. . .content .. . width : 700px .. . background : gray .. . padding : 20px .. . .. . .. . ul .. . list-style : none .. . margin : 0 .. . padding : 0 .. . .. . .. . ul li .. . float : left .. . width : calc 33.3 - 20px .. . margin : 0 20px 0 0 .. . background : blue .. . .. . .. . .. . div id wrapper .. . div class content .. . ul .. . li Item 1 li .. . li Item 2 li .. . li Item 3 li .. . div style clear : both div .. . ul .. . div .. . .. . div .. . .. . think about adding prefix or using prefixfree http : leaverou.github.io prefixfree from lea verou .", "My solution : .. . .. . Don t put the padding on the same element as you put the min-values AND the border-box - you may not need border-box sizing anymore if you separate these .", "Try it out yourself : http : codepen.io anon pen WvojWw .. . .. . By default it is set to box-sizing : border-box but just change that in the styles to get different results .", "Demo : .. . .. . .. . style type text css .. . .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .wrapper .. . float : left .. . height : 100px .. . background : 99ccff .. . .. . .. . .wrapper img .. . height : 100 .. . padding : 8px .. . .. . style .. . .. . div class wrapper .. . img src http : placehold.it 250x150 alt .. . div", "Can I use in my all murkup all project box-sizing : border-box", "I can t find a concrete answer on google about using box-sizing : border-box on mobile .", "I m also one for border-box .", "One solution is to remove all whitespace between elements in the source : .. . .. . .. . .ok .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . .. . .. . .. . div class ok div class box 1 div div class box 2 div div class box 3 div div class box 4 div div .. . .. . Another method sets font-size : 0 on the parent and if necessary restores the font on the child : .. . .. . .. . .ok .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . font-size : 0 .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . font-size : 16px .. . .. . .. . .. . div class ok .. . div class box 1 div .. . div class box 2 div .. . div class box 3 div .. . div class box 4 div .. . div .. . .. . Other options include negative margins omitting closing tags using comment tags floats and flexbox .", "The width and height properties are measured including only the content but not the padding border or margin . For more info see Box sizing https : developer.mozilla.org en-US docs Web CSS box-sizing", "We re using prototype.js and swfobject.js in the application.. . .. . .. . UPDATE : In case I wasn t clear on almost every page in my web application and in every dummy page I ve tested on the box-sizing property has the default content-box value .", "Then i added the box-sizing instead of the background-image .", "I thought that box-sizing : border-box would make it so that the buttons would come out to the same size regardless of padding border margin .", "There are 3 types of box-sizing : .. . .. . content-box is the default behavior and only includes the width and height .", "Why is border-box not working here", "Is this some intentional quirk of border-box", "So you say that the box-sizing doesn t affect at all they are always the same while border is 0 is that it", "Originally they were implementated as OS widgets in which case border-box sizing would make sense .", "Nope box-sizing : border-box takes the border width in to account .", "Anything in this area is the border-box .", "border-box covers everything .", "min s factor in border-box .", ".image-container .. . .. . border-bottom : 000 30px solid .. . border-radius : 1em 4em 1em 4em .. . border-bottom : 50px solid .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . .. . script src https : maxcdn.bootstrapcdn.com bootstrap 3.3.0 js bootstrap.min.js script .. . link href https : maxcdn.bootstrapcdn.com bootstrap 3.3.0 css bootstrap-theme.min.css rel stylesheet .. . .. . .. . .. . div class container image-container .. . .. . img class img-responsive src http : i.imgur.com uqXZmk4.jpg .. . div", ".. . .. . In a block container where you have box-sizing : border-box https : developer.mozilla.org en-US docs Web CSS box-sizing the boxes in your code will render evenly regardless of padding .", "Margin is not part of the box-model whatever box-sizing you use so it will always be in addition to the width + padding + border you ve declared .", "See here : developer.mozilla.org en docs Web CSS box-sizing https : developer.mozilla.org en docs Web CSS box-sizing", "I ended up explicitly defining box-sizing -moz-box-sizing and -webkit-box-sizing in the style sheet but I was hoping to find out what might have caused this weirdness with the user-agent stylesheet .", "Unfortunately this htc doesn t include support for box-sizing .", "I realised that input type submit has a border-box box model whereas input type text has a content-box box model .", "padding-box includes the padding but not the border .", "border-box problem http : i.stack.imgur.com pRb76.jpg .. . .. . .. . rightCol .. . width : 50 .. . height : auto .. . float : right .. . box-sizing : border-box .. . border-left : 2px solid white .. . .. . rightCol img .. . width : 100 .. . height : 100 .. . display : block .. . .. . leftCol .. . width : 50 .. . height : auto .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . border-right : 2px solid white .. . .. . leftCol img .. . width : 100 .. . height : 100 .. . display : block .. . .. . .innerBorder .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . border-top : 4px solid white .. . border-bottom : 4px solid white .. . .. . .. . .. . div id rightCol .. . div .. . img src . images pa.jpg .. . div .. . div .. . img src . images game.jpg .. . div .. . div .. . img src . images spine.jpg .. . div .. . div .. . .. . .. . div id leftCol .. . div .. . img src . images truck.jpg .. . div .. . div .. . img class innerBorder src . images ccc.jpg .. . div .. . div .. . img src . images box.jpg .. . div .. . div", "It s because it isn t border-box that is causing the space .", "And it s irrelevant of wheter I use border-box or not .", "So if you have a box with a border width of 30px then the border image fits into the 30 pixels surrounding the box by default .", "Image css : .. . .. . Parent and img both have display : block box-sizing : border-box .. . HTML : .. . .. . There is how it looks on both browsers .", "If not some space showed up between li and li for unknown reason even though I d set the box-sizing : border-box and margin : 0 for li .", "Use Bootstrap 2.3.2 it works in ie7 and it doesn t rely on box-sizing .", "I believe the box-sizing only takes into account the padding and margin right", "Update : .. . .. . To remove the margin on every third list item inside in your unordered lists you will need the not https : developer.mozilla.org en-US docs Web CSS 3Anot and nth https : developer.mozilla.org en-US docs Web CSS 3Anth-child selectors ul li : not : nth-child 3n+3 .. . .. . live demo .. . .. . .. . html .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . : before .. . : after .. . -webkit-box-sizing : inherit .. . -moz-box-sizing : inherit .. . box-sizing : inherit .. . .. . .. . .content .. . width : 700px .. . background : gray .. . padding : 20px .. . .. . .. . ul .. . list-style : none .. . margin : 0 .. . padding : 0 .. . .. . .. . ul li .. . float : left .. . width : calc 33.3 - 20px .. . margin : 0 20px 0 0 .. . background : blue .. . .. . ul li : not : nth-child 3n+3 margin : 0 20px 0 0 .. . .. . .. . div id wrapper .. . div class content .. . ul .. . li Item 1 li .. . li Item 2 li .. . li Item 3 li .. . div style clear : both div .. . ul .. . div .. . .. . div .. . .. . or write it and then overwrite it to avoid the not selector like this", "Demo 2 http : jsfiddle.net btwm9bjy 1 .. . .. . .. . .. . In a flex container where you have box-sizing : border-box and flex-grow it will appear that box-sizing doesn t work.. . .. . .. . Demo 3 http : jsfiddle.net btwm9bjy 4 .. . .. . .. . but that s not really correct .", "I don t understand your reasoning- why do you feel that removing box-sizing in favor of border-radius on a wildcard selector is the only solution", "And finally we well remove margin right from the last items by adding class to it or use this one .. . .. . ul li + li + li margin-right : 0 because IE8 and lower doesn t support last-child selector .. . .. . In the end your code would be : .. . .. . .. . .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . : before .. . : after .. . -webkit-box-sizing : inherit .. . -moz-box-sizing : inherit .. . box-sizing : inherit .. . .. . .. . .content .. . width : 700px .. . background : gray .. . padding : 0px .. . .. . .. . ul .. . list-style : none .. . margin : 0 .. . padding : 0 .. . .. . .. . ul li .. . float : left .. . width : 31.429 .. . margin : 0 20px 0 0 .. . background : blue .. . .. . .. . ul li+li+li .. . margin-right : 0 .. . .. . .. . .. . div id wrapper .. . div class content .. . ul .. . li Item 1 li .. . li Item 2 li .. . li Item 3 li .. . div style clear : both div .. . ul .. . div .. . .. . div .. . .. . Reference : Alternative for nth http : stackoverflow.com a 16175273 5683483 first child and last child for IE8 http : stackoverflow.com a 8840911 5683483 Can i use http : caniuse.com search calc", "so what exactly the border image area and border-box mean", "IE 6 7 8 in quirks-mode uses the border-box box model anyway .", "You can specify border-box and content-box to declare what model you want .", "Here is the CSS for the body tag : .. . .. . I m using the property box-sizing so the max-width is supposed to be 1200px with the padding inside .", "However the box-shadow that I have appear on hover begins at the border-box .", "box-sizing and inspector issue on Firefox http : i.stack.imgur.com wpZZ8.jpg", "Am I missing something or is this a bug in the implementation of box-sizing in Firefox", "You can do this without changing the box-sizing for anything .", "I think you need to define the height in order for the box-sizing to work .", "For example say someone includes my stylesheet and has box-sizing set to border-box how can I check whether my class will get such a rule applied", "That s fine until I try to give the scrolling div some padding which makes it too wide for the td so I give it box-sizing : border-box .", "while adding box-sizing : border-box is a good practice when you first start development retroactively adding it could cause any sort of layout issues .", "Would I be able to sort this with some border-box approach", "More info : developer.mozilla.org en-US docs Web CSS box-sizing https : developer.mozilla.org en-US docs Web CSS box-sizing", "CSS padding issue using box-sizing : border-box in Firefox http : i.stack.imgur.com qkrtN.jpg .. . .. . Am I mistaken about the box-sizing : border-box property", "My html structure : .. . .. . Am using border-box to all elements but the 6px height increased to the element .one how can i solve this problem", "The border-box is defined as everything within the outer perimeter of the borders of a box including the borders themselves if any .", "I m busy writing a small snippet of code that should allow cross-browser usage of the border-box box model .", "This does not rely on box-sizing : border-box .", "Demo : UPDATED http : jsfiddle.net x3ftdx6n 9 .. . .. . .. . .ok .. . margin : 0px auto ADDED .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . padding : 0px auto .. . .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . float : left .. . .. . .. . .. . div class ok .. . div class box 1 div .. . div class box 2 div .. . div class box 3 div .. . div class box 4 div .. . .. . div .. . .. . UPDATE : To center it add just one more property margin : 0px auto to your .ok class div .", "http : jsfiddle.net jzhang172 x3ftdx6n .. . .. . .. . .ok .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . .. . .. . .. . div class ok .. . div class box 1 div .. . div class box 2 div .. . div class box 3 div .. . div class box 4 div .. . .. . div", "Here Paul talks about using it in that same fashion .. . .. . http : paulirish.com 2012 box-sizing-border-box-ftw .. . .. . We ve been using box-sizing : border-box in one of my projects deployed in production averaging over 1mln visits a month at work for about a year now and it seems to be holding up just fine .", "Is there anyway to fix this so the smaller elements align directly under the element above it when it is able to or do I have to set box-sizing to content-box" ] }
{ "confidence": [ 72.25525665283203, 69.66117095947266, 69.19981384277344, 54.29433059692383, 52.79216003417969, 50.974693298339844, 50.92123794555664, 50.80708312988281, 50.804962158203125, 50.352508544921875, 49.7026252746582, 49.45053482055664, 49.358428955078125, 49.10355758666992, 49.05143737792969, 49.00426483154297, 48.380126953125, 48.13373947143555, 48.0955810546875, 47.866722106933594 ], "content": [ "Question : I m under the impression that the user-agent stylesheet in browsers such as Safari Chrome and Firefox is something that is internal to the browser and can t be directly modified rather a style property needs to be overridden . I m also under the impression due to various websites including Mozilla s that the default-value of the box-sizing property for Webkit and Mozilla is content-box . I tested this on a rather simple dummy page viewed in various browsers . My problem is that on two pages in our production application the default property is different and we can t figure out why this is . One one page we see a box-sizing property of border-box in the Web Inspector or console . It s assigned to the CSS selector input : not type image textarea . On the other page there is no mention of the box-sizing property in the Web Inspector or console . Does anyone know if there s some way to directly affect the box-sizing definition in the user-agent stylesheet for a particular page Maybe there s a library that does this We re using prototype.js and swfobject.js in the application.. . .. . .. . UPDATE : In case I wasn t clear on almost every page in my web application and in every dummy page I ve tested on the box-sizing property has the default content-box value . For some reason one particular page in my web application shows in the web inspector that the user-agent stylesheet the one used by the browser for its defaults has set that property to border-box . I can t for the life of me figure out why this is . I m looking for anything that might cause Firefox to change what its default-value for that property is . .. . Answer : I had the same issue on chrome which by default added the following user-agent style rule : .. . .. . After adding the doctype property DOCTYPE html the rule no longer appeared .", "Question : I m under the impression that the user-agent stylesheet in browsers such as Safari Chrome and Firefox is something that is internal to the browser and can t be directly modified rather a style property needs to be overridden . I m also under the impression due to various websites including Mozilla s that the default-value of the box-sizing property for Webkit and Mozilla is content-box . I tested this on a rather simple dummy page viewed in various browsers . My problem is that on two pages in our production application the default property is different and we can t figure out why this is . One one page we see a box-sizing property of border-box in the Web Inspector or console . It s assigned to the CSS selector input : not type image textarea . On the other page there is no mention of the box-sizing property in the Web Inspector or console . Does anyone know if there s some way to directly affect the box-sizing definition in the user-agent stylesheet for a particular page Maybe there s a library that does this We re using prototype.js and swfobject.js in the application.. . .. . .. . UPDATE : In case I wasn t clear on almost every page in my web application and in every dummy page I ve tested on the box-sizing property has the default content-box value . For some reason one particular page in my web application shows in the web inspector that the user-agent stylesheet the one used by the browser for its defaults has set that property to border-box . I can t for the life of me figure out why this is . I m looking for anything that might cause Firefox to change what its default-value for that property is . .. . Answer : Just had this same issue . What was happening in my case was that someone had put a snippet of Javascript code above the doctype html . As a result when I inspected DOM through firebug it appeared that the document didn t have a doctype . no-doctype http : i.stack.imgur.com gyWXO.jpg .. . .. . When I removed the snippet of JS code such that the doctype declaration was at the very top of the file the doctype reappeared and fixed the box-sizing problems I was seeing the same one you had . See : .. . .. . Has-doctype http : i.stack.imgur.com zyUcJ.jpg .. . .. . Hope this helps . Comment : This saved me a lot of time thanks Comment : Adding DOCTYPE html to my html has solved this issue to me . Comment : Thanks a lot I didn t think I would get anything by searching the css user-agent code that gets added . Comment : The issue for me was a style tag before the DOCTYPE", "Question : I m under the impression that the user-agent stylesheet in browsers such as Safari Chrome and Firefox is something that is internal to the browser and can t be directly modified rather a style property needs to be overridden . I m also under the impression due to various websites including Mozilla s that the default-value of the box-sizing property for Webkit and Mozilla is content-box . I tested this on a rather simple dummy page viewed in various browsers . My problem is that on two pages in our production application the default property is different and we can t figure out why this is . One one page we see a box-sizing property of border-box in the Web Inspector or console . It s assigned to the CSS selector input : not type image textarea . On the other page there is no mention of the box-sizing property in the Web Inspector or console . Does anyone know if there s some way to directly affect the box-sizing definition in the user-agent stylesheet for a particular page Maybe there s a library that does this We re using prototype.js and swfobject.js in the application.. . .. . .. . UPDATE : In case I wasn t clear on almost every page in my web application and in every dummy page I ve tested on the box-sizing property has the default content-box value . For some reason one particular page in my web application shows in the web inspector that the user-agent stylesheet the one used by the browser for its defaults has set that property to border-box . I can t for the life of me figure out why this is . I m looking for anything that might cause Firefox to change what its default-value for that property is . .. . Answer : No you can t touch the browser default stylesheet and yes browsers do have different rules for box-sizing specifically in respect to form fields . This is for compatibility with old browsers that used to implement form fields entirely with native OS widgets that CSS couldn t style and so which didn t have border or padding as such . Why not just put your box-sizing -moz-box-sizing -webkit-box-sizing rule in the site stylesheet Works for me I often use this to make inputs with set widths line up across modern browsers . IE 6 7 don t support it though so need some extra help . Comment : I ended up explicitly defining box-sizing -moz-box-sizing and -webkit-box-sizing in the style sheet but I was hoping to find out what might have caused this weirdness with the user-agent stylesheet . Comment : Well user-agent stylesheets are never guaranteed to be the same but form field rendering is particularly diverse due to the number of different approaches browsers OSes have had towards styling forms with CSS vs native OS theming . Comment : Hi bobince -- I know all too well that different browsers and OSes handle these things differently . We all should as web developers LOL . My issue isn t really with that but with the strange behavior I m experiencing where on isolated small little test pages I m getting the right default behavior whereas on this particular page in my application I m getting this wrong default behavior . In other words the wonky defaults that change from browser to browser should at least be consistent within the single browser but I m not seeing that here . Comment : @natlee75 : Standards vs Quirks mode can also have an effect here .", "Question : I have 3 li items - each with a width of 33.3 . Im trying to create a margin-right gap between each li - however the extra margin makes the total li width exceed 100 and break down on a new line . Would I be able to sort this with some border-box approach Tried to apply it globally with no luck . http : codepen.io anon pen jbazaN .. . Answer : You need the Calc function https : developer.mozilla.org en-US docs Web CSS calc .. . .. . Here you are .. . .. . .. . html .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . : before .. . : after .. . -webkit-box-sizing : inherit .. . -moz-box-sizing : inherit .. . box-sizing : inherit .. . .. . .. . .content .. . width : 700px .. . background : gray .. . padding : 20px .. . .. . .. . ul .. . list-style : none .. . margin : 0 .. . padding : 0 .. . .. . .. . ul li .. . float : left .. . width : calc 33.3 - 20px .. . margin : 0 20px 0 0 .. . background : blue .. . .. . .. . .. . div id wrapper .. . div class content .. . ul .. . li Item 1 li .. . li Item 2 li .. . li Item 3 li .. . div style clear : both div .. . ul .. . div .. . .. . div .. . .. . think about adding prefix or using prefixfree http : leaverou.github.io prefixfree from lea verou . Update : .. . .. . To remove the margin on every third list item inside in your unordered lists you will need the not https : developer.mozilla.org en-US docs Web CSS 3Anot and nth https : developer.mozilla.org en-US docs Web CSS 3Anth-child selectors ul li : not : nth-child 3n+3 .. . .. . live demo .. . .. . .. . html .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . : before .. . : after .. . -webkit-box-sizing : inherit .. . -moz-box-sizing : inherit .. . box-sizing : inherit .. . .. . .. . .content .. . width : 700px .. . background : gray .. . padding : 20px .. . .. . .. . ul .. . list-style : none .. . margin : 0 .. . padding : 0 .. . .. . .. . ul li .. . float : left .. . width : calc 33.3 - 20px .. . margin : 0 20px 0 0 .. . background : blue .. . .. . ul li : not : nth-child 3n+3 margin : 0 20px 0 0 .. . .. . .. . div id wrapper .. . div class content .. . ul .. . li Item 1 li .. . li Item 2 li .. . li Item 3 li .. . div style clear : both div .. . ul .. . div .. . .. . div .. . .. . or write it and then overwrite it to avoid the not selector like this Comment : Cheers - thats pretty cool - didnt know about calc . How would I go about not having margin-right on every third item So margin right would only be apploed to the two first li s Comment : @user1231561 see the update", "Question : I ve never came across this issue but in a nutshell I apply border-box as my box-sizing to all the elements : .. . .. . I than have a responsive column layout in this case 3 columns per row .. . .. . All spans nicely across 3 columns until I add margin to .property div now usually because of border-box this would simply add margin between the columns and leave them 3 in a row but now for some reason 3rd column is pushed to a new row I honestly don t understand why am I missing something Here is live example on jsFiddle : http : jsfiddle.net NmrZZ Comment : Margin is not part of the border-box sizing . Thus width : 33.333 3 + side margins 100 so the last element is pushed to the next row Comment : @ZachSaucier really I swear it worked for me before is there a way to apply such behaviour to margins as well Comment : You ll have to subtract the margins from the width . In your case that would make the width 31.3333 .. . Answer : Margin is not part of the box-model whatever box-sizing you use so it will always be in addition to the width + padding + border you ve declared . The image below from the CSS Tricks http : css-tricks.com box-sizing article on this topic illustrates the difference between the standard box-model and box-sizing : border-box : .. . .. . enter image description here http : i.stack.imgur.com fPdXL.png .. . .. . The best advice I can give is to avoid margins for your grid entirely and to keep it separate from your presentation . This means more markup but will save you headaches and make things much easier to maintain . Check out this fork http : jsfiddle.net cherryflavourpez Zf57L of your example . The amended CSS : .. . .. . And the new markup will be :", "Question : I have 3 li items - each with a width of 33.3 . Im trying to create a margin-right gap between each li - however the extra margin makes the total li width exceed 100 and break down on a new line . Would I be able to sort this with some border-box approach Tried to apply it globally with no luck . http : codepen.io anon pen jbazaN .. . Answer : If you want to support old browsers like IE8 you can use this method by doing little math . In your case you have 3 items and you need to add margin right 20px for first two items that s total 40px . Now deduct this value from the container will be 660px then divide it on the number of items .. . .. . 660 3 220px width for each item final step we need to get the percentage of item width new item width old container width 220 700 .314286 31.429 . And finally we well remove margin right from the last items by adding class to it or use this one .. . .. . ul li + li + li margin-right : 0 because IE8 and lower doesn t support last-child selector .. . .. . In the end your code would be : .. . .. . .. . .. . -webkit-box-sizing : border-box .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . .. . .. . .. . : before .. . : after .. . -webkit-box-sizing : inherit .. . -moz-box-sizing : inherit .. . box-sizing : inherit .. . .. . .. . .content .. . width : 700px .. . background : gray .. . padding : 0px .. . .. . .. . ul .. . list-style : none .. . margin : 0 .. . padding : 0 .. . .. . .. . ul li .. . float : left .. . width : 31.429 .. . margin : 0 20px 0 0 .. . background : blue .. . .. . .. . ul li+li+li .. . margin-right : 0 .. . .. . .. . .. . div id wrapper .. . div class content .. . ul .. . li Item 1 li .. . li Item 2 li .. . li Item 3 li .. . div style clear : both div .. . ul .. . div .. . .. . div .. . .. . Reference : Alternative for nth http : stackoverflow.com a 16175273 5683483 first child and last child for IE8 http : stackoverflow.com a 8840911 5683483 Can i use http : caniuse.com search calc", "Question : Consider this code .. . .. . .. . div .. . box-sizing : border-box .. . .. . width : 0 .. . height : 0 .. . max-width : 0 .. . max-height : 0 .. . .. . border : 1px solid gray .. . padding : 12px .. . overflow : hidden .. . .. . .. . .. . div Hi div .. . .. . According to everything I ve ever read understood and used https : developer.mozilla.org en-US docs Web CSS box-sizing about box-sizing : border-box This should show nothing since the width and height are zero and padding border are inside of the zero width and height . What we see however is a 26x26 box 12 padding + 1 border 2 . What gives Why is border-box not working here Comment : What you want is physically impossible . The browser has to make a choice : either honour the padding or the width . If it would show 0 pixels people would start complaining that it didn t honour the padding . Comment : @MrLister That s the definition of box-sizing : border-box isn t it That width includes padding and border Comment : @MrLister : I don t think this represents an impossible goal so much as it represents a potential bug ambiguity in the spec versus expectation . Comment : @MrLister Correct however I would assume that the browsers internal rendering logic has some conditional that will render this a certain way based on whether or not is has content . Hope you get a detailed answer . Comment : Yeah seriously @DavidThomas that could certainly be considered a bug in the spec .. . Answer : According to the spec http : www.w3.org TR 2015 WD-css3-ui-20150224 box-sizing .. . .. . The content width and height are calculated by subtracting the border and padding widths of the respective sides from the specified width http : dev.w3.org csswg css2 visudet.html propdef-width and height http : dev.w3.org csswg css2 visudet.html propdef-height properties . As the content width and height cannot be negative http : www.w3.org TR CSS21 visudet.html the-width-property CSS21 section 10.2 this computation is floored at 0 . Therefore your element effectively has a height and a width of 0 . But you see it bigger because of the padding and the border . Comment : That doesn t really explain what s going on here . Should the height and width be zero then Comment : @GeorgeMauer Again what you are trying to do is physically impossible . Comment : @GeorgeMauer I think the important part here is where it says The content width . So the content width is 0 but the padding and border are still applied on top of that . Comment : Oooooh I see what you re getting at . Well hell...how do you do a zero-sized container with a padding that expands to a width then Do we still have to hack around things with intermediate elements Comment : @GeorgeMauer An outer wrapper that s 0 and an inner element with the padding", "Question : This question already has an answer here : .. . .. . How to remove the space between inline-block elements questions 5078239 how-to-remove-the-space-between-inline-block-elements 23 answers .. . .. . Not sure what I m doing wrong I thought that by adding border-box it would fit those 4 boxes neatly . http : jsfiddle.net jzhang172 x3ftdx6n .. . .. . .. . .ok .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . .. . .. . .. . div class ok .. . div class box 1 div .. . div class box 2 div .. . div class box 3 div .. . div class box 4 div .. . .. . div .. . Answer : The problem is that inline-block elements are by default rendered with a bit of extra space . Why Because a div set to inline-block has some inline element characteristics . A space or line break between span elements will result in a space rendered by the browser . Similarly if you re writing text in a p element every time you hit the space bar or add a line break a space will be rendered by the browser . This same rule applies to inline-block divs . A space or line break in the source will result in a space rendered . This creates unexpected width which can result in an overflow or wrapping . One solution is to remove all whitespace between elements in the source : .. . .. . .. . .ok .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . .. . .. . .. . div class ok div class box 1 div div class box 2 div div class box 3 div div class box 4 div div .. . .. . Another method sets font-size : 0 on the parent and if necessary restores the font on the child : .. . .. . .. . .ok .. . width : 300px .. . background : red .. . height : 100px .. . box-sizing : border-box .. . font-size : 0 .. . .. . .box .. . display : inline-block .. . box-sizing : border-box .. . width : 25 .. . border : 2px solid blue .. . height : 100 .. . font-size : 16px .. . .. . .. . .. . div class ok .. . div class box 1 div .. . div class box 2 div .. . div class box 3 div .. . div class box 4 div .. . div .. . .. . Other options include negative margins omitting closing tags using comment tags floats and flexbox . See this article for more details : .. . .. . Fighting the Space Between Inline Block Elements https : css-tricks.com fighting-the-space-between-inline-block-elements Comment : Beautiful explanation and links are super helpful I love you marry", "Question : So I found out the hard way that flexbox doesn t respect the box-sizing : border-box CSS declaration . Fine . But is there some way to get that functionality using a flexbox layout Check out this JS Fiddle https : jsfiddle.net a69r38z6 . We have 3 rows with 3 boxes in each row . I d like all the boxes to be the same size . The middle box in the middle row has some margin border properties making it bigger . In the box model we would solve that with box-sizing : border-box . Is there some equivalent in the flexbox model Live Demo : .. . .. . .. . function .. . for var i 1 i 3 i++ .. . div class row id row + i + .appendTo grid .. . .. . for var j 0 j 3 j++ .. . if i 2 j 1 .. . div class box2 .appendTo row + i .. . else .. . div class box .appendTo row + i .. . .. . .. . .. . .. . .. . .. . html .. . padding : 0 .. . margin : 0 .. . width : 100 .. . height : 300px .. . .. . .. . body .. . padding : 0 .. . margin : 0 .. . width : 100 .. . height : 100 .. . .. . .. . grid .. . width : 100 .. . height : 100 .. . box-sizing : border-box .. . border : 25px solid cornflowerblue .. . display : flex .. . flex-direction : row .. . flex-wrap : wrap .. . .. . .. . .row .. . width : 100 .. . height : auto .. . margin : 10px .. . box-sizing : border-box .. . border : 1px solid red .. . display : flex .. . .. . .. . .box .. . flex-grow : 1 .. . margin : 10px .. . background : pink .. . .. . .. . .box2 .. . flex-grow : 1 .. . margin : 10px .. . box-sizing : border-box .. . border : 25px solid purple .. . background : orange .. . .. . .. . .. . script src https : ajax.googleapis.com ajax libs jquery 2.1.1 jquery.min.js script .. . body .. . div id grid div .. . body Comment : @Max - how did you edit the post to include the code on the page like that Comment : Glad you asked Here s a blog post explaining https : blog.stackexchange.com 2014 09 introducing-runnable-javascript-css-and-html-code-snippets . Comment : I also just noticed that the demo doesn t really work if you just click run demo without full screening it . I edited your code to be html height : 300px so it better illustrates what you re trying to show . Hope you don t mind . Comment : Note box-sizing does work with flex-box . However flex-grow distributes available space by increasing the width of the flex items ignoring whether they have borders . Comment : @max I thought the blog post you linked to was related to the actual OP question about flexbox+box-sizing not the question about getting snippets in a post . Not that you can really edit it now but just keep in mind for the future which question you are responding to and for others that blog isn t about flexbox+box-sizing.. . keep on lookin . .. . Answer : I think you need to define the height in order for the box-sizing to work . I added height : 25.3 in the following code which means 300px-25px 2-10px 6 300px-25px 2 3 and the code works . http : jiayuanpulto.github.io test test box-sizing.html", "Question : On the form I have one select and two input fields . These elements are vertically aligned . Unfortunately I can t get equal width of these elements . Here s my code : .. . .. . For above example the best width for select element is 198 or 199 px of course I tried 193px but the difference is major . I think it depends on resolution on various computers and browsers since these elements don t have equal widths sometimes I thinks difference is about 1 or 2 px . I ve tried to set these elements in div or table rows but it doesn t help . Q : How could I get precisely equal width of these elements Comment : Same Question asked here : stackoverflow.com questions 895904 http : stackoverflow.com questions 895904 select-inputs-and-text-inputs-in-html-best-way-to-make-equal-width 899283 .. . Answer : Updated answer .. . .. . Here is how to change the box model used by the input textarea select elements so that they all behave the same way . You need to use the box-sizing property which is implemented with a prefix for each browser .. . .. . This means that the 2px difference we mentioned earlier does not exist. . .. . .. . example at http : www.jsfiddle.net gaby WaxTS 5 .. . .. . note : On IE it works from version 8 and upwards. . .. . .. . .. . .. . Original .. . .. . if you reset their borders then the select element will always be 2 pixels less than the input elements. . .. . .. . example : http : www.jsfiddle.net gaby WaxTS 2 Comment : Thanks for reply . And if I set border for 2px there will be 4 pixels between input and select fields for 3px border - 6px.. . Comment : @luk no . If both input and select have the same border width then the difference will remain to 2 pixels. . Comment : Thanks . I try your code in various browsers and in Firefox everything is all right but it doesn t work in IE 8 and Opera there are differences beetwen input and select width : Comment : @luk you are right . . my mistake. . it seems the select box increases the border on the inside instead of the outside like all other elements. . Comment : It really should be : -ms-box-sizing : content-box -moz-box-sizing : content-box -webkit-box-sizing : content-box box-sizing : content-box The standard syntax should go last to follow progressive-enhancement methodology so that in the future when the standard is widely implemented user agents will default to use the standard syntax and you can remove the prefixed versions .", "Question : Code : .. . .. . HTML .. . .. . CSS .. . .. . JSFiddle : .. . http : jsfiddle.net 5k0ddtdn 4 .. . .. . I m expecting the red border to wrap completely around the blue parent div considering this isn t a border-box . Why doesn t it do that Comment : It s because it isn t border-box that is causing the space . It is currently content-box which means : This is the default style as specified by the CSS standard . The width and height properties are measured including only the content but not the padding border or margin . For more info see Box sizing https : developer.mozilla.org en-US docs Web CSS box-sizing .. . Answer : Add box-sizing : border-box to .box . http : jsfiddle.net 5k0ddtdn 8 .. . .. . In your code the inner element has width 600px + 40px border the parent element .wrap has 640px in total . You need to change box-model or set correct size to inner element width : 560px height : 560px . You can remove width for inner element and set just height : 560px . http : jsfiddle.net 5k0ddtdn 10", "Question : I m learning to build a responsive website for myself . I m having a problem with the box-sizing border-box on the top and bottom borders of one of my images . I have two columns of images of different heights I want the edges to match up but I also want a few pixels of white space to separate each image . My problem is when using box-sizing border-box on the top and bottom borders they stay outside of the edge of the image thus pushing the next image below down by a few pixels making it no longer match it s neighbour on the bottom edge . I want to fix this issue before going ahead and adding borders on the other images . I m new to CSS so perhaps there is something very obvious i ve got wrong Any help to get the borders to stay on the inside edge of the images would be greatly appreciated I ve attached a screen grab of what is happening . border-box problem http : i.stack.imgur.com pRb76.jpg .. . .. . .. . rightCol .. . width : 50 .. . height : auto .. . float : right .. . box-sizing : border-box .. . border-left : 2px solid white .. . .. . rightCol img .. . width : 100 .. . height : 100 .. . display : block .. . .. . leftCol .. . width : 50 .. . height : auto .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . border-right : 2px solid white .. . .. . leftCol img .. . width : 100 .. . height : 100 .. . display : block .. . .. . .innerBorder .. . -moz-box-sizing : border-box .. . box-sizing : border-box .. . border-top : 4px solid white .. . border-bottom : 4px solid white .. . .. . .. . .. . div id rightCol .. . div .. . img src . images pa.jpg .. . div .. . div .. . img src . images game.jpg .. . div .. . div .. . img src . images spine.jpg .. . div .. . div .. . .. . .. . div id leftCol .. . div .. . img src . images truck.jpg .. . div .. . div .. . img class innerBorder src . images ccc.jpg .. . div .. . div .. . img src . images box.jpg .. . div .. . div Comment : box-sizing : border-box doesn t change the position of anything . All it does is make it so that when you specify a size for an element that size includes everything except the element s margins . Normally when you set the size of an element the size is only for the content and then the padding borders and margins are added to that . Comment : Thanks . I understand what border-box can do that s why I thought it ideal for this web page design . It s working correctly on the left and right borders as can be seen by the 4px gap between the columns . What I can t figure out is why on the top and bottom borders of the image black-box of cards aren t contained within the image-size also . They are outside of it as can be seen by it pushing the image below it further down . It s bottom edge is no longer level with the image at the bottom of the right-hand column . How can I fix this so I can keep it within Comment : Well remember that with box-sizing : border-box margins are still NOT included in the size you specify so I would check to see if there are any margins applied . Comment : I ve double checked there are no margins . I thought I could use outline instead of border-box but unlike border I can t specify a particular side like top or bottom it surrounds the entire image . .. . Answer : I don t think your .innerBorder styles are needed . Try this : Comment : This code should look like this firebuilder.com stack preview.jpg http : firebuilder.com stack preview.jpg I used an example image and a gray background so you can see the white inside border on the divs . The borders are included in the box-sizing .", "Question : I come from this question : Understanding offsetWidth clientWidth scrollWidth and -Height respectively http : stackoverflow.com questions 21064101 understanding-offsetwidth-clientwidth-scrollwidth-and-height-respectively .. . .. . I understand that this is the case for the standard box model is that right But what happens when you have something like this : .. . .. . Are offsetWidth and clientWidth equal now Does this happen always with this rule And what about padding-box .. . Answer : Try it out yourself : http : codepen.io anon pen WvojWw .. . .. . By default it is set to box-sizing : border-box but just change that in the styles to get different results . It calculates offsetWidth and clientWidth for you when you click the button . Offset width is equal to all but margins so if you use border-box you re just going to get the width you specify . And client width is equal to all but margins and borders so you re just going to get your specified width - borders when you use border-box . offsetWidth .. . .. . without border-box : .. . .. . offsetWidth width + padding + border .. . .. . with border-box : .. . .. . offsetWidth width .. . .. . clientWidth .. . .. . without border-box : .. . .. . clientWidth width + padding .. . .. . with border-box : .. . .. . clientWidth width - border Comment : So you say that the box-sizing doesn t affect at all they are always the same while border is 0 is that it Comment : @Vandervals Border being 0 is not enough but if the border and padding are both 0 then the box-sizing does not change the end result . But if there is any border or padding then the end result is different . Effectively if you use border-box you will get what you specify as width but without it you will get width + padding + border . Comment : @Vandervals I added a brief summary to my answer about how offsetWidth and clientWidth would turn out .", "Question : Code : .. . .. . HTML .. . .. . CSS .. . .. . JSFiddle : .. . http : jsfiddle.net 5k0ddtdn 4 .. . .. . I m expecting the red border to wrap completely around the blue parent div considering this isn t a border-box . Why doesn t it do that Comment : It s because it isn t border-box that is causing the space . It is currently content-box which means : This is the default style as specified by the CSS standard . The width and height properties are measured including only the content but not the padding border or margin . For more info see Box sizing https : developer.mozilla.org en-US docs Web CSS box-sizing .. . Answer : update your box like so : .. . .. . Live Demo http : jsfiddle.net 5k0ddtdn 9 Comment : Any ideas as to why mine doesn t work Decent solution but the border still doesn t wrap around .wrap at the bottom like it intuitively should .", "Question : I have a container div with a fixed width and a border of 1px . It contains two divs which have a fixed width and height and one is floating to the left and the other is floating the right . I use box-sizing : border-box . An example can be seen here https : jsfiddle.net joker777 6r9dc5pw 5 .. . .. . The problem is that the border size increases when I zoom out and it reduces the space inside the container because I use border-box . This has the consequence that there is not enough space for the two floating divs . Comment : Unless there s a reason for the widths of left-box and right-box to be set in pixels I suggest you set widths as percentages to fix this problem . .. . Answer : container .. . width : 700px .. . border : 1px solid .. . overflow : hidden .. . box-sizing : border-box .. . .. . .. . left-box .. . width : 21.7 .. . height : 150px .. . float : left .. . box-sizing : border-box .. . .. . .. . right-box .. . width : 78.3 .. . height : 150px .. . float : right .. . border-left : 1px solid .. . box-sizing : border-box .. . .. . .. . .. . div id container .. . div id left-box div .. . div id right-box div .. . div Comment : Thanks Dave for this suggestion . It looks very good", "Question : Check out the snippet below . In the first row there are two divs with flex-grow : 1 . As expected each div takes up 50 of the screen . When adding a padding to the left div that is no longer the case . Can someone explain why body div .. . height : 50px .. . display : flex .. . .. . body div div .. . flex : 1 .. . box-sizing : border-box .. . .. . a .. . background-color : red .. . .. . b .. . background-color : green .. . .. . c .. . padding : 10px .. . background-color : blue .. . .. . d .. . background-color : yellow .. . .. . .. . .. . div .. . div id a div .. . div id b div .. . div .. . div .. . div id c div .. . div id d div .. . div .. . Answer : The size of a flex item with padding and flex-grow is based on calculations outlined in the flexbox specification https : www.w3.org TR css-flexbox-1 . These calculations are similar to the sizing of flex items with padding and flex-shrink . Frankly the math is quite technical and not the easiest thing in the world to understand . But if you want to get into it here you go : .. . .. . 9.7 . Resolving Flexible Lengths https : www.w3.org TR css-flexbox-1 resolve-flexible-lengths .. . How does flex-shrink factor in padding and border-box http : stackoverflow.com q 34753491 3597276 .. . .. . .. . .. . Below are some examples that hopefully make the behavior more clear . Keep in mind flex-grow is not a tool for directly establishing the length of a flex item . It s a tool for distributing space in the container among flex items . The flex-basis property sets the initial main size of a flex item . If flex-grow is used with flex-basis the problem in the question is resolved see Demo 4 below . .. . .. . In a block container where you have box-sizing : border-box https : developer.mozilla.org en-US docs Web CSS box-sizing the boxes in your code will render evenly regardless of padding . Demo 1 http : jsfiddle.net btwm9bjy .. . .. . .. . .. . In a flex container where you have box-sizing : border-box and the width or flex-basis https : developer.mozilla.org en-US docs Web CSS flex-basis is used to calculate length the boxes will render evenly regardless of padding . Demo 2 http : jsfiddle.net btwm9bjy 1 .. . .. . .. . .. . In a flex container where you have box-sizing : border-box and flex-grow it will appear that box-sizing doesn t work.. . .. . .. . Demo 3 http : jsfiddle.net btwm9bjy 4 .. . .. . .. . but that s not really correct . flex-grow https : developer.mozilla.org en-US docs Web CSS flex-grow expands the width of a flex item based on available space in the flex container . In other words it ignores padding and borders http : jsfiddle.net btwm9bjy 5 . However if you simply specify flex-grow along with flex-basis the border-box will work : .. . .. . Demo 4 http : jsfiddle.net btwm9bjy 6", "Question : I will start developing a new website and I m getting ready to deal with the different methods browsers use to calculate width and height of elements box model stuff http : www.w3.org TR CSS21 box.html . Somehow it came to my mind : what if I just apply box-sizing to all elements in the website I m one of those who believe that box-sizing : border-box is one of the best commands there is in CSS with all its limitations . However those same limitations are the ones who make me wonder if I should apply box-sizing to all elements : .. . .. . Of course my website should be compatible with as much browsers as possible and box-sizing creates a few questions when we think about IE7- . However sometimes the schedule is so tight that it would be great to gain a few extra minutes by not worrying about this specific issue . Anyway do you think that applying box-sizing : border-box to all elements is a good policy or should I keep doing so only to the elements that actually need it Comment : I m also one for border-box . You might want to read this as well paulirish.com 2012 box-sizing-border-box-ftw http : paulirish.com 2012 box-sizing-border-box-ftw .. . Answer : I think it is a great idea . In fact I will start doing the same on my websites . Here Paul talks about using it in that same fashion .. . .. . http : paulirish.com 2012 box-sizing-border-box-ftw .. . .. . We ve been using box-sizing : border-box in one of my projects deployed in production averaging over 1mln visits a month at work for about a year now and it seems to be holding up just fine . The project has been tested in IE8 9 and the latests Firefox and Chrome versions and we ve had no problems . All jQuery +UI offset calculations and animations run fine even in any element we ve displayed as inline-block . As of late we ve started testing the project on mobile-devices iPhone iPad and Android and we ve had no issues regarding box-sizing with any of them yet so it seems to work just fine . I found this to help take care of the issues in IE7 .. . .. . https : github.com Schepp box-sizing-polyfill", "Question : I have a list of inline-block elements and I want to add a border to the element you hover over . However notice how the border offsets the element even when I use box-sizing : border-box and explicitly define the widths and heights of the elements . I illustrated the behavior below : .. . .. . .. . box-sizing : border-box .. . .. . ul font-size : 0 .. . .. . li .. . display : inline-block .. . width : 100px height : 40px margin : 10px .. . font-size : 20px text-align : center .. . background-color : FFF176 .. . .. . .. . li : hover border : 5px dashed grey .. . .. . .. . ul .. . li hover li .. . li over li .. . li me li .. . ul .. . .. . The best solution I found is to use outline and outline-offset instead of border but I d really like to know why my original method doesn t work : .. . .. . UPDATE : While BoltClock gave a really great explanation and suggestion which was all I was asking for I just wanted to mention that I totally forgot about flexbox https : css-tricks.com snippets css a-guide-to-flexbox which solved pretty much all the problems I was having with inline elements . I combined it with BoltClock s transparent border trick for my final JSFiddle solution https : jsfiddle.net gxzy6t0f 1 Comment : You have a typo . Your CSS says box-sizing : border-box - you have a space rather than a dash in border-box . Comment : alright I fixed the typo thanks . The problem still persists though : .. . Answer : I see the problem now . What s happening is that box-sizing : border-box causes the content box of each element to shrink both horizontally and vertically once you add a border . Because your elements are inline-blocks the vertical shrinking affects the baseline of the element being hovered and therefore the baseline of the line it s on resulting in the other elements on the same line being offset . If you look closely you ll notice that the text actually stays aligned which is the goal of offsetting the elements . Changing the border to an outline works because outlines are designed to have no effect on layout and also because you then take borders completely out of the picture . However it is for this reason that using an outline this way produces a significantly different effect from your original effect with a border . Setting an initial transparent border instead of an outline will ensure that your content stays offset the right amount whether the border is visible against the background this was shown in a previous answer but it was deleted presumably because it was downvoted : .. . .. . .. . box-sizing : border-box .. . .. . ul font-size : 0 .. . .. . li .. . display : inline-block .. . width : 100px height : 40px margin : 10px .. . font-size : 20px text-align : center .. . background-color : FFF176 .. . border : 5px dashed transparent .. . .. . .. . li : hover border-color : grey .. . .. . .. . ul .. . li hover li .. . li over li .. . li me li .. . ul Comment : that transparent border is a sweet trick thanks for the tip", "Question : Dear stackoverflow users .. . .. . I have a div which contains an image generated by php in wordpress . This image will be 100 width and auto height according to the parents div size . I want to apply a border image which overlays the top and bottom of this image . This can be done with box-sizing : border-box . So I did . But for some reason the border does not overlay the image and the image gets reduced in height size or the parent increases its height size . I m stuck on this for ages . Is there anyway this can be done with only css jsfiddle : http : jsfiddle.net SE3Na .. . .. . HTML .. . .. . CSS .. . Answer : I find : before and : after to be useful for this kind of endeavor : .. . .. . See it in action at JSFiddle http : jsfiddle.net SE3Na 2 Comment : Thank you I was inexperienced with the before and after elements . I took your piece of code as a basis and slightly adjusted it in the way i wanted it to work . I wanted the image to be spread 100 according to its parent box1 . So I added this . Then i added the box-sizing instead of the background-image . This gave me some trouble it compressed the border image and repeated it in this compression . I fixed this by an height of 110 and an overflow : hidden . Not the most beautiful way but it does the trick . Example : jsfiddle.net SE3Na 3 http : jsfiddle.net SE3Na 3", "Question : I am using lots of divs that have absolutely positioned children divs inside them . What I am trying to do is put a border inside the div but to not interact with the absolute positioned elements inside . almost like a floating border .. . .. . I ve tried using outline but that doesn t work as it really need it inside the .box divs .. . .. . I ve also tried box-shadow inset but this still moves the content . Is there any way for me to do this .box .. . height : 200px .. . width : 100px .. . background : red .. . border-collapse : collapse .. . position : relative .. . display : inline-block .. . .. . .. . .box : hover .. . border : 22px solid black .. . border-collapse : collapse .. . box-sizing : border-box .. . .. . .silly .. . color : ffffff .. . position : absolute .. . left : 0px .. . top : 0 .. . .. . .silly1 .. . color : ffffff .. . position : absolute .. . left : 30px .. . top : 160px .. . .. . .silly2 .. . color : ffffff .. . position : absolute .. . right : 0 .. . top : 90px .. . .. . .silly3 .. . color : ffffff .. . position : absolute .. . left : 10px .. . top : 40px .. . .. . .. . .. . div class box .. . .. . div class silly I am box div .. . div class silly1 1 div .. . div class silly2 2 div .. . div class silly3 3 div .. . div .. . .. . div class box .. . div class silly I am box div .. . div class silly1 1 div .. . div class silly2 2 div .. . div class silly3 3 div .. . div .. . .. . div class box .. . div class silly I am box div .. . div class silly1 1 div .. . div class silly2 2 div .. . div class silly3 3 div .. . div .. . .. . here is the DEMO https : jsfiddle.net susannalarsen m0cdwph2 Comment : See this jsfiddle.net m0cdwph2 1 https : jsfiddle.net m0cdwph2 1 .. . Answer : Add an extra child div inside of the .box element and apply the current .box : hover styling to it . Make sure this new child div is position : absolute to remove it from the flow . As an aside I tend to apply box-sizing : border-box to all elements using the selector . .. . .. . box-sizing : border-box .. . .. . .box .. . height : 200px .. . width : 100px .. . background : red .. . border-collapse : collapse .. . position : relative .. . display : inline-block .. . .. . .. . .border .. . position : absolute .. . top : 0 .. . left : 0 .. . height : 100 .. . width : 100 .. . .. . .box : hover .border .. . border : 22px solid black .. . .. . .silly .. . color : ffffff .. . position : absolute .. . left : 0px .. . top : 0 .. . .. . .silly1 .. . color : ffffff .. . position : absolute .. . left : 30px .. . top : 160px .. . .. . .silly2 .. . color : ffffff .. . position : absolute .. . right : 0 .. . top : 90px .. . .. . .silly3 .. . color : ffffff .. . position : absolute .. . left : 10px .. . top : 40px .. . .. . .. . .. . div class box .. . div class border div .. . div class silly I am box div .. . div class silly1 1 div .. . div class silly2 2 div .. . div class silly3 3 div .. . div Comment : while adding box-sizing : border-box is a good practice when you first start development retroactively adding it could cause any sort of layout issues . Comment : This is an excellent point however personally i wouldn t dream of starting a project without using it :" ] }
[ "yes-answer-long", "yes-answer-short" ]
css
UNK_RELATION
gumby-framework@sass@144
gumby-framework -- create rapid and logical page layout and app prototypes with gumby-framework a flexible responsive css framework powered by @placeholder .
{ "confidence": [ 64.86318969726562, 63.29746627807617, 63.29746627807617, 63.2951774597168, 59.874881744384766, 59.468841552734375, 57.54339599609375, 57.54339599609375, 57.54339599609375, 57.54339599609375, 54.202999114990234, 53.493927001953125, 52.01332092285156, 51.810420989990234, 49.792694091796875, 49.792694091796875, 49.60381317138672, 48.75033187866211, 48.72773742675781, 48.407005310058594, 48.15629577636719, 47.811405181884766, 47.42580795288086, 47.040245056152344, 46.92416000366211, 46.17670822143555, 45.90258026123047, 45.760250091552734, 45.35673522949219, 45.04909896850586, 43.56774139404297, 43.39336395263672, 43.339012145996094, 40.05813980102539, 39.866512298583984, 39.866512298583984, 39.866512298583984, 39.73610305786133, 38.9798698425293, 38.89030456542969, 38.029685974121094, 37.2067985534668, 35.859683990478516, 35.18907165527344, 35.18907165527344, 35.18907165527344, 35.18907165527344, 35.18907165527344, 35.18907165527344, 35.18907165527344, 35.18907165527344, 35.18907165527344, 34.61141586303711, 34.201438903808594, 33.96779251098633, 33.337669372558594, 32.82218551635742, 32.77130889892578, 32.659610748291016, 32.65729522705078, 32.32638168334961, 32.32638168334961, 31.137788772583008, 30.639572143554688, 30.639572143554688, 29.95949363708496, 29.95949363708496, 29.12006378173828, 28.27268409729004, 27.566307067871094, 27.118274688720703, 25.685405731201172, 23.578725814819336, 22.55765724182129, 22.55765724182129, 22.55765724182129, 21.53298568725586, 21.53298568725586, 20.919445037841797, 20.919445037841797, 20.905864715576172, 20.507186889648438, 20.454715728759766, 20.20346450805664, 20.178728103637695, 20.178728103637695, 19.929744720458984, 19.929744720458984, 19.272884368896484, 19.272743225097656, 19.175188064575195, 18.856426239013672, 18.856426239013672, 18.856426239013672, 18.856426239013672, 18.856426239013672, 18.856426239013672, 18.5264892578125, 18.230003356933594, 17.83175277709961 ], "content": [ "Tutsplus has a nice straight forward tutorial on Gumby framework check this out http : hub.tutsplus.com tutorials introducing-gumby-an-alternative-css-framework--webdesign-15438", "I am using them with the Gumby Framework .", "I m starting to build a new portfolio with this Gumby framework .", "I did this using the gumby-framework https : github.com jorgecoca gumby-framework gem .", "Using gumby CSS framework when in mobile layout the top level anchors with dropdowns are clickable .", "I have used simple Gumby framework to create the tabs .", "Using the Gumby Framework I m encountering issues nesting divs .", "Is there a way to use the FontAwesome icons in the Gumby Framework like in Twitter BootStrap", "Very specific question about working with the respond mixin in the Gumby framework .", "i am having trouble with gumby-framework particularly toggles and switches .", "I m creating a new site with the Gumby CSS Framework : http : gumbyframework.com .. . .. . When I use their JQuery to check for button click and wrap inside their Gumby JS ready function .. . .. . The event is fired twice .", "I am using the Gumby framework http : gumbyframework.com docs grid and am having a problem with the columns .", "According to the Gumby documentation using the toggles and switches provided in Gumby one can create an accordion .", "This is probably a dumb question but I think the documentation is very lacking on the gumby-framework on forms and validation .", "I just came across Gumby Framework http : gumbyframework.com and I ve downloaded the zip file from their website .", "I m using the gumby-framework from here http : gumbyframework.com and everything seems to be going well .", "I believe Gumby uses tables .", "I do not know if this is something only Gumby has or if other frameworks have the same framework but I will update this answer once I find out .", "The demo works fine I moved that across into the Gumby folder and works no probs its just when I put it into a gumby page .", "I recently got two similar jobs of porting a responsive website from one framework to another ie Zurb Foundation to Bootstap and Gumby Framework to Zurb Bootstrap .", "I have a gumby modal defined in my home page .", "Which is required by gumby .", "I ve installed gumby-framework and modernizr-rails gems but when I add require modernizr to applications.js it can t find them .", "Does Gumby use floats for its columns", "I have a simple rails project ruby-1.9.3 rails 3.2.13 and I am attempting to incorporate the Gumby CSS Framework http : gumbyframework.com .", "And if you remove the @media rules from gumby it will be a fixed layout .", "Anyone used Gumby with rails successfully", "I am totally new to gumby and css-frameworks in general .", "According to the Documentation Gumby will automatically initialize by default .", "I ve chosen Gumby because I like SASS more than LESS so I would like to try a framework based on this language .", "So what is the proposed way for centering such container class in Gumby 2.6", "The resulting compiled css appears in public assets gumby gumby.css .", "I downloaded Gumby 2 and incorporated it into my website .", "Using the Gumby inview extension : http : gumbyframework.com docs extensions inview .. . .. . Edit : added html : .. . .. . css :", "I am trying to integrate the Gumby frame http : gumbyframework.com work with rails .", "Oddly Gumby will compile but then it just skips over the media query .", "I am using GUMBY and have added the drop-downs .", "Even more annoying I did have it working at some point but I can t get it to work again using gumby-framework and inview js to add a class when the element is on screen adding .animated .", "Can you send me a link of any page around using gumby with the tabs you want to change on it .", "I am trying to use Nivoslider with Gumby but everytime I copy the code into my homepage it just doesnt work .", "Skipping is not possible not according to the source of the respond mixin : github.com GumbyFramework Gumby blob master sass functions https : github.com GumbyFramework Gumby blob master sass functions responsivity.scss", "I had to manually perform validation as I could not get the Gumby validation to work .", "The framework isn t smart .", "Just add a second style sheet and make sure to include it after gumby then add rules for your colors .", "You re using gumby-trigger nav1 something .something but your navigation element is id nav3", "If I use the Gumby s UI demo on the website it works...either for some website I saw here on stackoverflow that use gumby", "But when I look for some help on Gumby Framwork I almost always find a mention of this Bower tool .", "Should I continue using Gumby the like how I m doing now or should I actually look into this tool", "I dont think respond in gumby is setup to do this but maybe somebody on here has tried", "I had Gumby running in a Yeoman instance with instant SCSS compiling - so you immediately know if you are screwing it up .", "Gumby skips over it and still manages to compile the code above if I run the grunt build script .", "the js is added via gumby inView extension : gumbyframework.com docs extensions inview http : gumbyframework.com docs extensions inview", "You can do this by checking out their github demo here https : github.com GumbyFramework Gumby blob master demo.html .. . .. . Look how they add their css files in relation to where their css files are located .", "Gumby Tabs Documentation http : gumbyframework.com docs ui-kit tabs .. . .. . I haven t added any other inline CSS or JS for this portion .", "I have this form preset from Gumby framework : .. . .. . Codepen http : codepen.io anon pen jWqLvo .. . .. . I d like to modify it so it would work as a mailchimp newsletter form : .. . .. . Codepen http : codepen.io anon pen mVPMzx .. . .. . Could you guide me through the process", "For sake of completeness the majority of the post contains information skip to the end for the actual problem . .. . .. . The working directory is being watched with .. . .. . Compass was incorporated into the project with : .. . .. . The contents of config compass.rb is : .. . .. . And the location of Gumby source SCSS is app assets stylesheets gumby .", "This is the first site I have built with Gumby and I am something of a beginner when it comes to web design in general .", "I am using the gumby.css framework http : gumbyframework.com and currently have the following HTML : .. . .. . And the following css : .. . .. . The first css rule for sect .three.columns img : hover works perfectly indicating I have selected the right element .", "If anyone is wondering I m following this guide http : gumbyframework.com docs to learn how to use Gumby : Apparently when I run compass compile it is supposed to generate a css file from my scss file but that doesn t happen .", "While in at it anyone no how to validate zip and phone-number using this framework", "I don t know what code to post because it s simply the ui.html who all of you can find inside the downloaded gumby package .", "I did a bunch of these tutorials : http : webdesign.tutsplus.com series getting-to-know-gumby--webdesign-16738 .. . .. . You don t have to use Bower if you don t want to .", "CodePen demo here : http : codepen.io ptimson pen LseFk editors 101 .. . .. . HTML .. . .. . JS .. . .. . Note : Removing Gumby.ready works but I need to keep that function so that I know the Gumby functions are available right", "Just thought initially that the framework was somehow able to account for that in the nesting .", "Once you set aside enough pieces you can call it a framework .", "Ok after much digging I ve found a way to incorporate Gumby into Rails however I ve lost the ability to edit the scss in the process .", "I d really like to be able to put an override file in with the gumby sass source files and have rails do the compilation for easy changeability", "in gumby it seems that using normal jquery like .. . .. . does not apply since you have to use its javascript onTrigger functions just like what i did here .", "The framework requires Compass http : compass-style.org with modular-scale .", "Still...it s up to you the author to wrap your head around how 10col actually works within the confines of that framework .", "I need to develop a easy web site I usually use bootstrap CSS framework but this I want to use Gumbyn which allow me to 16 columns instead of 12 .", "It would be easy to do with a traditional media query but I want to use the framework hooks wherever I can keep my codebase light .", "Just to make sure I m following you on this : The framework is using its normal percentage based values but when it comes to nesting 100 of the containing DIV isn t the equivalent to 100 of the 12 columns grid .", "Check whether there is any URL for files like css js .", ": .. . .. . Demo Fiddle http : jsfiddle.net swfour ZLkXG 1 .. . .. . HTML .. . .. . CSS", "I will edit my question to include the CSS I have .", "Trying to change the content of an image by clicking another image image-gallery viewer using pure HTML CSS .", "The syntax of your css is incorrect.. . unless you re using SASS or something that i m not familiar with", "For beginning you will find great tutorials on Css-tricks http : css-tricks.com .", "Reason and solutions are discussed here https : css-tricks.com restart-css-animation .", "CSS rules depend on degrees of decendancy and cannot traverse the DOM by say ascending up one parent level then moving across and back down in layman terms .", "I have been to http : gumbyframework.com but was unable to find a simple beginners guide eg how to include the css files to your web page .", "So I do redirect to home modal trigger it would re direct to home page and automatically launch the modal .", "This isnt possible - CSS rules depend on degrees of decendancy and cannot traverse the DOM by say ascending up one parent level then moving across and back down in layman terms .", "This is what I get for CSS output", "Are you even looking at the compiled CSS", "I have managed to get the CSS working by including the CSS files however I am finding it difficult .", "Did you use the sass files and have rails compile it or are you compiling the css manually then including the .css files", "How can I use a fixed layout instead of a fluid one", "To do so I had to create my own chunks which are below .", "When you say .. . .. . preventing responsive elements .. . .. . Do you mean event handlers and the like are not bound to the new HTML that has been loaded", "I ve tried a few variations with my HTML CSS to no avail .", "Can you post up how you included the CSS as well .", "I ve found various css img js etc folders .", "I edit the CSS file in between to suit my paragraphs etc .", "Need to see how you re adding the class with JS and the relevant css .", "The only thing I can say is try adding this your css .", "You need to create a unique class name instead of using output for all sliders .", "For example : .. . .. . HTML : .. . .. . CSS : .. . .. . As for the rows .", "To your dilemma you could write some CSS to accomodate your one-off situations : .ten.columns .three.columns .. . .ten.columns .seven.columns .. ." ] }
{ "confidence": [ 77.57340240478516, 73.4059829711914, 72.08450317382812, 72.08419799804688, 69.19303894042969, 69.16504669189453, 68.95309448242188, 68.34718322753906, 65.14923858642578, 63.425052642822266, 62.264095306396484, 61.91669464111328, 59.9138298034668, 58.850921630859375, 58.3764762878418, 58.2673225402832, 58.25987243652344, 57.93922424316406, 57.82777404785156, 57.24602127075195 ], "content": [ "Question : I am totally new to gumby and css-frameworks in general . I have been to http : gumbyframework.com but was unable to find a simple beginners guide eg how to include the css files to your web page . A simple hello world tutorial would be appreciated . .. . Answer : Tutsplus has a nice straight forward tutorial on Gumby framework check this out http : hub.tutsplus.com tutorials introducing-gumby-an-alternative-css-framework--webdesign-15438 Comment : Your link is broken", "Question : I need to develop a easy web site I usually use bootstrap CSS framework but this I want to use Gumbyn which allow me to 16 columns instead of 12 . I was wondering if : .. . .. . Can I change the green color easily How can I use a fixed layout instead of a fluid one is it compatible with all browser Thanks .. . Answer : Yes you can change the green . Just add a second style sheet and make sure to include it after gumby then add rules for your colors . And if you remove the @media rules from gumby it will be a fixed layout . I am sure it is compatible . Comment : I need to change the tabs color can you be a bit more precise Comment : Can you send me a link of any page around using gumby with the tabs you want to change on it .", "Question : I have a simple rails project ruby-1.9.3 rails 3.2.13 and I am attempting to incorporate the Gumby CSS Framework http : gumbyframework.com . The framework requires Compass http : compass-style.org with modular-scale . For sake of completeness the majority of the post contains information skip to the end for the actual problem . .. . .. . The working directory is being watched with .. . .. . Compass was incorporated into the project with : .. . .. . The contents of config compass.rb is : .. . .. . And the location of Gumby source SCSS is app assets stylesheets gumby . The resulting compiled css appears in public assets gumby gumby.css . The following is within my Gemfile .. . .. . And bundle install completes without errors . However.. . .. . .. . The following error message appears on all served pages : .. . .. . Sass : : SyntaxError in Users index .. . .. . Showing PROJECT ROOT app views layouts application.html.erb where line 5 raised : .. . .. . After hours of tinkering I am at a loss as to the reason why Sass cannot read the Compass library . .. . Answer : Ok after much digging I ve found a way to incorporate Gumby into Rails however I ve lost the ability to edit the scss in the process . I did this using the gumby-framework https : github.com jorgecoca gumby-framework gem . Setup was simple following the README . Comment : Yea . i am at the same point . I d really like to be able to put an override file in with the gumby sass source files and have rails do the compilation for easy changeability", "Question : I am using the Gumby framework http : gumbyframework.com docs grid and am having a problem with the columns . I have the following code : .. . .. . With the following SCSS : .. . .. . The columns eight and columns three display correctly but the columns one has a height of only one pixel despite having content in it . What would cause this to happen Comment : Does Gumby use floats for its columns Does your img have any style on it Add display : block to the img and see if that fixes it . If not try floating it . Comment : I believe Gumby uses tables . display : block did not work . I will edit my question to include the CSS I have . Comment : The syntax of your css is incorrect.. . unless you re using SASS or something that i m not familiar with Comment : Yes I am using SASS . Comment : Then you need to specify a width for the image . also please tag-it in question . .. . Answer : It seems that .. . .. . position : absolute .. . .. . on the image caused the column to collapse to 1 pixel . I do not know if this is something only Gumby has or if other frameworks have the same framework but I will update this answer once I find out . Comment : That s why i said you need to set the width explicitly - -", "Question : I m creating a new site with the Gumby CSS Framework : http : gumbyframework.com .. . .. . When I use their JQuery to check for button click and wrap inside their Gumby JS ready function .. . .. . The event is fired twice . I ve spent a while trying to debug and cant work it out . CodePen demo here : http : codepen.io ptimson pen LseFk editors 101 .. . .. . HTML .. . .. . JS .. . .. . Note : Removing Gumby.ready works but I need to keep that function so that I know the Gumby functions are available right .. . Answer : You re right removing Gumby.ready is ok . According to the Documentation Gumby will automatically initialize by default . For manual initialization you have to load the script with a flag : .. . .. . And than you can call Gumby.init .ready .. . .. . Here s the Documentation http : gumbyframework.com docs javascript manual-initialization . Best . Comment : Thanks Eugen removing gumby.init.js worked : Comment : You are welcome :", "Question : Using gumby CSS framework when in mobile layout the top level anchors with dropdowns are clickable . When clicked the anchor loads a new page instead of showing the dropdowns . Has anyone encountered this problem and found a solution .. . Answer : Your anchor was pointing to google.com instead of itself Also I would try and avoid opening a div inside of a list for your css to use instead add aclass to your lists should be :", "Question : I have a simple rails project ruby-1.9.3 rails 3.2.13 and I am attempting to incorporate the Gumby CSS Framework http : gumbyframework.com . The framework requires Compass http : compass-style.org with modular-scale . For sake of completeness the majority of the post contains information skip to the end for the actual problem . .. . .. . The working directory is being watched with .. . .. . Compass was incorporated into the project with : .. . .. . The contents of config compass.rb is : .. . .. . And the location of Gumby source SCSS is app assets stylesheets gumby . The resulting compiled css appears in public assets gumby gumby.css . The following is within my Gemfile .. . .. . And bundle install completes without errors . However.. . .. . .. . The following error message appears on all served pages : .. . .. . Sass : : SyntaxError in Users index .. . .. . Showing PROJECT ROOT app views layouts application.html.erb where line 5 raised : .. . .. . After hours of tinkering I am at a loss as to the reason why Sass cannot read the Compass library . .. . Answer : I believe I found the solution from http : stackoverflow.com a 9021785 1280997 . Removing config compass.rb and rebooting the server fixes the immediate problem however I am now faced with :", "Question : Very specific question about working with the respond mixin in the Gumby framework . To get retina background images working right in CSS you would need to use the respond mixin http : gumbyframework.com docs mixins respond and pass the min-device-pixel-ratio attribute . I dont think respond in gumby is setup to do this but maybe somebody on here has tried It would be easy to do with a traditional media query but I want to use the framework hooks wherever I can keep my codebase light . Any insights Code sample below - I think this is how you would format this in SCSS . This is what I get for CSS output Comment : What was the generated result Comment : I had Gumby running in a Yeoman instance with instant SCSS compiling - so you immediately know if you are screwing it up . Oddly Gumby will compile but then it just skips over the media query . Comment : Skipping is not possible not according to the source of the respond mixin : github.com GumbyFramework Gumby blob master sass functions https : github.com GumbyFramework Gumby blob master sass functions responsivity.scss Comment : Gumby skips over it and still manages to compile the code above if I run the grunt build script . Its just nothing happens . Maybe I should hack that mixin you pointed out . I could build compound media-queries in there . Comment : Are you even looking at the compiled CSS There shouldn t be any hacking necessary . .. . Answer : As it turns out yes this is possible and the above syntax does work .", "Question : Is there a way to use the FontAwesome icons in the Gumby Framework like in Twitter BootStrap .. . Answer : I am using them with the Gumby Framework . The fonts are in the fonts icons folder . The .scss files are in my var icons folder . Then in the gumby.scss file add @import var icons font-awesome . Don t forget to set the fa-font-path in the variables.scss file", "Question : I m starting to build a new portfolio with this Gumby framework . I ve chosen Gumby because I like SASS more than LESS so I would like to try a framework based on this language . The problem is that the mobile navigation doesn t work for me . If I use the ui.html inside the downloaded package and I resize the browser window the three lines icon appears but if I click nothing happend If I use the Gumby s UI demo on the website it works...either for some website I saw here on stackoverflow that use gumby I ve checked all the paths the developer told me that I have to use gumby.min.js and it s uncomment by default so i don t know why this mobile menu doesn t work for me . Maybe I have to work online with the website hosted on a server But I ts strange.. . I don t know what code to post because it s simply the ui.html who all of you can find inside the downloaded gumby package . .. . Answer : I don t know javascript well so I cannot explain how why this works but there is an issue with toggleswitch.js . Add e.stopImmediatePropagation to line 45 . That s what worked for me . If someone knows how or why this works I would love to learn .", "Question : I have a modified version of animate.css added some delay new timings and new positions and it works really great when the classes are set by default html document . But when I am adding the animate class dynamically via js the animation is not executed Even more annoying I did have it working at some point but I can t get it to work again using gumby-framework and inview js to add a class when the element is on screen adding .animated . The left box had the classes already in the html and the right box have the .animate class added by js . Example : .. . http : onepageframework.com 28 2 14 strange anim.html .. . .. . Any ideas why the right box is not animating Using the Gumby inview extension : http : gumbyframework.com docs extensions inview .. . .. . Edit : added html : .. . .. . css : Comment : Without code this question lacks sufficient information to diagnose the problem Comment : Need to see how you re adding the class with JS and the relevant css . Comment : the js is added via gumby inView extension : gumbyframework.com docs extensions inview http : gumbyframework.com docs extensions inview .. . Answer : By swaping the classes it looks like it got it to work aminated in the class and fadeInLeftMedium as the data-classname :", "Question : I am trying to use Nivoslider with Gumby but everytime I copy the code into my homepage it just doesnt work . The demo works fine I moved that across into the Gumby folder and works no probs its just when I put it into a gumby page . Has any one else had this problem Comment : Please provide details your code etc . or expect this question to be closed soon .. . Answer : Check whether there is any URL for files like css js . If it is web download that file and use it in your local .", "Question : Is there a way to use the FontAwesome icons in the Gumby Framework like in Twitter BootStrap .. . Answer : I ve came across this problem and what i did was to place this code in my css : .. . .. . Then whereever you want to use font-awesome icons you can just attached that class to the wrapping element . If you want you can add that class to your body tag in order to always have the font-awesome library at your disposal .", "Question : This is probably a dumb question but I think the documentation is very lacking on the gumby-framework on forms and validation . How to I get three text boxes on one line correctly . Everything I ve tried the validation carets get all screwed up . I want quantity product num and des on one row . While in at it anyone no how to validate zip and phone-number using this framework I cannot find any documentation on their validation . .. . Answer : I had to manually perform validation as I could not get the Gumby validation to work . My jQuery looks like so : .. . .. . .. . and my inline fields look like so : .. . .. . To get the carets to line up nicely you might want to try wrapping your individual .field elements inside a div.row If you decide to go this route you have a tappable validation function - writing your own regex for matching zip codes might look like so : .. . .. . But of course that s a very simple example . Good luck :", "Question : Is there a way to use the FontAwesome icons in the Gumby Framework like in Twitter BootStrap .. . Answer : Are you using RoR I got it working there . You need to change the path where your fonts are located in the variables partial . change it to assets this might work .", "Question : I have a modified version of animate.css added some delay new timings and new positions and it works really great when the classes are set by default html document . But when I am adding the animate class dynamically via js the animation is not executed Even more annoying I did have it working at some point but I can t get it to work again using gumby-framework and inview js to add a class when the element is on screen adding .animated . The left box had the classes already in the html and the right box have the .animate class added by js . Example : .. . http : onepageframework.com 28 2 14 strange anim.html .. . .. . Any ideas why the right box is not animating Using the Gumby inview extension : http : gumbyframework.com docs extensions inview .. . .. . Edit : added html : .. . .. . css : Comment : Without code this question lacks sufficient information to diagnose the problem Comment : Need to see how you re adding the class with JS and the relevant css . Comment : the js is added via gumby inView extension : gumbyframework.com docs extensions inview http : gumbyframework.com docs extensions inview .. . Answer : I think you just need to add animated as a class rather than as data-classname animated .. . So basically : .. . .. . Should be : .. . .. . Otherwise the animation lacks a specified animation duration and without the animation-duration property specified the animation won t work . Comment : The whole idea is to use inview to add the class so that you will see the animation when scrolling down to that element . The left box is as you have set it up and it does animate . But if the element is further down the page the animation will be fired before the user can see it . Comment : @code-zoop I m just trying to say that you need something more like your-element .addClass animated and whatever other classes so that the classes get added as classes rather than as data . Comment : Yes I understand . But the inview extension is taking the data from the data-classname and adding it as a class . Thats the whole idea with the inview extension and it does add the class at it should but the animation is not executed : gumbyframework.com docs extensions inview http : gumbyframework.com docs extensions inview", "Question : I recently got two similar jobs of porting a responsive website from one framework to another ie Zurb Foundation to Bootstap and Gumby Framework to Zurb Bootstrap . Do I have to personally go through the various nitty gritties functions and all or is there any other way . Also aren t these three frameworks connected functions and all similar . I ve heard that Gumby s basically a fork of Zurb Foundation How much work do you think i ll have to do I am relatively new to responsive-design and this isn t one of my highest paying projects : D Comment : What research have you done yourself .. . Answer : Just replace the CSS JS files and then do a find replace in all of your HTML files to swap in the correct classes . For instance if you were going from Bootstrap to Foundation you would have to change all instances of col-sm-12 to small-12 columns .", "Question : I have a modified version of animate.css added some delay new timings and new positions and it works really great when the classes are set by default html document . But when I am adding the animate class dynamically via js the animation is not executed Even more annoying I did have it working at some point but I can t get it to work again using gumby-framework and inview js to add a class when the element is on screen adding .animated . The left box had the classes already in the html and the right box have the .animate class added by js . Example : .. . http : onepageframework.com 28 2 14 strange anim.html .. . .. . Any ideas why the right box is not animating Using the Gumby inview extension : http : gumbyframework.com docs extensions inview .. . .. . Edit : added html : .. . .. . css : Comment : Without code this question lacks sufficient information to diagnose the problem Comment : Need to see how you re adding the class with JS and the relevant css . Comment : the js is added via gumby inView extension : gumbyframework.com docs extensions inview http : gumbyframework.com docs extensions inview .. . Answer : The reason is the same why you can t re-trigger CSS based animations by just subsequently removing and adding a class . The reason is that browsers batch-up these modifications and optimize away the animation . Reason and solutions are discussed here https : css-tricks.com restart-css-animation .", "Question : null .. . Answer : According to the Gumby documentation using the toggles and switches provided in Gumby one can create an accordion . How can one do this for an accordion with more than two drawers", "Question : I have this form preset from Gumby framework : .. . .. . Codepen http : codepen.io anon pen jWqLvo .. . .. . I d like to modify it so it would work as a mailchimp newsletter form : .. . .. . Codepen http : codepen.io anon pen mVPMzx .. . .. . Could you guide me through the process .. . Answer : I started with the MailChimp Signup Form you gave and them I merged with the HTML CSS code you wanted . Here s the code : .. . .. . JSFIDDLE Demo : https : jsfiddle.net 9f3db7Lw 1 .. . .. . I tried with a domain.list-managed i had to verify it if worked and it was ok . I think you can use it straight out the box if you replace with your domain . Cheers Joel" ] }
[ "yes-answer-long", "yes-answer-short" ]
sass
UNK_RELATION
outlook.com@web@226
outlook.com -- outlook.com is a microsoft webmail service : a translation of the outlook desktop application to a web service using the metro design language it is scheduled to replace microsoft s hotmail service and outlook @placeholder access .
{ "confidence": [ 70.01602935791016, 56.61500930786133, 56.19290542602539, 54.84844970703125, 53.72288513183594, 50.97642517089844, 50.91022872924805, 49.65242385864258, 48.573394775390625, 44.15929412841797, 43.794498443603516, 43.590248107910156, 42.450042724609375, 42.19563674926758, 42.19563674926758, 42.18347930908203, 41.91203308105469, 41.68711471557617, 41.464141845703125, 41.073883056640625, 40.60712432861328, 40.56127166748047, 40.492576599121094, 39.770111083984375, 39.4785270690918, 39.04353713989258, 38.70150375366211, 38.205352783203125, 38.205352783203125, 38.15232849121094, 38.095062255859375, 38.026371002197266, 38.026371002197266, 37.98905944824219, 37.90755844116211, 37.08359909057617, 36.79808044433594, 36.79808044433594, 36.79808044433594, 36.79808044433594, 36.76438903808594, 36.39197540283203, 36.12638473510742, 36.022071838378906, 35.874298095703125, 35.7391471862793, 35.683536529541016, 35.152652740478516, 35.107177734375, 35.107177734375, 35.107177734375, 35.0490608215332, 34.89235305786133, 34.56679153442383, 34.50294876098633, 33.98542404174805, 33.98542404174805, 33.98542404174805, 33.98542404174805, 33.872318267822266, 33.38927459716797, 33.38927459716797, 33.19317626953125, 33.16067123413086, 33.13514709472656, 33.02633285522461, 32.97681427001953, 32.96380615234375, 32.917640686035156, 32.66706085205078, 32.64097213745117, 32.64097213745117, 32.624855041503906, 32.624855041503906, 32.598548889160156, 32.16337585449219, 31.90371322631836, 31.90371322631836, 31.16446304321289, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.933956146240234, 30.923067092895508, 30.8877010345459, 30.849042892456055, 30.70376205444336, 30.518932342529297, 30.07075309753418, 29.81220245361328, 29.81220245361328, 29.81220245361328, 29.81220245361328, 29.81220245361328 ], "content": [ "But I want to write it to the web app Outlook.com and not the desktop application Outlook : - .", "Is this a bug in hotmail Outlook.com", "The email looks great in both Outlook and Gmail but not in outlook.com .", "Outlook Signature http : i.stack.imgur.com KSEnI.png .. . .. . Outlook.com : .. . .. .", "Actually I ve setup my outlook.com account on MS Outlook .", "Outlook.com does not support programmatic access to tasks at this point .", "But if I forward this mail from outlook-2007 to outlook.com email break as like this .. . .. .", "It really works for office365 but what about outlook.com hotmail .", "It s been a while since I made an e-mail template but last time I did Outlook and Outlook.com Hotmail didn t support the style tag .", "Exchange Online Office 365 is separate service from Outlook.com that runs on different software stack .", "enter image description here http : i.stack.imgur.com kYC6r.png .. . .. . HTML .. . .. . Above code work fine for gmail outlook-2007 outlook.com .", "What shall I do to access outlook.com delete calendar import a .ics file from a Windows 7 desktop", "Anyone know of another technique to hide content for Outlook without breaking Outlook.com emails", "In outlook.com it renders terribly .", "Does Outlook.com support EWS", "Does outlook.com support SEARCH NOT .. . command", "So how to make it set on desktop and outlook.com", "I m using the outlook REST API v 2.0 and I m able to use contacts to get all the contacts from my outlook.com account so far so good .", "I want to know how can i apply a signature to my hotmail outlook.com office365 using REST API .", "Gmail is able to handle that Outlook.com not .", "I was using the following conditional statement to hide content in Outlook for responsive HTML emails .. . .. . but I am testing right now and it does work fine for the Outlook app but Outlook.com hides all content following this code .", "I just open an outlook account in outlook.com and then try to click in New to send a message and then fill all the form then click on Send and send the message to myself .", "Outlook.com didn t like Gotham-Light .", "The ad frame on the right is so annoying when using outlook.com .", "I m trying to fetch mails from outlook.com I have configured outlook.com IMAP settings in my email-client .", "When I want to check the render on Microsoft mail service like hotmail the email is blank but when I check the source the content is there .", "Alright fair enough to tell you the truth I am not very familiar with windows technology this is the new outlook web version outlook.com and the way I connect is by creating an account through live connect .", "I m able to connect and get messages from outlook.com .", "So - thanks outlook.com for teaching me something.. .", "Outlook.com integration is coming this spring .", "After more testing I found that this works in Outlook app and Outlook.com : .. . .. . I don t know if it was the gte part but looks to work better with that removed .", "outlook.com eats anything in a comment conditional or not .", "My A tags also break in outlook.com .", "I registered new web-application in Microsoft Registration Portal .", "However in Microsoft mail services such as Outlook.com or hotmail.com the DKIM validation fails : .. . .. . The message says dkim none even though the DKIM signature is in the header of the email .", "Has anyone run into similar problems connecting to Outlook.com", "I have an .ics file and want to import it to my calendar on outlook.com .", "How can I retrieve my tasks from outlook.com calendar", "The unified O365 and Outlook.com APIs were announced on August 12 2015 .", "actually working on some android stuff to hit the outlook.com apis right now .", "Or alternatively : still changing the settings of outlook.com but just change the default from-address in outlook.com settings options your email accounts default from address", "Currently the consumer facing Outlook.com this is the Hotmail replacement not to be confused with the Office 365 offering which uses the same root domain-name does NOT support EWS .", "I ve created another test account on my Outlook client the desktop program not the web service to test the parameters which the code above uses : .. . .. . user name .. . password .. . smtp.outlook.com .. . 587 .. . TLS .. . .. . and the Test Account Settings in Outlook shows that the parameters are correct Task : Send test e-mail message - Status : Completed .", "Outlook renders html with Microsoft Word s html rendering engine and only accepts certain fonts .", "This means that this add-in will be available for all Outlook clients desktop web .", "Outlook.com accounts aren t typically involved with an enterprise solution .", "The contact 7 form in one of wordpress website is configured to send email to an account created in outlook.com .. . .. . The form on submission shows success message but the message is never received in my outlook account .", "So is there anyone that has been able to use contact lists with outlook.com and the REST API", "Does outlook.com not let me use a custom Message-ID header", "So how does outlook.com create underlines text in the title tag", "All these implementation fail when i try with an outlook.com account .", "github.com MailCore mailcore2 blob master resources https : github.com MailCore mailcore2 blob master resources providers.json and email.about.com od Outlook.com f http : email.about.com od Outlook.com f What-Are-The-Outlook-com-Smtp-Server-Settings.htm", "Definitely leaving this tags is not enough since it will be confused with the outlook desktop versions .", "Question is next : should my access token with scopes above acquired from https : login.microsoftonline.com give me ability to authenticate in outlook SMTP server at all", "I already created add-in for Outlook Web Application and tried to deploy it to desktop client but didn t figure how to make it .", "Morning all .. . .. . So I have a strange issue with Outlook.com former hotmail.com.. .", "Can someone please see why events are not synced in calendar in outlook.com", "Is there a way to show email content only on Outlook.com the browser version and hide for the rest", "I m trying to connect to outlook.com via the Live Connect-API .", "See Outlook add-ins https : dev.office.com docs add-ins outlook outlook-add-ins product outlook for more information .", "If your account has been migrated you can connect to Outlook.com using EWS instead of just EAS .", "I would like to use squirrelmail as I am using outlook.com for custom domain emails .", "What is the specific and precise name and version of the Outlook-like thing you re trying to access", "Hotmail Outlook : http : mail.live.com mail services.aspx .. . .. . Yahoo : http : help.yahoo.com l us yahoo-mail postmaster bulkv2.html", "Here was said All-in-one add-in for outlook http : stackoverflow.com questions 34976288 all-in-one-add-in-for-outlook 34982985 34982985 that this is possible to create the web-based add-in working both with Mailboxes hosted on Office 365 or Exchange 2013 or greater and with Outlook 2013 or greater so with web and desktop Outlook versions.Am I right", "Outlook is just the frontend .", "With cronofy.com you can access the same API as a third party for services like Google Calendar Outlook.com iCloud etc to synchronise calendars .", "Is it possible to get such token for application registered through Microsoft Registration Portal", "Use-case : Emails to be sent from a web-application upon an event as someuser@somedomain.com via MS Exchange or Outlook.com using the RESTful APIs exposed by Outlook.com https : msdn.microsoft.com office office365 api mail-rest-operations SendMessages .", "So one truly cannot use outlook.com APIs in an enterprise solution since one really cannot force the admin maintainer to sign-in to the service account every 90 days and regenerate the refresh tokens .", "It is rendering perfectly in all browsers and clients except for outlook.com on firefox chrome and IE .", "I am setting up outlook.com with mailcore2 on iOS9 in Objective-C .", "I didn t find any appropriate way to have my outlook.com task categories on my WP device .", "So I decided to implement a simple mobile webpage that retrieve my tasks from outlook.com calendar and display them by categories .", "But if I greate a contact-list in outlook.com then that list is not part of the contacts call and if I use ContactFolders call then I m getting an empty array back .", "Outlook 2013 : .. . .. .", "Is there any support for To-do s tasks API of Outlook account", "I don t have Outlook installed on the machine in question .", "I m creating an desktop application that shall manage my outlook.com account in the background without me having to type in username and password every time I switch on the PC .", "I am testing out an email template in Outlook.com it does not align to the middle however on all others clients it does .", "This is a test I did with IMAP on outlook.com connecting through OAuth2 .. . .. . My not so wild guess is that the @ symbol is breaking the the NOT FROM search .", "I have tried to remove the additional line height added by outlook.com when you receive a message .", "In the source code Outlook.com has this : .. . .. . However when the page is run in a browser it displays with the title underlined in a browser tab :", "I performed a test on this email modifying only the head and the email rendered well in Outlook.com FF IE Chrome .", "Is it possible to change the settings of outlook.com more specifically : change the primary alias via java-code", "Historically some Office 365 endpoints were accessible on the outlook.com domain but that is no longer the case .", "As of today the majority of Outlook.com accounts have been migrated to the Office 365 Exchange backend .", "Refer following configuration of squirrelmail config.php which I have set to use outlook.com .", "I am testing using my own outlook.com account and Litmus which shows a blank email in all major browsers .", "See http : blogs.msdn.com b exchangedev archive 2015 08 12 unified-outlook-apis-for-office-365-amp-outlook-com-are-here.aspx .", "COM desktop add-ins work with Outlook 2000-2016 but not in OWA .", "Outlook still bloody blocks them .", "Viewing source in outlook.com doesn t show the HTML at all - it must be rendered via javascript as I can only see it using Firebug .", "I have an .ics file and I can import it by clicking import on outlook.com but I don t know how to do this via a script .", "In my email HTML part have comment in the style section and I think outlook.com dont like it .", "For Incoming settings in the Mail app I use : .. . .. . Domain Username : username@outlook.com .. . .. . Password : The password .. . .. . Server : m.hotmail.com .", "The email itself works and I can login at outlook.com with my custom domain username and password and send and receive mail .", "But in outlook.com even if the email has correct buttons - accept tentative decline - clicking on them won t sync that into the calendar itself .", "Also is there possibility in outlook.com to just set event in calendar without sending response email" ] }
{ "confidence": [ 76.17023468017578, 72.03181457519531, 71.4162826538086, 69.16783142089844, 69.03572082519531, 68.09828186035156, 67.85316467285156, 66.93867492675781, 64.15739440917969, 63.64926528930664, 62.92320251464844, 62.70701599121094, 62.36393737792969, 62.07657241821289, 61.65285110473633, 61.164546966552734, 60.972042083740234, 59.77589416503906, 58.229148864746094, 57.6361083984375 ], "content": [ "Question : I m attempting to send automated emails genuinely required business reason - not spam . Code similar to that below used to work with another mail service provider but the customer has moved to outlook.com and they re now getting : .. . .. . Surely this C code should work : .. . .. . Please note the DeliveryMethod and EnableSsl are being set and that the port is 587 . I ve created another test account on my Outlook client the desktop program not the web service to test the parameters which the code above uses : .. . .. . user name .. . password .. . smtp.outlook.com .. . 587 .. . TLS .. . .. . and the Test Account Settings in Outlook shows that the parameters are correct Task : Send test e-mail message - Status : Completed . So I think the the user name and password must be correct . I ve turned on verbose logging on as described here : http : social.msdn.microsoft.com Forums en-US netfxnetcom thread 28b5a576-0da2-42c9-8de3-f2bd1f30ded4 . This has produced a plenty of output too much to post here . Here are the last few lines : .. . .. . The first of those lines suggests to me that the SmtpClient and outlook.com have agreed on the encryption protocols to use but the rest of it is means little to me bar the 5.7.1 Client was not authenticated line . Has anyone run into similar problems connecting to Outlook.com Thanks in advance . Ross .. . Answer : Comment out UseDefaultCredentials worked for me see Microsoft Bug : https : connect.microsoft.com VisualStudio feedback details 725279 smtp-tls-authentication-usedefaultcredentials-bug-using-office365-server-as-smart-host", "Question : I have an .ics file and want to import it to my calendar on outlook.com . How can I do this with a powershell script I need to either delete and recreate the calendar I import to or clear the calendar before import . Thanks in advance . Comment : Can you post the code you tried till now Comment : I haven t tried anything yet . I don t know where to start . I have an .ics file and I can import it by clicking import on outlook.com but I don t know how to do this via a script . .. . Answer : Try .. . .. . Step 1 : Read the contents of the ics file .. . .. . Step 2 : Parse it .. . .. . Step 3 : Use Outlook Application Object in Powershell .. . .. . Step 4 : Get the Calendar folder .. . .. . Step 5 : use the properties of the calendar folder to add the parsed content in step 2 .. . .. . Acknowledging thescriptkeeper.wordpress.com for the script Comment : Ok . But I want to write it to the web app Outlook.com and not the desktop application Outlook : - . I don t have Outlook installed on the machine in question .", "Question : null .. . Answer : This is a test I did with IMAP on outlook.com connecting through OAuth2 .. . .. . My not so wild guess is that the @ symbol is breaking the the NOT FROM search . Maybe I should scape it horrible bug Comment : What is the specific and precise name and version of the Outlook-like thing you re trying to access There are lots of them and MS just renamed a few . Keep in mind also that the thing being run is probably Exchange not Outlook . Outlook is just the frontend . Also please remember that tags stand alone . You can t combine office and live to talk about a product that might be named Office Live Comment : Alright fair enough to tell you the truth I am not very familiar with windows technology this is the new outlook web version outlook.com and the way I connect is by creating an account through live connect . Now since windows-live exists I see live connect and is just not clear to me if those are different technologies or not . Definitely leaving this tags is not enough since it will be confused with the outlook desktop versions .", "Question : null .. . Answer : I m using the outlook REST API v 2.0 and I m able to use contacts to get all the contacts from my outlook.com account so far so good . But if I greate a contact-list in outlook.com then that list is not part of the contacts call and if I use ContactFolders call then I m getting an empty array back . So is there anyone that has been able to use contact lists with outlook.com and the REST API Also bonus question. . can these contact lists be shared between users or is that something that requires outlook 365", "Question : I m attempting to send automated emails genuinely required business reason - not spam . Code similar to that below used to work with another mail service provider but the customer has moved to outlook.com and they re now getting : .. . .. . Surely this C code should work : .. . .. . Please note the DeliveryMethod and EnableSsl are being set and that the port is 587 . I ve created another test account on my Outlook client the desktop program not the web service to test the parameters which the code above uses : .. . .. . user name .. . password .. . smtp.outlook.com .. . 587 .. . TLS .. . .. . and the Test Account Settings in Outlook shows that the parameters are correct Task : Send test e-mail message - Status : Completed . So I think the the user name and password must be correct . I ve turned on verbose logging on as described here : http : social.msdn.microsoft.com Forums en-US netfxnetcom thread 28b5a576-0da2-42c9-8de3-f2bd1f30ded4 . This has produced a plenty of output too much to post here . Here are the last few lines : .. . .. . The first of those lines suggests to me that the SmtpClient and outlook.com have agreed on the encryption protocols to use but the rest of it is means little to me bar the 5.7.1 Client was not authenticated line . Has anyone run into similar problems connecting to Outlook.com Thanks in advance . Ross .. . Answer : I know that it sounds weird but AFAI remember you should use the UseDefaultCredentials false before setting Credentials . change your code to : Comment : Wow - thanks for the quick response . Comment : I can hardly believe it but you re right I ve wasted all morning on this grrr... . Comment : Yeah lesson learnt hard . I know what you mean . I can feel it indeed : Comment : O.M.G . I have been tearing my hear out all day on this one . Thanks Comment : @jeroenh : Sorry to hear you got caught out by this one . I was kind of pleased to find out I wasn t the only one though . As they say Misery loves company", "Question : Actually I ve setup my outlook.com account on MS Outlook . I wanted my tasks to be shown on my Windows Phone 7.8 device by categories . Tasks are synced with the WP device but as you know there are no categories I didn t find any appropriate way to have my outlook.com task categories on my WP device . So I decided to implement a simple mobile webpage that retrieve my tasks from outlook.com calendar and display them by categories . This way I can have my tasks ordered by categories on my mobile-devices . How can I retrieve my tasks from outlook.com calendar Is there any API .. . Answer : Outlook.com does not support programmatic access to tasks at this point . The unified O365 and Outlook.com APIs were announced on August 12 2015 . See http : blogs.msdn.com b exchangedev archive 2015 08 12 unified-outlook-apis-for-office-365-amp-outlook-com-are-here.aspx . Full API specs are available at https : dev.outlook.com . As of this writing you will find APIs for Mail Calendar Contact Notifications and Photos . I know this isn t satisfactory . The best place to give feedback would be at http : appsforoutlook.uservoice.com forums 284422-other . Hope this helps . Healy in Tampa.. . Comment : Thanks for the information but it s too late . It s been a year since I ve moved to Linux and Android and don t use MS tools and services anymore : Comment : actually working on some android stuff to hit the outlook.com apis right now . lots of fun .", "Question : I recently face a new problem . I send email with the SmtpClient Class everything work fine except for one point . When I want to check the render on Microsoft mail service like hotmail the email is blank but when I check the source the content is there . If I check the mail with other service like GMAIL Exchange or hotmail email on phone I can see the body part of the message . Here is my smtp class : .. . .. . There when I call my class : .. . .. . I saw some solution but nothing work for me : http : stackoverflow.com a 7811002 http : stackoverflow.com a 10624176 .. . .. . If you need more information you can contact me . .. . Answer : OK I found the problem in my case . In my email HTML part have comment in the style section and I think outlook.com dont like it . When I remove those comment my email html part was no more blank .", "Question : I have had some problems putting together a corporate email signature which is visually consistent across the different mail providers . I have used various online guides listed at the end of this mail but still have one last problem which I cannot seem to tackle . In Outlook.com the table height seems to extend be unnecessarily far down as can be seen in the comparison below note the red marking . Outlook 2013 : .. . .. . Outlook Signature http : i.stack.imgur.com KSEnI.png .. . .. . Outlook.com : .. . .. . Outlook.com Signature http : i.stack.imgur.com b5FWA.png .. . .. . HTML : .. . .. . Does anyone know what this could be Comment : No issues from my Outlook account . Instead of setting height 118 try style max-height : 118px on the table and remove the height attribute from the td . Comment : @AoN : I tried this now . Same problem unfortunately Comment : As I toyed with the signature a little I noticed that Outlook.com was replacing the spaces with nbsp which then caused extra spacing . Try removing all spaces between your tags minify the code so it would be something like table tr td td td td tr table no spaces and no line-breaks . Comment : @AoN : Thanks for all the help . Unfortunately this didn t work either I used this tool https : kangax.github.io html-minifier to minify . Comment : I m sorry I m just not able to duplicate the issue after minifying your original code or substituting the height for styling and I ve loaded it in IE10 IE11 FF36 and Chrome 41 . You may have to bring it up to Microsoft or replace the table with a div structure . .. . Answer : What you re seeing is Outlook.com s line-height increasing feature . What you need to do is put div class ExternalClass after the opening and before the closing body . in your style tag add .ecxExternalClass line-height : 100 important .. . .. . Outlook tacks ecx in front of all your classes in your HTML and the style tag . If you already have the ecx it ignores it in the style tag .", "Question : I want to develop all-in-one add-in for Outlook . This means that this add-in will be available for all Outlook clients desktop web . I read here https : msdn.microsoft.com en-us library office fp161135.aspx that i can do this . I already created add-in for Outlook Web Application and tried to deploy it to desktop client but didn t figure how to make it . So how to make it set on desktop and outlook.com Is that really possible And if yes how it can be done .. . Answer : Technically you can t make an add-in that will work 100 on all clients . The web-based add-ins currently only work with Mailboxes hosted on Office 365 or Exchange 2013 or greater and with Outlook 2013 or greater . Outlook.com integration is coming this spring . COM desktop add-ins work with Outlook 2000-2016 but not in OWA . To deploy an add-in you need to either publish it to the Office Store or an Exchange Server . See here for more info : https : msdn.microsoft.com en-us library office fp123515.aspx . To install a self-published add-in that is not in the Office Store you just add the manifest file from the Manage add-ins page in OWA : https : msdn.microsoft.com en-us library office fp142256.aspx .. . .. . Note also that you must host your web add-in code in your own web server and secured with an SSL certificate . Comment : Okay it s done - my add-in works fine with OWA . But how to add it to the desktop version Comment : You don t have to do anything different for the desktop app - it ll just show up . Keep in mind that you have to be using the same Exchange Mailbox in the client .", "Question : I was using the following conditional statement to hide content in Outlook for responsive HTML emails .. . .. . but I am testing right now and it does work fine for the Outlook app but Outlook.com hides all content following this code . I was using it to hide the pre header at the beginning of the body content but that resulted in a blank email . I am testing using my own outlook.com account and Litmus which shows a blank email in all major browsers . Anyone know of another technique to hide content for Outlook without breaking Outlook.com emails After more testing I found that this works in Outlook app and Outlook.com : .. . .. . I don t know if it was the gte part but looks to work better with that removed . Thanks for the responses . Comment : May we know what you are trying to hide and why Comment : I was using it to hide the pre header at the beginning of the body content . But same would be true for hiding content for mobile-only . .. . Answer : outlook.com eats anything in a comment conditional or not . Your best bet is to copy the section that hides in outlook 07 and paste it below the conditional comment end . Then give that pasted section s main container table a class outlookcomonly and a style display : none . In your style tag : .. . .. . Outlook.com preprocesses your classed items adding ecx before each of them . If you add that ecx to your style sheet outlook.com will see it but all other clients will ignore it .", "Question : Use-case : Emails to be sent from a web-application upon an event as someuser@somedomain.com via MS Exchange or Outlook.com using the RESTful APIs exposed by Outlook.com https : msdn.microsoft.com office office365 api mail-rest-operations SendMessages . Only HTTP access allowed no SMTP IMAP . All documentation https : dev.outlook.com restapi seems to mention that the app has to forward users to MSOnline https : login.microsoftonline.com common oauth2 v2.0 authorize sign-in and then use the authorization code sent back by MS online . But this won t work for a background task no sign-in possible where a pre-built token with some predefined scope is necessary so that Outlook.com can be accessed via APIs to send mail as someuser@somedomain.com . Any hints pointers to how it could be done Basically automated authentication without explicitly signing in as someuser@somedomain.com on the MS Online login page . I did not find M documentation regarding Outlook REST APIs https : dev.outlook.com restapi to be of any great help and found it to be pretty difficult to navigate understand . : .. . .. . Thanks Comment : I don t know this API in particular but generally you have to register and get an API key to be used from your code . This link https : msdn.microsoft.com en-us office office365 api mail-rest-operations UsetheMailRESTAPI mentions token you can obtain after registering your app maybe you should try that . Comment : @cdelmas thanks I did try that . Apparently the only possible way is to register the app at Azure AD and if need be limit the users that can access the app again at the Azure AD level and then let user s sign-in to the app and thus generate a token which again comes with a rigid 90 day expiry limit . .. . Answer : At some point you will have to have the user sign in to grant access to your app . So you would need to have some sort of user-facing web front end where they can do this . Once they have signed in and you ve obtained an access token refresh token your background app should be able to use those tokens silently without user interaction at least until the user either revokes access or the refresh token expires . Currently Azure which provides the login token functionality does expire the refresh tokens after some time 90 days at which point the user must sign in again to grant your app continued access . Comment : Thanks for the info Jason So one truly cannot use outlook.com APIs in an enterprise solution since one really cannot force the admin maintainer to sign-in to the service account every 90 days and regenerate the refresh tokens . Any plans to accommodate refresh tokens that last for a long time as governed by the user The use-case doesn t involve a normal user but a service account which traditionally will not have password expiry etc set . Comment : My understanding is that yes those plans are there . However I m concerned I ve misunderstood you . Outlook.com accounts aren t typically involved with an enterprise solution . Are you accessing Office 365 Business work accounts or Outlook.com personal consumer accounts Comment : However I m concerned I ve misunderstood you . Outlook.com accounts aren t typically involved with an enterprise solution . Are you accessing Office 365 Business work accounts or Outlook.com personal consumer accounts The use-case is to build a mailing component for a client of ours with below listed constraints . 1 . The client say somecompany.com wants the emails to be routed via their corporate MS exchange only 2 . The sender stamp on the outgoing emails should be someuser@somecompany.com 3 . No SMTP IMAP access to the exchange allowed . contd. . Comment : This mailing component will be used in background by an enterprise system that would send out emails to external @ somecompany . or internal @somecompany.com addresses . So we will have to 1 . create one service account someuser@somecompany.com 2 . create an app on somecompany s Azure AD 3 . Restrict access to someuser@somecompany.com for the app 4 . Make him sign-in and obtain the refresh token 5 . Use that refresh token to generate access tokens so that mails can be sent by the mailing component . contd . . Comment : Now this flow would require 1 . someuser@somecompany.com to sign-in to MS online page every 90 days to regenerate the refresh token and 2 . make this new token to be accessible to the mailing component so that it can use the token and send out mails in background . This would not be acceptable for an enterprise solution I mean the obligation to sign-in every 90 days . : I hope I have made my use-case clear . Please let me know your thoughts . Thanks again for helping out", "Question : Does Outlook.com support EWS If no what are the different ways to access a users tasks and calendar using python So far I have done the following : .. . .. . Used EWSWrapper https : github.com maiiku EWSWrapper py and tried out using suds-ews with python http : blogs.it.ox.ac.uk inapickle 2011 05 14 exchange-web-services-suds-and-python . All these implementation fail when i try with an outlook.com account . So here is what I want to know : .. . .. . If EWS is not available what other ways can I do to retrieve task and calendar list . Is there a library in python that I can use which considers earlier 2007 exchange servers the newer once from 2010 to 2013 and does basic error-handling . Any help is appreciated . .. . Answer : I m a C -Developer so I don t know how it works in Python but EWS Managed API works with ExchangeOnline . I m already using it . Maybe you have to enable redicreting in the autodiscover . See : http : msdn.microsoft.com en-us office365trainingcourse 10l 1 topic2 .. . .. . I tried to connect to Outlook.com with ServerVersion 2010 and 2013-Setting and both work fine . Comment : Exchange Online Office 365 is separate service from Outlook.com that runs on different software stack . Historically some Office 365 endpoints were accessible on the outlook.com domain but that is no longer the case .", "Question : I am creating ASP.NET MVC5 application . One functionality is to send emails with event invitations . In Gmail client such generated email works fine . But in outlook.com even if the email has correct buttons - accept tentative decline - clicking on them won t sync that into the calendar itself . I took some inspiration here : .. . .. . StackOverflow Q1 http : stackoverflow.com questions 10426661 sending-outlook-meeting-requests-without-accept-decline-option .. . StackOverflow Q2 http : stackoverflow.com questions 32375783 ics-invitation-calendar-not-working-in-outlook-com-issue .. . StackOverflow Q3 http : stackoverflow.com questions 19523861 multipart-email-with-text-and-calendar-outlook-doesnt-recognize-ics 19535685 19535685 .. . .. . .. . Here is my current implementation : .. . .. . I am using DDay.ical library for creating the event : .. . .. . I am packing this event into email as an alternative view : .. . .. . And here is the .ics itself : .. . .. . When this email comes to Gmail client I can correctly see the invitation with option to add event into calendar which works fine . But in outlook.com even when the email itself is correctly recognized as invitation and I can see accept tentative decline buttons it does not work as expected . When I click for example accept option new response email is created and when I send it out I would expect the event will be set in my calendar however there is no event synced . Can someone please see why events are not synced in calendar in outlook.com Also is there possibility in outlook.com to just set event in calendar without sending response email - invitations are auto-generated from system no need for response . Thanks .. . Answer : Finally I ve found a solution - there was missing ORGANIZER parameter of the VEVENT part in .ics . Gmail is able to handle that Outlook.com not . So the trick was to add following line when setting DDay.iCal.Event object : .. . .. . Everything else remained untouched so the final look of the .ics which works in both - Gmail and Outlook.com is this : .. . .. . Now it works fine .", "Question : null .. . Answer : I registered new web-application in Microsoft Registration Portal . Wrote some server code in my service and managed to get access token for user with next scopes : .. . .. . Next step I tried to do was https : msdn.microsoft.com en-us library dn440163.aspx yes I ve read Important notice on top of the page but it is kind of unclear related to my situation . Made XOAUTH2 authenticate to SMTP server smtp-mail.outlook.com : .. . .. . ..... . .. . .. . OK send : AUTH XOAUTH2 dXNlcj1....9AQE r n reply : 535 5.0.0 OAuth failed : OAuth authentication failed due to Invalid token . Code -2147184118 r n reply : retcode 535 Msg : 5.0.0 OAuth failed : OAuth authentication failed due to Invalid token . Code -2147184118 .. . .. . Apparently my access token was invalid . Question is next : should my access token with scopes above acquired from https : login.microsoftonline.com give me ability to authenticate in outlook SMTP server at all Or this feature is already deprecated .. . If not then how can I get proper access token Is it possible to get such token for application registered through Microsoft Registration Portal Thanks . Comment : Looks like this feature authentication with new via OAUTH2 is really disabled or deprecated .", "Question : My html-email layout as below .. . .. . enter image description here http : i.stack.imgur.com kYC6r.png .. . .. . HTML .. . .. . Above code work fine for gmail outlook-2007 outlook.com . But if I forward this mail from outlook-2007 to outlook.com email break as like this .. . .. . enter image description here http : i.stack.imgur.com Zgi6K.png .. . .. . Outlook adding extra p and span tag to anchor tag for image and gives them style . So my layout break as above image . Original Code .. . .. . Styled Code after forwarding mail .. . .. . JsFiddle .. . .. . http : jsfiddle.net zc7nL .. . .. . How can I solve this issue .. . Answer : Unfortunately there is no way to prevent Outlook adding the p tags we just have to find ways to zero them out . Try adding margin : 0 padding : 0 inline to all your image tags and add outlook a padding : 0 to your header style tag . Also removing the space between your anchor and image tags may possibly stop the spans from appearing . Not 100 sure but worth a try . If none of that works try targeting .ecxMsoNormal in your style tag as you would for the web . Any styles you apply there should take affect as Outlook reads it unlike Gmail . Comment : i have tried this it is not working for me", "Question : Is there a way to show email content only on Outlook.com the browser version and hide for the rest Example : .. . .. . Thanks for the help .. . Answer : There is no trivial to get such functionality out of the box . The Outlook object-model nor the editor doesn t provide anything for that . However you can develop an Outlook add-in former Mail App which can be run on the web and display the message body . See Outlook add-ins https : dev.office.com docs add-ins outlook outlook-add-ins product outlook for more information . Comment : Ok thank you very much .", "Question : Actually I ve setup my outlook.com account on MS Outlook . I wanted my tasks to be shown on my Windows Phone 7.8 device by categories . Tasks are synced with the WP device but as you know there are no categories I didn t find any appropriate way to have my outlook.com task categories on my WP device . So I decided to implement a simple mobile webpage that retrieve my tasks from outlook.com calendar and display them by categories . This way I can have my tasks ordered by categories on my mobile-devices . How can I retrieve my tasks from outlook.com calendar Is there any API .. . Answer : The is an API however you have to join the development program which costs 49 . Here s the documentation : http : msdn.microsoft.com en-us library live hh826523.aspx cal cs", "Question : Does Outlook.com support EWS If no what are the different ways to access a users tasks and calendar using python So far I have done the following : .. . .. . Used EWSWrapper https : github.com maiiku EWSWrapper py and tried out using suds-ews with python http : blogs.it.ox.ac.uk inapickle 2011 05 14 exchange-web-services-suds-and-python . All these implementation fail when i try with an outlook.com account . So here is what I want to know : .. . .. . If EWS is not available what other ways can I do to retrieve task and calendar list . Is there a library in python that I can use which considers earlier 2007 exchange servers the newer once from 2010 to 2013 and does basic error-handling . Any help is appreciated . .. . Answer : Currently the consumer facing Outlook.com this is the Hotmail replacement not to be confused with the Office 365 offering which uses the same root domain-name does NOT support EWS . It only supports EAS . See this thread : http : answers.microsoft.com en-us windowslive forum mail-profile i-want-to-access-outlookcom-account-over-exchange 83971a95-7fb3-483a-96fc-ac7e0299345b msgId 71d12357-f735-4958-baef-39997b5802c8", "Question : null .. . Answer : We sender.org provide a mail-server for a client example.org and sign outgoing messages with our private DKIM key we cannot change the signing domain to the client s domain . The DKIM signature looks like this : .. . .. . Gmail Yahoo and others validate the DKIM signature correctly . However in Microsoft mail services such as Outlook.com or hotmail.com the DKIM validation fails : .. . .. . The message says dkim none even though the DKIM signature is in the header of the email . More importantly the header.d is wrongly set to example.org whereas it should be sender.org - the domain that is signing . We have tried to add i @sender.org to the DKIM signature and changed the order of the header fields - nothing helped . Are we missing something Is this a bug in hotmail Outlook.com Is there any solution or other indications on how to solve this Comment : This would probably be more appropriate on ServerFault . Comment : Note that the signature tag is reserved for method signatures . Comment : @owlstead I am afraid I don t quite understand what you mean . Are you talking about DKIM-Signature : in the head Comment : Ah sorry no the tag signature http : stackoverflow.com questions tagged signature is reserved for method signatures . I sometimes browse through the signature http : stackoverflow.com questions tagged signature to fish out questions that belong to digital-signature http : stackoverflow.com questions tagged digital-signature but I sometimes also find email signature related questions for which there is no specific tag to my knowledge . Comment : Did you ever find out a solution to this We re experiencing the exact same thing and Outlook is tagging our emails as spam .", "Question : null .. . Answer : I m creating an desktop application that shall manage my outlook.com account in the background without me having to type in username and password every time I switch on the PC . I ve been going through all the signin variants for the Microsoft account but not one document mentions how to pass the username and password in form of a REST call or similar and how the access token can be used thereafter . I don t want any user interaction I shall be a pure background-process . How can this be realized Comment : Have you found a solution to that problem Comment : No I gave up on this issue and moved over to google s services : -" ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
jaxer@web@46
jaxer -- a deprecated open-source javascript @placeholder server .
{ "confidence": [ 36.40365219116211, 35.80385971069336, 35.58955001831055, 35.501670837402344, 35.32420349121094, 34.74900817871094, 34.74900817871094, 33.694984436035156, 33.08819580078125, 33.08819580078125, 32.68340301513672, 32.34025573730469, 31.761150360107422, 31.67142677307129, 31.212017059326172, 31.093721389770508, 29.836029052734375, 29.425994873046875, 29.332008361816406, 29.332008361816406, 29.332008361816406, 29.146907806396484, 28.821298599243164, 28.821298599243164, 28.821298599243164, 28.763017654418945, 28.7334041595459, 28.3204288482666, 28.3204288482666, 27.735984802246094, 27.398176193237305, 27.075448989868164, 27.033140182495117, 26.86835479736328, 26.849040985107422, 26.849040985107422, 26.73074722290039, 26.73074722290039, 26.609193801879883, 26.584911346435547, 26.15958595275879, 26.15958595275879, 26.15958595275879, 26.15958595275879, 26.15958595275879, 26.15958595275879, 26.060970306396484, 25.968618392944336, 25.968618392944336, 25.830482482910156, 25.570629119873047, 25.547260284423828, 25.379268646240234, 24.48184585571289, 24.48184585571289, 24.48184585571289, 24.48184585571289, 24.48184585571289, 24.48184585571289, 24.48184585571289, 24.48184585571289, 24.458324432373047, 24.234344482421875, 24.122634887695312, 23.97066879272461, 23.864978790283203, 23.59438133239746, 23.59438133239746, 23.59438133239746, 23.512020111083984, 23.102123260498047, 23.102121353149414, 23.102121353149414, 23.102121353149414, 23.102121353149414, 23.102121353149414, 23.102121353149414, 23.102121353149414, 23.102121353149414, 22.94127655029297, 22.7796630859375, 22.63111114501953, 22.56734848022461, 22.459423065185547, 22.45677947998047, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.22193717956543, 22.040529251098633 ], "content": [ "I have been looking for a server-side javascript platform and seen references to Aptana Jaxer which looked ideal but the Jaxer aspect appears not to be supported any more is this correct", "Node.js is so powerful and familiar platform today a simple good search gives a lot of understanding for Jaxer there is nice article by John Resig jQuery author here - ejohn.org blog server-side-javascript-with-jaxer http : ejohn.org blog server-side-javascript-with-jaxer This very nicely explain Jaxer and what all has been written in below answers .", "I m trying to debug some server-side JavaScript code running in Aptana Jaxer and I m not having any success .", "I just started experimenting with Aptana Jaxer https : github.com aptana Jaxer server-side javascript engine for my next project .", "Since Jaxer has been around longer is it a better solution than Node.js if you are a developer like me who is new to programming with JavaScript on the server-side", "what are the alternatives available over Aptana jaxer open-source", "what are the alternatives available over Aptana jaxer open-source", "Think of Jaxer as Firefox running on the server-side but instead of a GUI its interface to the outside world is Apache .", "Jaxer lets you run scripts on the client-server or both .", "Aptana s Jaxer is the first AJAX web server so far .", "Yes Jaxer is dead .", "Jaxer https : github.com aptana Jaxer is an abandoned server-side framework based on a headless Mozilla Gecko-Browser allowing you to use JavaScript and the DOM server-side .", "Jaxer and node.js are very different things .", "Jaxer appears to be targeted as a server-side Web scripting-language like PHP or ASP.NET whereas Node.js is more of a general-purpose event-driven network server framework that happens to be able to serve Web pages .", "Jaxer has one huge disadvantage : it is dead technology http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 .", "Despite both using JavaScript as the language Jaxer and Node.js achieve two different goals .", "Jaxer also makes client-server communication really convenient with its runat server-proxy where you can directly call server-side function from within your client-side script and Jaxer takes care of all the XML HTTP request stuff .", "I found a project jaxer http : jaxer.org which embeds Firefox s JavaScript engine on the server-side so it can parse HTML server-side very well .", "However I ve been playing with a Jaxer server on my linux box and I d like to write web apps in it .", "Because Jaxer isn t being patched any more there are still bugs in it that can crash or hang the server .", "Here is a quick overview for those who are not familiar with it : .. . .. . Jaxer is in their words the world s first true AJAX server .", "Jaxer has strong facilities for this in Jaxer.Log . .", "If instead you just need to substitute some dynamic-content into a mostly static presentation well I cannot really recommend Jaxer but something like it that plugs into a standard web server is a better choice .", "@Carine : While it would indeed be easier to use Google Charts on the server with Jaxer than Node it also requires you to use software that hasn t had a release in about nine years .", "I have seen the Jaxer site and installed the standalone server and it looks excellent but cannot see where or why I would use Aptana if it doesn t integrate with it or have I missed something", "I ve been playing with Jaxer https : github.com aptana Jaxer and while the concept is very cool I cannot figure out how to define objects that are available on both the client and the server .", "Three years is a long time to wait for an update to an open-source product particularly given that Jaxer died pretty much right as the whole Javascript speed race began .", "Jaxer is dead technology .", "Remember Aptana Jaxer", "Browser Javascript the platform Jaxer is built on doesn t know how to run code in trustably separate sandboxes so you need a separate interpreter for each site hosted on the server .", "I am currenlty playing with Jaxer .", "I am the developer for Myna http : www.mynajs.org www.mynajs.org an Open Source server-side JS platform based on Rhino and Java .", "I also found that it was very hard to debug my Jaxer server-side code and when I got in trouble the error messages weren t very helpful .", "What is the source of the desire to use that sort of library on the server", "I m looking at Aptana s Jaxer http : www.aptana.com jaxer and I find the concept to be very exciting .", "related stackoverflow.com questions 2095793 web-host-with-jaxer http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165", "Javascript is a modern and clean programming language as opposed to PHP and the Jaxer API is just so much more consistent and neat .", "I think there was also been more uptake of Javascript since Jaxer was initially released .", "Jaxer s code has since been placed into a public source repository https : github.com aptana Jaxer but no substantial commits have been made https : github.com aptana Jaxer commits master since that initial checkin .", "I ve explained my reasoning elsewhere in this answer http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 .", "Jaxer also dint support breakpoint debugging .", ".. . .. . Jaxer appears to have MySQL and SQLite database APIs .", "This answer is not directly related to Jaxer but since this question was asked .", "Jaxer http : jaxer.org is one such product no IIS Thanks .", "I think Jaxer is your only option .", "I have heard of Jaxer the first time now .", "related aptanastudio.tenderapp.com discussions problems https : aptanastudio.tenderapp.com discussions problems 376-jaxer-forums page 1 to 2Fdiscussions 2Fproblems 2F376-jaxer-forums 2Fpage 2F1 3Fto 3D 252Fdiscussions 252Fproblems 252F376-jaxer-forums 252Fpage 252F2 253Fto 253D 25252Fdiscussions 25252Fproblems 25252F376-jaxer-forums", "If you can expand upon your question with your goals for server-side JavaScript then we can provide better suggestions as to what to use .", "What if you have something like google charts and you need javascript to run on server in order to put together an html file for emailing the charts", "Jaxer can also work more or less like ASP or PHP simply executing JS inside special tags inside the HTML files Jaxer serves up via Apache so that you can insert some dynamic-content into those otherwise-static pages .", "ItsNat http : www.itsnat.org is similar to Jaxer the main difference is Java based instead of JavaScript .", "It plugs into Apache and allows using JavaScript on the server-side as an alternative to languages such as PHP .", "The old support forums are closed http : forums.aptana.com and the new Jaxer mailing list carries little content http : groups.google.com group jaxer pli 1 .", "Also The Jaxer Api Documentation lists the built-ins that are included with that framework .", "Can anyone recommend an affordable host that runs or will allow me to run Jaxer", "Before the Appcelerator buyout Apatana dropped Jaxer from the Studio download .", "Bottom line Jaxer is completely unsuited to cheap shared-hosting .", "Has anyone used Jaxer with another technology php pearl ruby etc .", "It looks as though Jaxer performs better than Rails but not as well as php.. .", "I remember taking a look at Jaxer back when it came out .", "I was more thinking of using Jaxer for what PHP is used mostly i.e .", "I ran into one where some random bot out on the net was accessing random URLs on my server causing Jaxer to run for each one eventually running the system out of resources .", "I ve had a search and come up with Rhino and Jaxer is possible solutions but wanted to put the queston out there anyway as I m not sure they re quite what I m after especially if I have no control over the javascript so I m unable to add runat server for example .", "Lest you think I m some Jaxer hater let me pre-defend myself by pointing out I was an early adopter of Jaxer pre-1.0 was one of the most active posters on the original forum and have two sites running on Jaxer .", "Jaxer and Aptana Studio do not yet have the ability to debug remote scripts from the client-side .", "node.js on the other hand is not a browser running on the server it is very much alive right now and it doesn t have any tie to Apache or any other standard web server .", "You can get around some of the RAM hungry nature of Jaxer by running on a virtual-machine technology that lets you have swap space so things like the GUI libraries Jaxer uses", "Has anyone used Jaxer http : www.aptana.com jaxer in a production environment I am curious as to how it holds up compared to something like php ruby etc .", "EDIT : I ve posted another question regarding a drawback I discovered while playing with Jaxer : http : stackoverflow.com questions 109762 defining-objects-when-using-jaxer", "You get to write your server JavaScript using whizzy new JavaScript 1.8 features like Array extras and getters setters .", "Or server-side JS sits in between the web server and other langauge stack .", ".. . .. . I don t think JavaScript as a language is really a better or worse option than traditional server-side languages .", "It is based on the Mozilla engine so scripts are written with javascript and you have complete access to the DOM on the server-side .", "We would like to use JavaScript and jQuery on the server IIS for the following reasons : .. . .. . 1 .", "Skills transfer - we would like to use JavaScript and jQuery on the server and not have to use eg VB Script .", "Related question : stackoverflow.com questions 1991822 http : stackoverflow.com questions 1991822 is-there-a-server-side-javascript-engine-for-iis", "I definitely think there is an opportunity for a .net javascript server-side implementation based on the DLR combined with John Resigs ideas .", "I want to apply the same javascript programming model on the server as I do on the client .", "So I want to call a remote page on a 3rd party site from my server and have the javascript executed .", "Personally I liked Jaxer because you easily could use the same code client and server-side without duplication such as form validation however I didn t like that you had hardly any control over the generated pages which where propped full of JavaScript even for the most trivial page and made the pages highly depended on JavaScript which made unobtrusive JavaScript virtually impossible .", "By running the Javascript on the server and only rendering HTML you will lose the ability to add these enhancements without doing a round trip to the server think WebForms postback model...ugh .", "Active Server Pages .", "Technologies such as Node.JS have came out bringing with it the same ideas and technology Jaxer was proposing and showing that Javascript can be viable on the backend of the web technology stack just as it is on the front end .", "I d like to be able to define an object and specify which methods will be available on the server which will be available on the client and which will be available on the client but executed on the server server-proxy .", "You can build your own web server using node.js s HTTP component http : nodejs.org docs v0.5.4 api http.html but that brings on The Lisp Curse http : www.winestockwebdesign.com Essays Lisp Curse.html : because there is no standard web server everyone builds theirs a different way so that there is no concentrated expertise on the subject .", "Jaxer http : jaxer.org - Runs on Spidermonkey with a DOM implementation so you can manipulate the page with frameworks like jQuery or Prototype .", "Aptana the company that created Jaxer was bought http : www.appcelerator.com 2011 01 appcelerator-acquires-aptana by Appcelerator a desktop-focused company .", "Jaxer is left out of this being described as in maintenance mode with announcements to come in late Q1 of 2011 .", "Even if Jaxer were a healthy thriving project it still has some serious drawbacks : .. . .. . 1 .", "Absolute bare minimum to host a functional Jaxer site is 256 MB and 512 MB is a lot safer .", "php ruby which I imagine is not practical except to help in transitioning existing applications to use Jaxer .", "Overall I think Jaxer has the most promise as a postprocessor in front of another web framewok .", "It would be great to use Jaxer to layer all the spiffy AJAX stuff on top of an existing site .", "I don t think I would want to write an application using only Jaxer .", "I have installed Jaxer now and the first thing I tested was the E4X functionality .", ": .. . .. . We ended up hacking around this by creating our own custom sandbox.openProxy method in the jaxer framework .", "So that s why I m asking about Jaxer because in my opinion that can be more directly compared to PHP .", "I would say that s more true now than when Jaxer was released .", "Hi Matt Well I don t know if Jaxer has any unique benefit .", "Is Google Charts of such all-consuming importance that you will let that one third-party component drive your core server-side technology choice" ] }
{ "confidence": [ 48.77362060546875, 47.087623596191406, 43.725006103515625, 42.703853607177734, 41.40067672729492, 41.15548324584961, 41.020408630371094, 41.020408630371094, 40.840614318847656, 40.623748779296875, 39.78268814086914, 39.728851318359375, 39.300148010253906, 38.982852935791016, 38.893585205078125, 38.19799041748047, 37.76280975341797, 37.13768768310547, 37.13768768310547, 36.403160095214844 ], "content": [ "Question : Since Jaxer has been around longer is it a better solution than Node.js if you are a developer like me who is new to programming with JavaScript on the server-side Comment : Node.js is so powerful and familiar platform today a simple good search gives a lot of understanding for Jaxer there is nice article by John Resig jQuery author here - ejohn.org blog server-side-javascript-with-jaxer http : ejohn.org blog server-side-javascript-with-jaxer This very nicely explain Jaxer and what all has been written in below answers . Hope it helps .. . Answer : Despite both using JavaScript as the language Jaxer and Node.js achieve two different goals . Jaxer appears to be targeted as a server-side Web scripting-language like PHP or ASP.NET whereas Node.js is more of a general-purpose event-driven network server framework that happens to be able to serve Web pages . Which solution you should choose hinges entirely upon what you re trying to do . If you can expand upon your question with your goals for server-side JavaScript then we can provide better suggestions as to what to use . Comment : I am trying to decide which approach I should use to develop Web Applications instead of having to use Java or C or PHP", "Question : Since Jaxer has been around longer is it a better solution than Node.js if you are a developer like me who is new to programming with JavaScript on the server-side Comment : Node.js is so powerful and familiar platform today a simple good search gives a lot of understanding for Jaxer there is nice article by John Resig jQuery author here - ejohn.org blog server-side-javascript-with-jaxer http : ejohn.org blog server-side-javascript-with-jaxer This very nicely explain Jaxer and what all has been written in below answers . Hope it helps .. . Answer : Jaxer and node.js are very different things . Think of Jaxer as Firefox running on the server-side but instead of a GUI its interface to the outside world is Apache . It can do pretty much anything a browser on the client-side can do : fetch pages from a third-party server run JS against that page pull elements from it via the DOM substitute new content into it etc . Jaxer can also work more or less like ASP or PHP simply executing JS inside special tags inside the HTML files Jaxer serves up via Apache so that you can insert some dynamic-content into those otherwise-static pages . Jaxer has one huge disadvantage : it is dead technology http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 . node.js on the other hand is not a browser running on the server it is very much alive right now and it doesn t have any tie to Apache or any other standard web server . You can build your own web server using node.js s HTTP component http : nodejs.org docs v0.5.4 api http.html but that brings on The Lisp Curse http : www.winestockwebdesign.com Essays Lisp Curse.html : because there is no standard web server everyone builds theirs a different way so that there is no concentrated expertise on the subject . The same goes for templating and other things that go into an ASP or PHP type platform : no complete built-in component means you end up assembling your own from the provided pieces . This makes node.js best suited for projects where you were already going to have to reimplement everything yourself so what you want is a box of tools and components rather than a platform . If you can fairly describe your project as a web app meaning that it s an application that just happens to show its UI via the web and most of its content is dynamically-generated rather than being served from files node.js might be a fine choice . If instead you just need to substitute some dynamic-content into a mostly static presentation well I cannot really recommend Jaxer but something like it that plugs into a standard web server is a better choice . Comment : What if you have something like google charts and you need javascript to run on server in order to put together an html file for emailing the charts I wonder if Node.js is more than we need but we just need something that will run the javascript and spit out the corresponding html tags for emailing . Comment : @Carine : While it would indeed be easier to use Google Charts on the server with Jaxer than Node it also requires you to use software that hasn t had a release in about nine years . That seems like a gross imbalance of priorities . Is Google Charts of such all-consuming importance that you will let that one third-party component drive your core server-side technology choice There are many many charting APIs and services to choose from .", "Question : I have been looking for a server-side javascript platform and seen references to Aptana Jaxer which looked ideal but the Jaxer aspect appears not to be supported any more is this correct I have seen the Jaxer site and installed the standalone server and it looks excellent but cannot see where or why I would use Aptana if it doesn t integrate with it or have I missed something I am trying to avoid the effort learning a technology that is no longer supported Regards .. . .. . Chris .. . Answer : Yes Jaxer is dead . I ve explained my reasoning elsewhere in this answer http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 . Comment : Thanks very much this is what I had concluded . I am still looking for a mechanism to run SSJS so I guess I keep looking On another tack broadly speaking Aptana is an environment to help creating HTML5 webstes yes I have put the Studio 3 plugin into my Eclipse distro and the additional functionality seems to be around having a JS perspective yes I don t write Rails or PHP sites sites this is not of use to me .", "Question : Remember Aptana Jaxer It plugs into Apache and allows using JavaScript on the server-side as an alternative to languages such as PHP . It comes with a consistens and slick API for filesystem-access database connectivity socket communication and whatever else you need . I wonder why hasn t this been more widely adopted why aren t more people using this Javascript is a modern and clean programming language as opposed to PHP and the Jaxer API is just so much more consistent and neat . No offense but the PHP API is just such a big mess with all its inconsistencies and its inconsequent function naming convention . Jaxer also makes client-server communication really convenient with its runat server-proxy where you can directly call server-side function from within your client-side script and Jaxer takes care of all the XML HTTP request stuff . So I would just really like to here what people think about it or why there s hardly anyone using it . Not wanting to start a flamewar here I m just curious . Thanks Comment : related aptanastudio.tenderapp.com discussions problems https : aptanastudio.tenderapp.com discussions problems 376-jaxer-forums page 1 to 2Fdiscussions 2Fproblems 2F376-jaxer-forums 2Fpage 2F1 3Fto 3D 252Fdiscussions 252Fproblems 252F376-jaxer-forums 252Fpage 252F2 253Fto 253D 25252Fdiscussions 25252Fproblems 25252F376-jaxer-forums Comment : Too many alternatives en.wikipedia.org wiki http : en.wikipedia.org wiki Comparison of Server-side JavaScript solutions you could always run it as CGI Comment : related stackoverflow.com questions 2095793 web-host-with-jaxer http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 .. . Answer : Personally I liked Jaxer because you easily could use the same code client and server-side without duplication such as form validation however I didn t like that you had hardly any control over the generated pages which where propped full of JavaScript even for the most trivial page and made the pages highly depended on JavaScript which made unobtrusive JavaScript virtually impossible . So I guess for purely JavaScript-based web apps it s ok however now there is for example Google Web Toolkit which is much more powerful which basicly also allows you to use one language client and server-side .", "Question : Remember Aptana Jaxer It plugs into Apache and allows using JavaScript on the server-side as an alternative to languages such as PHP . It comes with a consistens and slick API for filesystem-access database connectivity socket communication and whatever else you need . I wonder why hasn t this been more widely adopted why aren t more people using this Javascript is a modern and clean programming language as opposed to PHP and the Jaxer API is just so much more consistent and neat . No offense but the PHP API is just such a big mess with all its inconsistencies and its inconsequent function naming convention . Jaxer also makes client-server communication really convenient with its runat server-proxy where you can directly call server-side function from within your client-side script and Jaxer takes care of all the XML HTTP request stuff . So I would just really like to here what people think about it or why there s hardly anyone using it . Not wanting to start a flamewar here I m just curious . Thanks Comment : related aptanastudio.tenderapp.com discussions problems https : aptanastudio.tenderapp.com discussions problems 376-jaxer-forums page 1 to 2Fdiscussions 2Fproblems 2F376-jaxer-forums 2Fpage 2F1 3Fto 3D 252Fdiscussions 252Fproblems 252F376-jaxer-forums 252Fpage 252F2 253Fto 253D 25252Fdiscussions 25252Fproblems 25252F376-jaxer-forums Comment : Too many alternatives en.wikipedia.org wiki http : en.wikipedia.org wiki Comparison of Server-side JavaScript solutions you could always run it as CGI Comment : related stackoverflow.com questions 2095793 web-host-with-jaxer http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 .. . Answer : I remember taking a look at Jaxer back when it came out . I don t remember any sample applications at the time though . I wanted to get a feel for what it was good at . Just because a language is cleaner may not be enough to get people switch . What is its unique benefit For example Node.js is good at real-time applications and they make that relatively clear in the sample code on their front page . I think there was also been more uptake of Javascript since Jaxer was initially released . There seem to be more back-end developers who now also know Javascript . I would say that s more true now than when Jaxer was released . In other words maybe it was ahead of its time . Comment : Hi Matt Well I don t know if Jaxer has any unique benefit . I understand what you mean talking about Node.Js . Now I haven t really looked into it that much but from what I see Node.JS isn t really meant as a replacement for PHP . I was more thinking of using Jaxer for what PHP is used mostly i.e . your normal server-side website programming sort of thing where most of the time you don t really have much use for the asynchronity . I would just love to be able to use Javascript instead of messy PHP all the timef for writing webpages . Comment : In that case you might want to check out jspp : jspp.io http : www.jspp.io", "Question : I just started experimenting with Aptana Jaxer https : github.com aptana Jaxer server-side javascript engine for my next project . And i have few quesions about that .. . .. . By using server-side JS can we implement the whole web application without using any server-side languages like C java etc . Or server-side JS sits in between the web server and other langauge stack . Is it really a better approach what are the advandages and disadvandages how this works well in terms of performance is there any real-time implementation public websites only using server-side JS no other languages what are the alternatives available over Aptana jaxer open-source how well we can implement maitain db transactions can we do that in serverside JS. . is it possible to develop RESTFul and SOAP services in serverside JS. . i know this is too long and naive questions . I am just hoping someone have already come across all these while implementing serverside JS . EDIT : .. . .. . As per Matthew Ken comments i have added some clarity to the question Is it really a better approach .. . .. . this is what i intend to ask. . .. . .. . Is it really a better approach than using server-side languages assume c how we can compare this with the c implementation of a website performance language features And which one is a better approach using JS alone in serverside or JS in middle layer between other language stack and webserver .. . Answer : As a preface I use SSJS at my day job . We run a reasonably large in terms of complexity as well as page views website on SpiderMonkey . I ll add to Matthew s excellent answer where I have experience . Is it really a better approach than using server-side languages assume c .. . .. . Better really depends what you want to do with it . JavaScript itself has some great features as well as pretty awful ones . If you re serious about developing JS client or server I cannot recommend highly enough that you watch Douglas Crockford s presentation Javascript : The Good Parts http : www.youtube.com watch v hQVTIJBZook if you haven t already . He s done a fantastic job sorting out the cruft and he s an excellent speaker to boot . The biggest thing that I find the SSJS world lacking right now is maturity . I m not familiar with C but JavaScript has no mature standard-library and no mature means of package distribution . To me that s a big piece of the puzzle . That said keep your eye on the CommonJS http : wiki.commonjs.org wiki CommonJS group . They re working toward defining those exact things . Also The Jaxer Api Documentation lists the built-ins that are included with that framework . how this works well in terms of performance .. . .. . JavaScript itself is not a slow language nor is it a particularly fast one . As Matthew pointed out it should be comparable to any other scripting-language you would use . The war between the browser vendors to see who can build the fastest browser will benefit the SSJS crowd as well . The generational garbage-collection that the V8 team-build into their engine is a great example of this . Halting the virtual-machine to free unreachable objects from the heap and reclaim their memory can be somewhat slow but they ve mitigated that by reducing the amount of objects that need to be inspected when the garbage collector runs . how well we can implement maintain db transactions can we do that in serverside JS. . .. . .. . Jaxer appears to have MySQL and SQLite database APIs . As Matthew mentioned if you use Rhino you can use the JDBC api . Edit : Added links Comment : thanks Brandon for sharing your experience in SSJS.. .", "Question : I realize that this question has been asked before http : stackoverflow.com questions 10293 has-anyone-used-jaxer-in-production but it has been a month with no decent responses.. . I m looking at Aptana s Jaxer http : www.aptana.com jaxer and I find the concept to be very exciting . Here is a quick overview for those who are not familiar with it : .. . .. . Jaxer is in their words the world s first true AJAX server . It is based on the Mozilla engine so scripts are written with javascript and you have complete access to the DOM on the server-side . Scripts are placed on your pages with script tags and you can specify a runat attribute ala ASP.NET to mark scripts for execution on the client-server both or as a server-proxy which makes the functions available on the client but they execute on the server via AJAX . This also means that you can use your favorite client-side libraries jQuery Prototype on the server as well as the client . It also can be used to process documents that are generated in another language e.g . php ruby which I imagine is not practical except to help in transitioning existing applications to use Jaxer . What are the pros and cons How mature stable is it the API How good is performance compared to other server-side html preprocessors Has anyone used Jaxer with another technology php pearl ruby etc . and what were your experiences EDIT : I ve posted another question regarding a drawback I discovered while playing with Jaxer : http : stackoverflow.com questions 109762 defining-objects-when-using-jaxer .. . Answer : I did come across this set of performance benchmarks http : www.aptana.com taxonomy term 14 . It looks as though Jaxer performs better than Rails but not as well as php.. .", "Question : I realize that this question has been asked before http : stackoverflow.com questions 10293 has-anyone-used-jaxer-in-production but it has been a month with no decent responses.. . I m looking at Aptana s Jaxer http : www.aptana.com jaxer and I find the concept to be very exciting . Here is a quick overview for those who are not familiar with it : .. . .. . Jaxer is in their words the world s first true AJAX server . It is based on the Mozilla engine so scripts are written with javascript and you have complete access to the DOM on the server-side . Scripts are placed on your pages with script tags and you can specify a runat attribute ala ASP.NET to mark scripts for execution on the client-server both or as a server-proxy which makes the functions available on the client but they execute on the server via AJAX . This also means that you can use your favorite client-side libraries jQuery Prototype on the server as well as the client . It also can be used to process documents that are generated in another language e.g . php ruby which I imagine is not practical except to help in transitioning existing applications to use Jaxer . What are the pros and cons How mature stable is it the API How good is performance compared to other server-side html preprocessors Has anyone used Jaxer with another technology php pearl ruby etc . and what were your experiences EDIT : I ve posted another question regarding a drawback I discovered while playing with Jaxer : http : stackoverflow.com questions 109762 defining-objects-when-using-jaxer .. . Answer : I believe Jaxer is so promising coming from an AJAX developer here .. . though that would mean I have to do away or use less of PHP my first language . :", "Question : I realize that this question has been asked before http : stackoverflow.com questions 10293 has-anyone-used-jaxer-in-production but it has been a month with no decent responses.. . I m looking at Aptana s Jaxer http : www.aptana.com jaxer and I find the concept to be very exciting . Here is a quick overview for those who are not familiar with it : .. . .. . Jaxer is in their words the world s first true AJAX server . It is based on the Mozilla engine so scripts are written with javascript and you have complete access to the DOM on the server-side . Scripts are placed on your pages with script tags and you can specify a runat attribute ala ASP.NET to mark scripts for execution on the client-server both or as a server-proxy which makes the functions available on the client but they execute on the server via AJAX . This also means that you can use your favorite client-side libraries jQuery Prototype on the server as well as the client . It also can be used to process documents that are generated in another language e.g . php ruby which I imagine is not practical except to help in transitioning existing applications to use Jaxer . What are the pros and cons How mature stable is it the API How good is performance compared to other server-side html preprocessors Has anyone used Jaxer with another technology php pearl ruby etc . and what were your experiences EDIT : I ve posted another question regarding a drawback I discovered while playing with Jaxer : http : stackoverflow.com questions 109762 defining-objects-when-using-jaxer .. . Answer : @BRH : Great insight . I would echo all of the Pros and Cons 2 4 5 and your final overview . I kind of get the sense that they didn t intend to displace any of the market for upstream frameworks .. . but if they could do so and keep it as tight and comprehensible as it is I hope they do I like the way they think P.S . I don t know if it is new but there is a jaxer : include tag that injects fragments into the page prior to server-side script execution that might be a help in some code-reuse scenarios . There may be more for me to discover along those lines .", "Question : I realize that this question has been asked before http : stackoverflow.com questions 10293 has-anyone-used-jaxer-in-production but it has been a month with no decent responses.. . I m looking at Aptana s Jaxer http : www.aptana.com jaxer and I find the concept to be very exciting . Here is a quick overview for those who are not familiar with it : .. . .. . Jaxer is in their words the world s first true AJAX server . It is based on the Mozilla engine so scripts are written with javascript and you have complete access to the DOM on the server-side . Scripts are placed on your pages with script tags and you can specify a runat attribute ala ASP.NET to mark scripts for execution on the client-server both or as a server-proxy which makes the functions available on the client but they execute on the server via AJAX . This also means that you can use your favorite client-side libraries jQuery Prototype on the server as well as the client . It also can be used to process documents that are generated in another language e.g . php ruby which I imagine is not practical except to help in transitioning existing applications to use Jaxer . What are the pros and cons How mature stable is it the API How good is performance compared to other server-side html preprocessors Has anyone used Jaxer with another technology php pearl ruby etc . and what were your experiences EDIT : I ve posted another question regarding a drawback I discovered while playing with Jaxer : http : stackoverflow.com questions 109762 defining-objects-when-using-jaxer .. . Answer : I didn t use Jaxer for very long but here s some things I found : .. . .. . Pros .. . .. . Write the frontend and backend in the same code . Especially nice for writing validation logic . Seamless AJAX communication back to the server - it s just like calling a JS function . The ability to use JavaScript frameworks like jQuery to manipulate the DOM . The ability to generate or manipulate images using the Canvas API . You get to write your server JavaScript using whizzy new JavaScript 1.8 features like Array extras and getters setters . Cons .. . .. . I found their API to be unstable they were transitioning to 1.0 when I was trying it so that kinda made sense and the documentation was confusing missing or didn t match with changed functionality . I also found that it was very hard to debug my Jaxer server-side code and when I got in trouble the error messages weren t very helpful . You don t get real MVC or even MVP ASP.NET-style separation between your presentation and your logic . I personally couldn t get E4X xml in JavaScript working which was supposed to be a big draw . There s not a lot of framework built around it for building a whole application . You re starting from some pretty basic building blocks . It s not really providing any help in your view so forget all the templating or reusable components you might use elsewhere . Not that you can t replicate that but it s more difficult than having it out of the box . Overall I think Jaxer has the most promise as a postprocessor in front of another web framewok . It would be great to use Jaxer to layer all the spiffy AJAX stuff on top of an existing site . It would make it a lot easier to make a dynamic site with validation page manipulation logic shared between server and client . I don t think I would want to write an application using only Jaxer . Also it s young and immature - I ll be interested to see where it ends up . Comment : I have installed Jaxer now and the first thing I tested was the E4X functionality . Seems to work great and is a very powerful tool . You do have to keep in mind that E4X code should be kept server-side as Mozilla is the only browser that knows what to do with it . Comment : Yeah I know that it s a Moz-only . As I said I was using it right around the transition to 1.0 during the betas and I had a hard time with E4X . If it works it s wonderful if it doesn t it s totally opaque .", "Question : I m a guy who s hosted on HostGator because I want cheap PHP hosting . However I ve been playing with a Jaxer server on my linux box and I d like to write web apps in it . Can anyone recommend an affordable host that runs or will allow me to run Jaxer I d rather not get a dedicated or VP server.. . Thanks to the community .. . Answer : Jaxer is dead technology . Some hacker-necromancer may resurrect it but it doesn t look likely . Jaxer 1.0 was released in January 2008 and only received a few minor upgrades after that mostly fixing typical 1.0 bugs and limitations . The last release 1.0.3 is about three years old as I write this . Three years is a long time to wait for an update to an open-source product particularly given that Jaxer died pretty much right as the whole Javascript speed race began . Jaxer is based on Firefox 3.0 so it does not have the TraceMonkey https : wiki.mozilla.org JavaScript : TraceMonkey and J gerMonkey https : wiki.mozilla.org JaegerMonkey advances Mozilla has made since that release . Jaxer s code has since been placed into a public source repository https : github.com aptana Jaxer but no substantial commits have been made https : github.com aptana Jaxer commits master since that initial checkin . The old support forums are closed http : forums.aptana.com and the new Jaxer mailing list carries little content http : groups.google.com group jaxer pli 1 . It mostly consists of unanswered questions . Aptana the company that created Jaxer was bought http : www.appcelerator.com 2011 01 appcelerator-acquires-aptana by Appcelerator a desktop-focused company . Appcelerator s Aptana acquisition FAQ http : www.appcelerator.com aptana-faq says they intend to continue developing the server-side Python PHP and Rails products . Jaxer is left out of this being described as in maintenance mode with announcements to come in late Q1 of 2011 . Since then crickets . Before the Appcelerator buyout Apatana dropped Jaxer from the Studio download . You could then and still can download it http : jaxer.org separately but that s small comfort given that the support for it seems to be if it breaks you get to keep both pieces . Even if Jaxer were a healthy thriving project it still has some serious drawbacks : .. . .. . 1 . Browser Javascript the platform Jaxer is built on doesn t know how to run code in trustably separate sandboxes so you need a separate interpreter for each site hosted on the server . That costs memory one of the biggest drivers of higher hosting fees . 2 . That wouldn t be so bad if the core technology was a parsimonious user of RAM but it s not : it s Firefox a RAM-hungry program . While debugging a server crash due to it running out-of-memory I found that the core problem was that launching an external process ballooned the VM use by 35 MB . It was a one-time hit for the first launch only not a memory leak but multiply that by the number of Jaxer processes you have serving connections 3 by default with more better for performance and you re already over the 64 or 128 MB limit for some cheap hosting plans . Absolute bare minimum to host a functional Jaxer site is 256 MB and 512 MB is a lot safer . 3 . You can get around some of the RAM hungry nature of Jaxer by running on a virtual-machine technology that lets you have swap space so things like the GUI libraries Jaxer uses don t stay in RAM but many do not . Often you have to use more expensive hosting to get something like Xen rather than a more efficient VM system like OpenVZ that doesn t let you use swap space . 4 . Because Jaxer isn t being patched any more there are still bugs in it that can crash or hang the server . I ran into one where some random bot out on the net was accessing random URLs on my server causing Jaxer to run for each one eventually running the system out of resources . I had to rearchitect the way my site was built so the bot s hits were served only by Apache restricting Jaxer to a single sub-tree of the site . That s just a workaround though because all you d have to do to start crashing it again is to access lots of random URLs in the new sub-tree . Every month or so I have to reboot the VPS because it s consumed all the RAM probably because someone s stumbled across this weakness in the design . Bottom line Jaxer is completely unsuited to cheap shared-hosting . Lest you think I m some Jaxer hater let me pre-defend myself by pointing out I was an early adopter of Jaxer pre-1.0 was one of the most active posters on the original forum and have two sites running on Jaxer . Yes I m upset but mainly because one of those sites was migrated off one dead technology onto another that died within a year of that move . The other was created from scratch after I successfully migrated the first . Now I m stuck wondering whether I now have to move again or keep trucking along on a platform that looks like it won t move forward ever again . You don t want to be in this same boat much as I might like the company . Comment : Wow.. . thanks for all the extensive info . I have to disagree though that not being able to run something on a cheap shard host is a big let down - i don tthink 20 mo is unreasonable . Back in 98 2k i paid nearly that much for shared-hosting alone with like a few hundred MB . Now you can pay that and get a dozen or so gigs + root on the box . Im automatically skeptical of anything thats less than about 10 mo anyhow . I realize if you jsut need to host a blog or something thats ridiculous but if youre deploying an app.. . even a simple one i think its a non issue myself . Just MHO though . Comment : The size numbers above are all for RAM or more accurately virtual-memory since that lets you expand RAM . Since you re talking about dozens of gigs I guess you mean disk space instead . My cheap unmanaged VPS plan with 512 MB of dedicated RAM costs me a fair bit more than 20 month . Looking around it seems I m paying about in the middle of typical fees for this . To my mind cheap shared-hosting means below 20 month .", "Question : I found a project jaxer http : jaxer.org which embeds Firefox s JavaScript engine on the server-side so it can parse HTML server-side very well . But this project seems dead . It is really helpful for crawling web pages to parse HTML extract data . Is there some new technology useful for extracting information .. . Answer : ItsNat http : www.itsnat.org is similar to Jaxer the main difference is Java based instead of JavaScript .", "Question : Remember Aptana Jaxer It plugs into Apache and allows using JavaScript on the server-side as an alternative to languages such as PHP . It comes with a consistens and slick API for filesystem-access database connectivity socket communication and whatever else you need . I wonder why hasn t this been more widely adopted why aren t more people using this Javascript is a modern and clean programming language as opposed to PHP and the Jaxer API is just so much more consistent and neat . No offense but the PHP API is just such a big mess with all its inconsistencies and its inconsequent function naming convention . Jaxer also makes client-server communication really convenient with its runat server-proxy where you can directly call server-side function from within your client-side script and Jaxer takes care of all the XML HTTP request stuff . So I would just really like to here what people think about it or why there s hardly anyone using it . Not wanting to start a flamewar here I m just curious . Thanks Comment : related aptanastudio.tenderapp.com discussions problems https : aptanastudio.tenderapp.com discussions problems 376-jaxer-forums page 1 to 2Fdiscussions 2Fproblems 2F376-jaxer-forums 2Fpage 2F1 3Fto 3D 252Fdiscussions 252Fproblems 252F376-jaxer-forums 252Fpage 252F2 253Fto 253D 25252Fdiscussions 25252Fproblems 25252F376-jaxer-forums Comment : Too many alternatives en.wikipedia.org wiki http : en.wikipedia.org wiki Comparison of Server-side JavaScript solutions you could always run it as CGI Comment : related stackoverflow.com questions 2095793 web-host-with-jaxer http : stackoverflow.com questions 2095793 web-host-with-jaxer 2103165 2103165 .. . Answer : Well first of all there is Node.JS http : nodejs.org out there too . Far more people have heard of that probably . And people do use node especially when it comes to chats and similar things : Things there long-polling is appreciated . My personal problem with node is that it is so asynchronous . That s a very very very big pro on one hand because is allows most awesome performance and makes some things so much easier but on the other hand it is a big minus for those used to synchronous programming-languages . I simply have problems with looking at code which has 15 callbacks nested in each other.. . Comment : Yea I ve heard about Node.JS and I agree that it s asynchronous nature certainly can be awesome for some things but it s often overkill if your program is just not supposed to make use of that . So that s why I m asking about Jaxer because in my opinion that can be more directly compared to PHP . Comment : Yes my answer is only slightly related to your question . I have heard of Jaxer the first time now . I just wanted to say which problem I have with the only server-side JS implementation I know I can delete it if you consider it too off-topic . Comment : haha no it all good", "Question : I m trying to debug some server-side JavaScript code running in Aptana Jaxer and I m not having any success . I haven t even been able to find any tutorials or posts about this issue . Does anyone know if it s possible and if so what am I missing .. . Answer : Jaxer and Aptana Studio do not yet have the ability to debug remote scripts from the client-side . That is you can t single-step into a callback and have your code window show you the first line of code in the remote method . This is on their wishlist of course but it d be pretty tricky to do well . Personally I use logging . Jaxer has strong facilities for this in Jaxer.Log . . A lot of people sneer at printf debugging but the fact is it works and it s often less trouble to set up than an interactive debugger especially for server applications and remote method invocation . You just sprinkle logging messages wherever you want to know the state of the system at that point then make your app try to do the thing that s failing . Study the logs rinse repeat .", "Question : I have an old tool an ex- colleague wrote a few years back with Jaxer that I d like to replace rewrite . Jaxer https : github.com aptana Jaxer is an abandoned server-side framework based on a headless Mozilla Gecko-Browser allowing you to use JavaScript and the DOM server-side . Since Jaxer is abandoned and because I have big problems installing and running Aptana Studio 1.5 with Jaxer on a new computer I m looking for a library framework something on which I can base a new version . This tool is only run locally inside Aptana Studio the IDE for Jaxer and was never intended to be an actual web app . It crawls our customers websites by loading them page by page into the server-side Mozilla . In order to do that it uses jQuery and predefined CSS selectors to find the links in the menus and parse other information out of the pages . The final result is basically a glorified sitemap . I d like to keep this modus operandi if possible and continue using jQuery JavaScript the DOM to load and parse access the pages but it can be wrapped in a framework based on another language such as Java . I considered writing something based on Gecko myself but that seems a bit over the top so I m open for an other suggestions . .. . Answer : As far as HTML crawling parsing goes : http : ccil.org cowan XML tagsoup .. . .. . or .. . .. . http : jsoup.org Comment : TagSoup isn t really useful here because as a SAX parser I can t use XPath or CSS and I d have to individually write script routines that find the information I need or am I wrong . jsoup however looks promising since it supports CSS selectors . Very nice", "Question : I ve had a search and come up with Rhino and Jaxer is possible solutions but wanted to put the queston out there anyway as I m not sure they re quite what I m after especially if I have no control over the javascript so I m unable to add runat server for example . So I want to call a remote page on a 3rd party site from my server and have the javascript executed . Using CUrL I can easily grab the page it s content do POSTing etc etc but what I can t do is run javascript . I ve had solutions suggested from building a .NET application which calls the URLs in a browser to the above Rhino and Jaxer but I wanted to see if anyone had any previous experience of this and if so what are the possible gotchas and how did you solve the problem . Cheers .. . .. . Mike Comment : @Srinivas : No . JavaScript is a language not a client-side language . I use it on the server all the time . In fact it was one of the first server-side scripting languages the old Netscape Application Server supported it circa 1997 . Every version of IIS has supported it for server-side scripting in ASP and ASP.Net pages . Etc . Comment : @T.j.Crowder Thanks i didn t know that Comment : One of the potential problems you face @Mike is that the Javascript on those pages is likely to expect that it will have access to the page DOM and that the DOM will look the way the code expects it to look . That means that your server-side code will have to parse the surrounding HTML and provide at least some portion of the DOM API for the Javascript to use . You can cross your fingers and hope that the HTML can be parsed with some server-side XML parser but that might be a challenge . Comment : @Mike : I have not done this but in order for the JavaScript in the remote page to run properly it s going to need to think it s running client-side in fact you re basically going to be using your server as the client of that other site if you follow me . That means it ll need to have a DOM to manipulate and such . That suggests you re going to have to run not just Rhino but nearly a full-on browser . It s probably worth looking at the WebKit or Gecko engines for DOM and SpiderMonkey Firefox s JS engine or V8 Chrome s for JavaScript . This is a non-trivial task . Comment : @pawel well ok then that sounds awesome and quite appropriate to the purpose .. . Answer : I think Jaxer is your only option . You can use Jaxer.Sandbox http : jaxer.org api Jaxer.Sandbox.html to render remote page on the server and execute all scripts embedded on that page . The resulting DOM is what you d get in Firefox web browser with JS enabled . Here s a simple tutorial http : jaxer.org tutorials dom scraping 2 featuring Jaxer.Sandbox for web scrapping purposes .", "Question : I just started experimenting with Aptana Jaxer https : github.com aptana Jaxer server-side javascript engine for my next project . And i have few quesions about that .. . .. . By using server-side JS can we implement the whole web application without using any server-side languages like C java etc . Or server-side JS sits in between the web server and other langauge stack . Is it really a better approach what are the advandages and disadvandages how this works well in terms of performance is there any real-time implementation public websites only using server-side JS no other languages what are the alternatives available over Aptana jaxer open-source how well we can implement maitain db transactions can we do that in serverside JS. . is it possible to develop RESTFul and SOAP services in serverside JS. . i know this is too long and naive questions . I am just hoping someone have already come across all these while implementing serverside JS . EDIT : .. . .. . As per Matthew Ken comments i have added some clarity to the question Is it really a better approach .. . .. . this is what i intend to ask. . .. . .. . Is it really a better approach than using server-side languages assume c how we can compare this with the c implementation of a website performance language features And which one is a better approach using JS alone in serverside or JS in middle layer between other language stack and webserver .. . Answer : By using server-side JS can we implement the whole web application without using any server-side languages like C java etc . .. . .. . It shouldn t be necessary to write code in any other languages although many server-side JavaScript frameworks use the Rhino engine which allows you to call any Java code . Is it really a better approach .. . .. . I don t think JavaScript as a language is really a better or worse option than traditional server-side languages . It has advantages along with other dynamic languages like Ruby and Python like flexibility fast prototyping no pun intended flexibility etc . On the other hand it doesn t have the library support that Java and C have or static-typing I won t get into the debate over which is better here I like both for different reasons . If you want the best of both you can use JavaScript as a scripting-language embedded in your application . Rhino for Java and JScript.NET make it easy to manipulate native objects in JavaScript . You could for example write your domain classes in Java or C and script them with JavaScript where you want more flexibility . If you are comfortable enough with JavaScript writing in a single language may be simpler though . I ve never written a real server-side application using JavaScript so I can t really make a judgment about whether its better or worse than .NET I ve also never used JScript.NET . I have played around with a few frameworks for fun though and I m currently rewriting my personal site using Helma NG . So far it s been a good experience much better than PHP which I ve never really liked . what are the advandages and disadvandages .. . .. . Advantanges : .. . .. . Only one language needed for server-side and client-side programming . Possibility for shared code for things like form validation . Jaxer lets you run scripts on the client-server or both . You get to program in JavaScript assuming you like the language . Disadvantages : .. . .. . Many frameworks are experimental not very mature . You have to program in JavaScript assuming you don t like the language . how this works well in terms of performance .. . .. . Performance should be approximately comparable to other scripting languages . is there any real-time implementation public websites only using server-side JS no other languages .. . .. . I don t know of any large websites using JavaScript but there may be some . what are the alternatives available over Aptana jaxer open-source .. . .. . Wikipedia has a large list of options http : en.wikipedia.org wiki Server-side 5FJavaScript but it doesn t have much useful information . There are lots of options with a wide range in maturity and size . Here are a few that I m familiar with to varying degrees .. . .. . Helma http : www.helma.org - Rhino Java based framework with active record . Helma NG http : dev.helma.org wiki Helma+NG - Helma Next Generation experimental rewrite under active development . Phobos https : phobos.dev.java.net - Has good support in NetBeans http : www.netbeans.org . v8cgi http : code.google.com p v8cgi - Small and simple uses Google s V8 engine probably not production-ready yet . Jaxer http : jaxer.org - Runs on Spidermonkey with a DOM implementation so you can manipulate the page with frameworks like jQuery or Prototype . Has good IDE support in Aptana Studio . how well we can implement maintain db transactions can we do that in serverside JS. . .. . .. . Rhino-based frameworks let you use Java classes so you have full JDBC support . I haven t used Jaxer s database libraries so I don t know anything about its capabilities . is it possible to develop RESTFul and SOAP services in serverside JS. . .. . .. . RESTful APIs shouldn t be any problem . I don t know of any specific support for SOAP but it should be possible . Comment : thanks Matthew for taking your time to answer my question. . I have updated my question for Is it really a better approach section.. . Comment : Nice answer . And did the author just change the question after you answered it If so that s poor form.. . Comment : @ken i dint change the question.. . mathew needed some info on Is it really a better approach . . so i just added some clarity on that question alone .. . You can check the revision history if you want.. . : Comment : @ken i have updated my question with EDIT section . this now shows my actual question and the question i have modified in a edit section.. . hope this clarifies. . Comment : Sorry to accuse I should ve checked the history myself -- I just hate it when that happens", "Question : I m trying to debug some server-side JavaScript code running in Aptana Jaxer and I m not having any success . I haven t even been able to find any tutorials or posts about this issue . Does anyone know if it s possible and if so what am I missing .. . Answer : You can set you Jaxer.Config.DEV MODE true to get some error information in your browser . Also use the Jaxer.Log to debug . Hope this helps a bit .", "Question : I m trying to debug some server-side JavaScript code running in Aptana Jaxer and I m not having any success . I haven t even been able to find any tutorials or posts about this issue . Does anyone know if it s possible and if so what am I missing .. . Answer : tail -f opt AptanaJaxer logs jaxer.log", "Question : I found a project jaxer http : jaxer.org which embeds Firefox s JavaScript engine on the server-side so it can parse HTML server-side very well . But this project seems dead . It is really helpful for crawling web pages to parse HTML extract data . Is there some new technology useful for extracting information .. . Answer : Another interesting way to do this is to use node.js http : nodejs.org in conjunction with jsdom http : github.com tmpvar jsdom and node-htmlparser http : github.com tautologistics node-htmlparser to load a page and parse the javascript in it . It is not really working out of the box yet at the moment but Dav Glass from Yahoo have had success running YUI in node.js http : www.yuiblog.com blog 2010 04 09 node-js-yui-3-dom-manipulation-oh-my using a modified version of this combo . This is interesting if you decide that nothing out there is good enough and you want to implement your own . If so it would make an excellent open-source project . Comment : note : I m adding this as a separate answer because it is a radically different solution to my previous answer ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
ranorex@java@167
ranorex -- ranorex is a commercial ui test automation framework for testing many different application types including web 2.0 wpf flash flex silverlight qt .net and @placeholder .
{ "confidence": [ 54.41973876953125, 53.678489685058594, 51.79356002807617, 50.79998779296875, 49.96647644042969, 49.35615158081055, 49.2777214050293, 46.84693908691406, 46.68609619140625, 46.43378448486328, 46.1317138671875, 45.68821716308594, 45.079017639160156, 45.079017639160156, 44.685054779052734, 43.778526306152344, 43.778526306152344, 43.75731658935547, 43.75731658935547, 43.75731658935547, 43.75731658935547, 43.63361358642578, 43.59830093383789, 42.8051643371582, 42.64901351928711, 42.64901351928711, 42.50167465209961, 42.41984558105469, 42.41984558105469, 42.26280975341797, 41.83032989501953, 41.526512145996094, 41.338661193847656, 41.136077880859375, 41.081119537353516, 41.081119537353516, 40.818050384521484, 40.579185485839844, 40.54106140136719, 40.54106140136719, 39.92866516113281, 39.61690139770508, 39.499786376953125, 39.4559326171875, 39.4559326171875, 39.4559326171875, 39.4559326171875, 39.4559326171875, 39.35456466674805, 39.31578826904297, 39.31578826904297, 39.03860092163086, 38.745445251464844, 38.686561584472656, 38.12965393066406, 38.12898254394531, 37.96371841430664, 37.96371841430664, 37.96371841430664, 37.96004867553711, 37.95026779174805, 37.90555191040039, 37.631160736083984, 37.631160736083984, 37.631160736083984, 37.6141242980957, 37.01309585571289, 36.94138717651367, 36.94138717651367, 36.94138717651367, 36.94138717651367, 36.90373229980469, 36.26243591308594, 36.23967361450195, 36.23967361450195, 36.23967361450195, 36.208778381347656, 36.208778381347656, 36.208778381347656, 36.208778381347656, 36.208778381347656, 35.9071159362793, 35.9071159362793, 35.44550704956055, 35.44550704956055, 35.44550704956055, 35.14249038696289, 35.0959358215332, 35.0959358215332, 35.0959358215332, 35.0959358215332, 35.0959358215332, 34.49855041503906, 34.464561462402344, 34.14960861206055, 33.87272262573242, 33.72513198852539, 33.631439208984375, 33.631439208984375, 33.631439208984375 ], "content": [ "I m using Ranorex Test automation tool that use .net-4.5 frame .", "I am new to automation testing tool Ranorex .", "I am testing a Web application and stated using Ranorex .", "I am testing my web application php using ranorex automation tool .", "For automation purposes i use Ranorex .", "Ranorex Experts .. . .. . I m new to ranorex and trying to use ranorex C API for a windows desktop application .", "Our automation is using Ranorex to run BDD tests .", "The following is an article describing the integration with Jenkins : http : www.ranorex.com blog integrating-ranorex-automation-in-jenkins-continuous-integration-process .. . .. . If you are more familiar with Microsoft Team Foundation Server the following is a good article on how to integrate Ranorex to Microsoft Test Manager and Team Build : http : www.ranorex.com blog running-ranorex-automated-tests-using-microsoft-test-manager .. . .. . Finally there is another good article describing the integration of Ranorex with Jenkins TestLink : http : www.ranorex.com blog integrating-ranorex-with-testlink-and-jenkins-2", "For Ranorex and it s components to work atleast Ranorex Runtime Licencse is required .", "Ranorex is used to create recordings of UI tests .", "There are similar questions discussed in the Ranorex forum .", "This article on Ranorex web site shows how to Ranorex integration in TFS MTM Visual Studio : ranorex.com news article http : www.ranorex.com news article howto-test-automation-with-tfs-and-ranorex.html", "I can identify find an element with a certain RanoreXPath via Ranorex Spy but not via Ranorex API .", "In the Ranorex documentation http : www.ranorex.com Documentation Ranorex html P Ranorex Adapter Visible.htm the definition isn t clear regarding this .", "These problems only occur during automation but Ranorex maintain that their automation does not change anything within the application .", "I m trying to test Java app with Ranorex .", "Ranorex is a user-interface test tool for Windows .", "but am new to ranorex so getting few errors .", "So what is in Ranorex the exact definition for visible", "Ranorex official support told me that this answer is correct", "And Ranorex is running also for desktop-applications not only websites .", "In the last code excerpt is dataConn a Ranorex data connector created in the Ranorex test suite", "I m using Ranorex for Testautomation .", "Can you highlight how you run multiple test case in Ranorex .", "Could you point me some pros and cons of using ranorex vs sikuli for flash based website automation", "Could you point me some pros and cons of using ranorex vs sikuli for flash based website automation", "I don t think you can use Ranorex to close a popup that is generated by the Ranorex runner itself", "Can someone tell me the pros and cons of Ranorex and with coded UI", "Ranorex is really good to build coded UI tests by non programmers.. .", "A Microsoft TestMethod is not corresponding to a Ranorex Test Case it is a Ranorex Run Configuration as defined in the test suite .", "I was just playing around with ranorex .", "Concerning your second question a video how to work with data connector can be found on the Ranorex website directly : Data-Driven Test Automation with Ranorex http : www.ranorex.com support screencasts.html c3896", "It can be either started manually at the end of the day using Ranorex test suite runner which is acceptable as a first step towards test automation or automatically using a test controller .", "Do not forget that since Ranorex is using the .NET framework you have access to all the functions provided by the framework in user code .", "Is it your Ranorex test program that gets an Exception or is it your program", "We create a test method consisting of simply a call to Ranorex run configuration .", "You would not be using Ranorex to display modal windows that was not produced by the AUT in the first place during an automation run .", "This is the reason we chose to develop our test automation using Ranorex no or basic programming skills required .", "I searched on the Ranorex homepage for this issue yet without finding anything .", "On the licence server start the Ranorex License Manager use the start menu .", "I am using 2013 Excel and am testing a web application where i need to analyze a excel file using code so i found a code which i have modified according to ranorex namings .", "I forgot to mention a Ranorex project can contain any type of file script and the Ranorex editor can be used to edit other file types .", "I am running automated-tests on an IOS Application using Ranorex Studio .", "I m using ranorex spy which is pretty horrid .", "I dont t understan what the problem is with Ranorex Spy", "Ranorex will then make a screenshot in the report and you ll see the exception .", "I hoped that Ranorex can identify if an exception is thrown .", "Easy : Ranorex can be used by non-programmers", "The idea is to have a test run with tests in TestRail and Ranorex posting to TestRail about the success of the test execution of these tests .", "In Ranorex we merely update a XPath .", "Was trying to close browser tab in Ranorex .", "Since Ranorex is based on the .NET framework it is really easy to output anything to any type of output .", "Apples and oranges really but in saying so both Ranorex and Sikuli can test Flash applications however the way both products go about it are quite different .", "I am using Ranorex to do automation tests against our application which consists of several 3rd party controls like the DevExpress GridControl .", "In our iOS xamarin project with the new MvvmCross version 4.0 the MvxColor plugin is crashing all the time when we execute our test with Ranorex our UI Automation Tool .", "Do you mean the Ranorex application closes or the whole browser", "Ranorex : .. . .. . Logs an info-level message using the default category .", "Tell me more.. . http : www.ranorex.com Documentation Ranorex html M Ranorex Report Info.htm", "This posts the result for one case to Ranorex therefore the add result for case method .", "Some more methods can be found in the Ranorex API documentation http : www.ranorex.com Documentation Ranorex .. . .. . Example : Validate.Attribute repo.Explorer.StartInfo Text yourtext .. . .. . I hope that helps .", "Auto generated emails are triggered every day morning after my automation runs through Ranorex .", "However we test certain elements via Ranorex and we d like to test this one and Ranorex doesn t as far as we know have access to the Angular scope only the DOM via AccessibleValue .", "I have a Ranorex project with two params which I have defined in Global Parameters and bound to modules in the test case .", "Ranorex provide Suite and Group module where you can add multiple test casew grouped them .", "I have used Ranorex where we have approximate 1000+ test cases scenario based .", "Watching video tutorials on modulating test steps gives me the impression that Ranorex isn t designed to really support a larger size web-app with detailed testing parameters .", "We are in a constant dilemma on how to enable the Ranorex tests to find UI elements effectively .", "Hi actually I m not doing an integration with Ranorex .", "Evaluating ranorex for the upcoming projects in our organization .", "whereas scripting in ranorex is found to be only C and vb .", "With Ranorex the usual question is not ask if something is possible .", "I am fairly new to WPF automation testing as I traditionally come from a web automation background .", "After I use my code when Ranorex is installed is works fine but after uninstalled it I have a library of Ranorex payed version but I don t install it on my PC just I need the library .", "Is there a difference when using the external Spy and the Spy which is integrated in Ranorex Studio", "You can also run Debugview in background while running Ranorex", "Then we chose Ranorex but there are other tools which are doing very good job .", "We need to update Ranorex licence server from version 5.1 to version 5.3 .", "Reading through the Ranorex documentation I m unsure how you can run these tests unattended .", "If I have a floating license for Ranorex 5.4 and I have several machines running .", "I am not even sure if this is possible but is there some way of making Ranorex do some sort of translations or some sort", "Please give the xPath that works through Ranorex Spy and the code part where you are trying to find the form .", "If it is inside your Ranorex test program simply catching Exception instead of RanorexException will do the trick .", "hi I am trying to create a repository in ranorex to compile a couple of test methods in visual-studio .", "Once We are done with the recording sessions in ranorex two files are generated one is for user to change code file and one is auto generated by ranorex .", "In our projects we use Ranorex to edit deployment scripts batch files and include them directly inside our Ranorex project for convenience .", "What I would suggest is use the Ranorex spy on a grid item add it to a repository and look at the type of adapter Ranorex is using to represent it in the generated code .", "I have used TestRails API binding for .NET http : docs.gurock.com testrail-api2 bindings-dotnet for writing a simple C file in Ranorex .", "1st : If Ranorex has some function that takes high resolution of the screen image .", "The Ranorex Spy tool gets the IAccessible interface and calls methods on the interface .", "I think your question was already answered in the Ranorex forum .", "A Ranorex engineer posted a code snippet which adds failure messages into the report .", "I am trying to validate the number of columns generated in a table through ranorex .", "Breakage with time .. . .. . Sikuli is more likely to break when the UI layout changes Ranorex not so much .", "Anyone had also worked with TestRail maybe by a click of a button trigger automated test run in Ranorex and return the result s back to testrail .", "Application title http : i.stack.imgur.com hwstR.png .. . .. . So I was wondering is the any way of making Ranorex wait until this text changes to done", "Just open the Global Settings dialog in Ranorex Studio navigate to the Plugins tab and scroll to the WPF section .", "I have successfully tested this on IE 11 with Ranorex 5.4.6 .", "Please help.. . .. . .. . Well there s your first problem you re trying to use Ranorex", "I am Using the following code to read a excel file by using ranorex tool .", "i want to know whether messageBox.Show and Report.Info has the same functionality as i have to replace the c attributes with ranorex ." ] }
{ "confidence": [ 80.43495178222656, 72.71188354492188, 72.57664489746094, 70.68202209472656, 67.34418487548828, 67.27472686767578, 67.04505157470703, 65.42304992675781, 65.1370849609375, 63.76818084716797, 63.32258605957031, 61.860599517822266, 61.17213439941406, 60.89002990722656, 60.41734313964844, 59.981353759765625, 58.63167190551758, 58.62630081176758, 58.50564193725586, 58.38343811035156 ], "content": [ "Question : I am testing a Web application and stated using Ranorex . It is easy to use . Then there is a suggestion of Coded U I . Can someone tell me the pros and cons of Ranorex and with coded UI .. . Answer : Easy : Ranorex can be used by non-programmers or by people with little programming knowledge .. . .. . Programmers are usually very though to hire for tests . As for Coded UI I assume in Visual Studio it is more tedious and requires programming skills . I have personally done this comparison and came to the conclusion that a tool must be used for automation even if I am a programmer . Then we chose Ranorex but there are other tools which are doing very good job . We chose Ranorex because it supports all the technologies we use Web Android iOS and WinForms and it support standard .NET programming which is a language that we use internally . In the end it all depends on your test automation budget", "Question : Reading through the Ranorex documentation I m unsure how you can run these tests unattended . When running from a CI process do you need a separate machine that operates the UI .. . Answer : When running unattended coded UI tests a dedicated computer VM is required and must be configured to run UI tests no screen lock . It can be either started manually at the end of the day using Ranorex test suite runner which is acceptable as a first step towards test automation or automatically using a test controller . Usually the test controler is integrated to the build-server and executes tests automatically on newly available builds . The following is an article describing the integration with Jenkins : http : www.ranorex.com blog integrating-ranorex-automation-in-jenkins-continuous-integration-process .. . .. . If you are more familiar with Microsoft Team Foundation Server the following is a good article on how to integrate Ranorex to Microsoft Test Manager and Team Build : http : www.ranorex.com blog running-ranorex-automated-tests-using-microsoft-test-manager .. . .. . Finally there is another good article describing the integration of Ranorex with Jenkins TestLink : http : www.ranorex.com blog integrating-ranorex-with-testlink-and-jenkins-2", "Question : Could you point me some pros and cons of using ranorex vs sikuli for flash based website automation Also it will be very helpful if any other tools widely used for testing flash based websites . -Sudarson .. . Answer : Could you point me some pros and cons of using ranorex vs sikuli for flash based website automation Apples and oranges really but in saying so both Ranorex and Sikuli can test Flash applications however the way both products go about it are quite different . Mechanism .. . .. . As Sikuli states : .. . .. . It uses image-recognition to identify and control GUI components . It is useful when there is no easy access to a GUI s internal or source code . More.. . http : www.sikuli.org .. . .. . Ranorex on the other hand can discover individual screen elements represent them by XPaths and code-generate type-safe c UI repository code . Abstraction .. . .. . Ranorex test cases are more decoupled from the underlying screen technology and layout . TC s refer to code-generated repository items rather than explicit screen references . Breakage with time .. . .. . Sikuli is more likely to break when the UI layout changes Ranorex not so much . Image Recognition .. . .. . Both products support IR . Sikuli only supports IR . Maintenance .. . .. . As the AUT s screens evolve so too the impact on tests involving around image-recognition . If a screen changes with Sikuli you ll need to recapture the reference images . In Ranorex we merely update a XPath . Conclusion .. . .. . Image recognition have their place in fact we use it for aspects of our DICOM imaging based products however I m not sure it is wise to invest in a purely-image based test solution for those TCs where image-based comparison is not absolutely necessary .", "Question : null .. . Answer : hi I am trying to create a repository in ranorex to compile a couple of test methods in visual-studio . First I connect to uri client machine and try to get metadata of the schema Items ID .. . .. . Using package such as newtonsoft and restsharp . The connection setup is done as Comment : I am not sure I understand the question . Ranorex is used to create recordings of UI tests . Under the cover it is entirely .NET either VB.NET or C . Calling a method is simply a matter of adding a reference between the 2 projects and calling the method no Here we do the exact opposite . We create a test method consisting of simply a call to Ranorex run configuration . This article on Ranorex web site shows how to Ranorex integration in TFS MTM Visual Studio : ranorex.com news article http : www.ranorex.com news article howto-test-automation-with-tfs-and-ranorex.html Comment : thanks . I was just playing around with ranorex . this explains a lot Comment : Ranorex is really good to build coded UI tests by non programmers.. .", "Question : In our WPF Test Automation project Coded UI Test Builder is not identifying DevExpress Grid Control with UIMap . But CUIT is just able to identify the cells or ItemTemplate within the GridControl but not the whole DevExpress GridControl . Can someone help on how to get identify the DevExpress GridControl with Coded UI CUIT or Ranorex .. . Answer : You can try to enable the setting Show all Elements in the Plugins settings in Ranorex Studio . A lot more elements will be shown if this setting is set to True . Just open the Global Settings dialog in Ranorex Studio navigate to the Plugins tab and scroll to the WPF section . Comment : By default Show all Elements setting is in true in Ranorex studio . Still no help with my above issue . Comment : Can someone please answer", "Question : I am testing my web application php using ranorex automation tool . Whenever I record my test case it is recording perfectly but when I play my test case it stops sometimes get hanged at the middle and fail my test case . What is the reason that is creating this issue Also can anybody suggest good video tutorials for beginners for Data driven testing with global parameters .. . Answer : The good way to automate is to write code without using recorder . There are some reasons of it : .. . .. . 1 . recording unnecessary steps .. . 2 . saving elements to repository by wrong attribute . As usual there are automation id and regex of text or caption of element . For dynamically changeable elements this doesn t fit . 3 . different types of elements requires different types of methods to wait and validate them . In this way I recommend you to watch the screencast of Ranorex Team http : www.ranorex.com support screencasts.html . There are 5 videos about everything you should know about UI Mapping . According to you exceptions and errors in comments : .. . .. . 1 . ...ATagPrintReport3 does not match the specified value actual False expected True It means that Ranorex recorded element ATagPrintReport3 with value of some bool attribute . Of cource the value of element will-change so the right way is to identify element with the attribute that will never change uniqueId name class and other . 2 . Failed to find item updtaed cpt imsRepository.OpeningInventoryStockValueJpg.ButtonOK . No element found for path form @title Opening Inventory Stock V button @accessiblename OK within 1m . This error can be the result-of very fast dynamically changeable element the wrong path of element it could be presented in dom but could not be visible . The best way to know what s wrong is to use breakpoints and step-to-step debuging . In my opinion the path for ButtonOK will be better if it looks like : form @title Opening Inventory Stock button @name OK .. . .. . 3 . No element found for path form @title Reading Untagged Document button @text Cancel within 1m . It is the same to p.2 .. . In this example the path will be better : .. . .. . form @title Reading Untagged Document button @name Cancel", "Question : I am testing my web application php using ranorex automation tool . Whenever I record my test case it is recording perfectly but when I play my test case it stops sometimes get hanged at the middle and fail my test case . What is the reason that is creating this issue Also can anybody suggest good video tutorials for beginners for Data driven testing with global parameters .. . Answer : I am sure there is a error message in the report . What does this message say I suggest checking if the elements can be recognized uniquely by Ranorex and if the webpage is fully loaded . You can use the following code snippet in order to wait until the webpage is fully loaded . Concerning your second question a video how to work with data connector can be found on the Ranorex website directly : Data-Driven Test Automation with Ranorex http : www.ranorex.com support screencasts.html c3896 Comment : updtaed cpt imsRepository.CPTInventroySystem.ATagPrintReport3 does not match the specified value actual False expected True . This is the error which is shown on the report result Comment : another error is updtaed cpt imsRepository.OpeningInventoryStockValueJpg.ButtonOK does not match the specified value Failed to find item updtaed cpt imsRepository.OpeningInventoryStockValueJpg.ButtonOK . No element found for path form @title Opening Inventory Stock V button @accessiblename OK within 1m . . Comment : third error No element found for path form @title Reading Untagged Document button @text Cancel within 1m . Comment : It seems that simply the path to the element is not correct . Open the external Ranorex Spy tool track the element and compare it with the RxPath within the repository . Comment : @user1982826 : How can i wait for WPF Form to get loaded in similar to webdocument load in the above code", "Question : I am new to automation testing tool Ranorex . Evaluating ranorex for the upcoming projects in our organization . Once We are done with the recording sessions in ranorex two files are generated one is for user to change code file and one is auto generated by ranorex . In that .cs file on clicking right-click we get file mode where inside that we have multiple options like BAT C++.net java xml HTML coco php etc . What is the use of that language selection in file mode . whereas scripting in ranorex is found to be only C and vb . .. . Answer : Ranorex File Mode is just to be able to change the editor color-scheme text color is based on keywords and code syntax . Usually file content-type is determined by the file extension . This option is more useful when file content can t be determined using the file extension . For example this option can be used to tell Ranorex editor that a .dat file containing xml content in a particular project . Comment : I forgot to mention a Ranorex project can contain any type of file script and the Ranorex editor can be used to edit other file types . In our projects we use Ranorex to edit deployment scripts batch files and include them directly inside our Ranorex project for convenience .", "Question : For my automated-tests everything works fine except only when it is in English and this script needs to be able to run for Spanish versions of the same application too . I am not even sure if this is possible but is there some way of making Ranorex do some sort of translations or some sort Currently validation doesn t work because obviously the text is in a different language how can I get around this If it is even possible . .. . Answer : Usually when testing an application which can be represented in different languages I would suggest using language independent properties in the RanorexPath for example an automation id if available . There are similar questions discussed in the Ranorex forum . http : www.ranorex.com forum nls-testing-local-language-testing-t8438.html .. . http : www.ranorex.com forum localized-t3725.html p15532 .. . .. . I hope that helps .", "Question : enter image description here http : i.stack.imgur.com gL1Bq.png .. . .. . Figure above showed a TestSuite Plan in Ranorex . SETUP represents launching .exe recording while TEARDOWN represents exiting .exe . 1 . How can I imitate the test case plan structure using only Visual Studio coded ui . Since it will be repetitive to launch and close my .exe in every test case . If possible I would like to set it only once . 2 . Does a TestMethod in coded ui represents a test case Comment : What does the diagram in your question mean Please explain how it should be interpreted . A method with the TestMethod attribute is a test case . .. . Answer : We have faced the same problem and resolved it by first making an assumption . A Microsoft TestMethod is not corresponding to a Ranorex Test Case it is a Ranorex Run Configuration as defined in the test suite . A Run Configuration comes with configuration . As you may already know on the command-line it is possible to execute a Ranorex Test Case or a Ranorex Run Configuration but it is better easier to execute a Run Configuration since it comes with context and also most development can be done by non-programmer from within Ranorex . In the end what we did is use TestMethod to call Run Configuration s . The following Ranorex How To article describes how to do this : http : www.ranorex.com news article howto-test-automation-with-tfs-and-ranorex.html .. . .. . If this method does not suit your setup you can probably invoke Ranorex Test Cases directly in test method and do whatever sequence you wish to replicate as shown in your test suite but that would be more complicated and involve more maintenance IMHO which must be done by programmers . Hope this helps Hugo Comment : Hi actually I m not doing an integration with Ranorex . I m just evaluating VS coded ui . I want to know if whatever features available in Ranorex can be done in VS and how if possible . Comment : Like I always answer to testers in our test automation team : Anything can be done It s just time and money that limit us . In other words using code you can quite easily reproduce what is represented in the test suite screenshot you provided but that would require programming skills.. . This is the reason we chose to develop our test automation using Ranorex no or basic programming skills required .", "Question : I m trying to do some automation but I m having trouble identifying some elements . Is there any way of getting the WPF base path in an application through an element finder like snoop I m using ranorex spy which is pretty horrid . .. . Answer : I dont t understan what the problem is with Ranorex Spy The base path of the application looks usually similar to the following path and can be found on the very beginning of the RanoreXPath in Spy after tracking an element within the application .", "Question : I have a relatively big web app is written in AngularJS . Our automation is using Ranorex to run BDD tests . We are in a constant dilemma on how to enable the Ranorex tests to find UI elements effectively . Currently we re mainly using a custom attribute for it testid e.g . div testid done btn but in some cases it performs very poorly not sure whether it s because the querying XPaths aren t optimized or some other Ranorex configuration . Using the id attribute is way faster but it just doesn t feel right to use it for automation . Besides keeping it unique might require some coding in some cases e.g . when using ng-repeat . Is using id just for automation purposes OK or is it a bad practice Why Any way to make Ranorex relate to custom-attributes such as testid differently so that it ll be found faster I ve read about Ranorex Weight Rule http : www.ranorex.com support user-guide-20 ranorexpath-weight-rule-library.html but couldn t find a way to define custom-attributes . .. . Answer : The quick answer : YES Use the Id s . I m not actually familiar with the dilemma you are facing . Can you please further explain the reasoning behind not wanting to use the id-s . .. . .. . And if you face issues related to id s not being unique in some cases you can combine different elements to the path eg . @id save btn and @innerText Save . Usually if you can improve the speed and stability of your automation with no visual or functional expense - do it . Comment : generally we thought that using id which is an attribute with meaning and is part of the HTML specification just for automation might not be the best idea so we preferred using a custom attribute . But as written this showed bad performance . Thanks :", "Question : I ve been experimenting with Selenium to some success however it s slow going . Ranorex as I ve used briefly in the past can put a simple suite of tests together rather quickly . However I m concerned about scale-ability . The website I m interested in automating testing for is fairly large in terms of how much test-coverage it requires . Watching video tutorials on modulating test steps gives me the impression that Ranorex isn t designed to really support a larger size web-app with detailed testing parameters . How big are the projects you use Ranorex for and how do you manage your tests and suites How do you keep it organized .. . Answer : Ranorex provide Suite and Group module where you can add multiple test casew grouped them . Also it provide configuration at suite level where you can grouped set of test cases from suite . So when you run that particular configuration from suite then selected test cases will execute . I have used Ranorex where we have approximate 1000+ test cases scenario based . Let me know if you need more information . Thanks Sadik", "Question : null .. . Answer : Ranorex Experts .. . .. . I m new to ranorex and trying to use ranorex C API for a windows desktop application . How to find an element only by automation id text in C Looking for something like .. . .. . or .. . .. . But in the API docs all I can see is XPath RanoreXPath based object identification .", "Question : Visible in the context of UI-testautomation can mean two different things : .. . .. . 1 . Visible anywhere on the website . You can see it immediately or after you scroll .. . .. . 2 . Visible in the viewport which means that you can see the element without scrolling . In the Ranorex documentation http : www.ranorex.com Documentation Ranorex html P Ranorex Adapter Visible.htm the definition isn t clear regarding this . So what is in Ranorex the exact definition for visible .. . Answer : The visible attribute itself just means that it is possible in general to bring the element to the visible region . If the visible attribute of a parent element is set to false it might also not be possible to make the element itself visible . Comment : Ranorex official support told me that this answer is correct", "Question : I am using Ranorex to do automation tests against our application which consists of several 3rd party controls like the DevExpress GridControl . In most cases the grid rows are accessible . However it can happen that the grid rows are not accessible for about 1 minute only if you play with Ranorex Spy for a some time . Do you know where the problem could be .. . Answer : That sounds strange . Does that mean that the grid can be recognized after one minute and that only happens with Ranorex Spy . What if you run the test You wrote that it happen sometimes did you already find out when Is there a difference when using the external Spy and the Spy which is integrated in Ranorex Studio", "Question : I am Using the following code to read a excel file by using ranorex tool . i want to know whether messageBox.Show and Report.Info has the same functionality as i have to replace the c attributes with ranorex . .. . Answer : i want to know whether messageBox.Show and Report.Info has the same functionality .. . .. . No they don t . One is for displaying a model message box on screen the other is for placing information into a Ranorex report file for viewing later . Ranorex : .. . .. . Logs an info-level message using the default category . It s not necessary to convert them if you don t want . You can use Ranorex s PopupWatcher http : www.ranorex.com Documentation Ranorex html T Ranorex PopupWatcher.htm to be on the lookout for such dialogs and automatically click them . Tell me more.. . http : www.ranorex.com Documentation Ranorex html M Ranorex Report Info.htm Comment : I don t think you can use Ranorex to close a popup that is generated by the Ranorex runner itself As mentioned messagebox.show is modal thus Ranorex runner will be blocked on the message box show function until the OK button is clicked . I am not sure the popup watcher would work in this condition . Anyway I ve had bad experience with popup watcher and would not use them . They did not seem to work consistently and I avoid them for now.. . Comment : @Sup3rHugh Incorrect . OP is using Winforms namespace Comment : Sorry OP what Comment : @Sup3rHugh MessageBox is WinForms . You would not be using Ranorex to display modal windows that was not produced by the AUT in the first place during an automation run . Comment : Sorry I thought that the code example was from the automated test not the AUT .", "Question : null .. . Answer : In Visual Studio 2013 I m writing Test Automated methods with C code for a WPF application using Ranorex tool references : I could not able to identify the DevExpress GridControl located in WPF application and unable to retrieve its properties Grid data Rows and columns . Can someone please help . Error : Comment : I have tried to understand what is a RanorexDataGrid and could not find any info on this type in the documentation . What I would suggest is use the Ranorex spy on a grid item add it to a repository and look at the type of adapter Ranorex is using to represent it in the generated code .", "Question : I am using 2013 Excel and am testing a web application where i need to analyze a excel file using code so i found a code which i have modified according to ranorex namings . but am new to ranorex so getting few errors . this is the error am facing even after adding the reference . No overload for method Open takes 15 arguments CS1501 .. . .. . Please help me out .. . Answer : I think you have too many arguments in your xlApp.Workbooks.Open function . Remove the last 2 parameters after the last true and it should compile successfully : .. . .. . xlWorkBook xlApp.Workbooks.Open 1010-AgentPerformancebyPeriod-2015081214195339.xls 0 true 5 true Microsoft.Office.Interop.Excel.XlPlatform.xlWindows t false false 0 true", "Question : Anyone had also worked with TestRail maybe by a click of a button trigger automated test run in Ranorex and return the result s back to testrail . Would it be possible to share to us the steps you made and maybe a sample code . Can you highlight how you run multiple test case in Ranorex . Thanks .. . Answer : I have used TestRails API binding for .NET http : docs.gurock.com testrail-api2 bindings-dotnet for writing a simple C file in Ranorex . The idea is to have a test run with tests in TestRail and Ranorex posting to TestRail about the success of the test execution of these tests . This posts the result for one case to Ranorex therefore the add result for case method . The runID is a parameter I give in command-line when I execute the suite and each test case in Ranorex corresponds to one test case in TestRail and must hold the test case id . Take a look at http : docs.gurock.com testrail-api2 start about what possibilities the TestRail api offers" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
oci@oracle@82
oci -- oci is the oracle call interface used for direct programming access to an @placeholder database .
{ "confidence": [ 55.8396110534668, 54.51131820678711, 53.2976188659668, 47.35930633544922, 47.27940368652344, 47.0694465637207, 46.050533294677734, 45.727027893066406, 43.563838958740234, 43.33746337890625, 43.33746337890625, 43.239784240722656, 42.58629608154297, 42.3778076171875, 42.31855010986328, 42.31855010986328, 42.31855010986328, 41.828208923339844, 40.29233169555664, 40.166664123535156, 40.126441955566406, 39.70338821411133, 39.27341842651367, 39.25400924682617, 39.14565658569336, 39.05471420288086, 39.05471420288086, 38.53520965576172, 38.518978118896484, 38.518978118896484, 38.518978118896484, 38.2330207824707, 38.2330207824707, 37.92655944824219, 37.92655944824219, 37.53866958618164, 37.53790283203125, 37.50006866455078, 36.769676208496094, 36.619712829589844, 36.57652282714844, 36.570621490478516, 36.549072265625, 36.51898956298828, 36.51898956298828, 36.51898956298828, 36.51740646362305, 36.494041442871094, 36.306129455566406, 36.306129455566406, 36.306129455566406, 36.306129455566406, 36.306129455566406, 36.306129455566406, 36.278873443603516, 36.278873443603516, 36.278873443603516, 35.917259216308594, 35.327880859375, 35.28721618652344, 35.28721618652344, 35.28721618652344, 35.040645599365234, 35.040645599365234, 35.040645599365234, 35.040645599365234, 34.48838424682617, 34.25788116455078, 34.06602478027344, 34.06602478027344, 34.021732330322266, 33.308692932128906, 33.308692932128906, 33.308692932128906, 33.308692932128906, 33.308692932128906, 33.308692932128906, 33.308692932128906, 33.308692932128906, 33.10309600830078, 33.07964324951172, 32.972198486328125, 32.972198486328125, 32.800540924072266, 32.800540924072266, 32.800540924072266, 32.800540924072266, 32.2897834777832, 32.2897834777832, 32.2897834777832, 32.2897834777832, 32.18233871459961, 31.853225708007812, 31.82650375366211, 31.12114715576172, 31.08475112915039, 31.08475112915039, 31.06859016418457, 31.06859016418457 ], "content": [ "OCI Oracle Call Interface Connection Pooling .. . .. . a .", "I m calling OCI apis to connect the oracle database .", "Both contain the OCI Oracle Call Interface term because both make use internally of the OCI API provided by Oracle .", "I am working on an application that uses Oracle OCI to connect to the Oracle database server .", "Because .. . .. . The Oracle Call Interface OCI is an application programming interface API that allows applications written in C to interact with one or more Oracle Servers .", "Oracle OCI Connection Pooling .. . 3 .", "Noob here with regards to Oracle and OCI .", "The application is written in C++ and communicates with Oracle via OCI .", "I m trying to compile SOCI http : soci.sourceforge.net which use OCI Oracle Call Interface under windows .", "I m writing a OCI C++ that will read data from an Oracle XE database .", "Is there a possibility to connect to Oracle via OCI from one process then connect on the same database session from another process", "Our native C++ app accesses an Oracle Database through OCI https : docs.oracle.com database 121 LNOCI toc.htm .", "OCI is basically a set of APIs which the C C++ programmers can use to write C C++ applications to access Oracle Database .", "I wanted to know the pros and cons of using Oracle UCP Universal Connection Pooling as compared to Oracle OCI Connection Pooling provided by the OCI driver .", "I am trying to establish a jdbc-oci connection to an oracle database on a coldfusion v 10 std server .", "But We can t parse XML and convert it to OCI-Lob Object as it always interact with the Oracle Database Server .", "Im using the OCI libraries from oracle 9i personal edtn for connecting to the database from my c program .", "Side note : is OCI the best way to interact with Oracle with PHP", "Or can I use something other than oci to connect Oracle", "Nobody denies OCI advantages .", "OCI 7", "OCI Connect http : stackoverflow.com questions 14646007 oci-connect-connection-failed .. . .. . Based upon the above it states that one should avoid OCI connection on Windows .", "I am trying to create Oracle OCI plugin for QT creator .", "Normally when using OCI or Oracle database products in general the ORACLE HOME environment variable should be defined and pointing to your oracle installation .", "I am trying bulk inserts into a table using OCI Array Interface .", "When I execute a fetch from an Oracle database using PHP OCI numbers that are less than 1 are shown as .XXXXXX e.g .", "C C++ programmers just need OCI library to write an application which connects to Remote Oracle database does table operations", "In my application I have used Oracle OCI bulk executions using the following function .", "at the command level .. . .. . How to achieve that with OCI", "I read blogs and articles on OCI .", "Briefly : .. . .. . OCI is C API libary .", "I would like to call an Oracle stored procedure from C++ using the OCI interface and iterate over the results using an out SYS REF CURSOR as a parameter to the procedure .", "This link is useful to learn more about Oracle Call Interface OCI http : docs.oracle.com cd B28359 01 appdev.111 b28395 toc.htm .. . .. . Thanks .", "Where : 1 is an OCI array", "set timeout doesn t work with OCI .", "My Application needs OCI to be used from scratch only", "And check the output of where oci at the command-line to confirm the system path contains the correct reference to your oci client files .", "I figure out oci is appropriate .", "Output below .. . .. . Now when I call with PHP-OCI it outputs nothing .", "Check your PATH settings for the Oracle client libraries use where oci .", "Oracle can watch tables for changes and when a change occurs can execute a callback function in PL SQL or OCI .", "I m trying to change the OS User that is passed to Oracle during database-connection set up in golang oracle oci-8 driver https : github.com mattn go-oci8 .", "The reason for employing jdbc oci is the necessity to encrypt data flowing between the app server and the database by using common settings in sqlnet.ora .", "Unfortunately the oci error message doesn t specify which of my handles are invalid.. . oci can be irritating like that .", "OCI http : stackoverflow.com questions 29589826 how-to-use-xml-to-create-oci-lob-object", "Here I wonder if I can do this with a single simple OCI connection in C by using OCI Contexts maybe", "OCI gives your programs the capability to perform the full range of database operations that are possible with Oracle9i database including SQL statement processing and object manipulation .", "They are required for the OCI extension to work .", "Most of the OCI functions return false on error .", "why do you use OCI from scratch", "It appears that it is not possible to set the OS User with the OCI driver .", "Does phpinfo make any mention of OCI", "Perhaps I need to fetch different OCI libs", "It s unlikely OCI has anything to do with this .", "It s doable in OCI although it is not easy .", "I am not sure about OCI .", "The OCI set timeout configuration will also cause this .", "The reason for this behavior is because oracle oci omits 0s in results and php converts all results from oci to strings without performing any casting depending on column datatype .", "Example compiled with Visual Studio 10 Express and this version of OCI libraries http : www.oracle.com technetwork database occidownloads-083553.html .", "Please find sample OCI client below .", "The issue is in OCI Api s and it is been fixed in oracle11g R2", "The issue is in OCI Api s and it is been fixed in oracle11g R2", "If you use an OCI url jdbc : oracle : oci : @ +tnsName then you need oracle client libraries on the classpath .", "Details : Visual studio 2012 Oracle version 11.2.0 64 bit .. . .. . I found ORCALE HOME OCI LIB MSVC libraries .", "2 . a Oracle instant client SDK is a DLL Shared library which USES OCI .", "The C C++ code written by C C++ programmers links to the Oracle instant client libraries hence uses OCI as well .", "Following on from Call an Oracle stored procedure via OCI and return the results with an out ref cursor in C++ http : stackoverflow.com questions 25770846 call-an-oracle-stored-procedure-via-oci-and-return-the-results-with-an-out-ref-c I want to extract a NUMBER column and store the result in either a double or long truncated .", "It includes the OCI C-libraries JDBC and ODBC which makes is possible for programs written in C Perl Python Java Scala and so on to connect to an Oracle database server .", "The app itself is compiled against OCI 12 .", "These collection level operations are not well documented in OCI reference .", "As others have said I would use OCI rather than PDO for Oracle .", "Please advice how we can bind 64bit integers into OCI .", "How can I enable oci extension on the ARM linux", "getting the actual LOB content without additional rountrips using OCI .", "Any ideas if it is possible and how to change the osuser value using OCI", "Can we have both UCP and OCI in one implementation", "PHP OCI is no problem on Windows I have it running on several production servers .", "I do a connection via the OCI driver inside a file called whatever.Test.php .", "BUT when I try PDO OCI I get this error message : .. . .. . Error", "I am currently inserting records one-by-one into a table from C++ code using OCI .", "I am researching on various Oracle JDBC connection-pooling mechanisms and as I understand Oracle offers 4 connection-pooling mechanisms when OCI driver is used .. . .. . 1 .", "Please check the link : - stackoverflow.com questions 22478387 http : stackoverflow.com questions 22478387 call-to-undefined-function-oci-connect .", "Or stackoverflow.com questions 8635881 http : stackoverflow.com questions 8635881 fatal-error-call-to-undefined-function-oci-connect .", "The application is hosted on a Virtual Server and through OCI and Instant Client connects to a distant Oracle schema on the same network .", "You have install the whole Oracle server including Demos and read OCI demo sources .", "The client is a C C++-application which uses OCI to connect to an Oracle server using the OTL http : otl.sourceforge.net library .", "In summary I am calling an oracle stored procedure via OCI using a sys ref cursor to itterate over the results .", "Should install 32-bit OCI library to work on 32-bit application .", "I m new to OCI so might be missing something simple .", "However I wrote one small program for OCI login and some actions .", "We can not directly convert a XML to OCI-Lob Object directly .", "Refer to Fault Diagnosability in OCI http : docs.oracle.com cd E18283 01 appdev.112 e10646 oci10new.htm CHDCIAHJ in Oracle Call Interface Programmer s Guide http : docs.oracle.com cd E18283 01 appdev.112 e10646 toc.htm for information .", "One important question : our codebase is C++ but our existing usage of OCI is using the vanilla C interface from ocidfn.h .", "My PHPInfo OCI8 http : i.stack.imgur.com GA7ko.png .. . .. . Hope this will help the rest of guys who are embarking the same path of setting up OCI to connect to Oracle on MAMP .", "I m new to Oracle Database .", "Have you confirmed the oci .dll files are available in the path and that the IIS user can access them", "Yes C : instantclient where the oci .dll files are is in PATH and Everyone has full access as a test .", "I have an application which uses the OCI 7 API .", "Is there any particular reason you can t use a later OCI release" ] }
{ "confidence": [ 67.25865936279297, 61.27492141723633, 60.1323127746582, 58.54530715942383, 55.91687774658203, 55.75584030151367, 55.48760986328125, 54.27622604370117, 53.48988342285156, 53.36882781982422, 53.03318405151367, 52.895782470703125, 52.25169372558594, 51.834590911865234, 51.43868637084961, 51.296165466308594, 51.04913330078125, 51.00874710083008, 50.353885650634766, 50.10639190673828 ], "content": [ "Question : I have a Oracle Query which returns the below output : - .. . .. . In this the step information is coming from a getClobVal function which present inside the Oracle Query . I have extracted the XML contents by running the below code for the step information - .. . .. . I have got below XML - .. . .. . I am working on a PHP Unit test in which I need to pass the input as same as the Oracle output but without using the Oracle query or connecting to any database . I have tried using JSON as well as creating object in PHP to mock the input but I couldn t represent the OCI-Lob object . I want to know how can I use the above XML to create the OCI-Lob object as below So that I can mock that in input and pass it in unit test . I have looked for almost all the threads related to OCI-Lob in PHP but didn t get the information which I am looking for . Hope you understand my question . Any suggestions on this would be appreciated . Thank you . .. . Answer : After doing plenty of investigation on this finally I have come to a point of understanding this . We can not directly convert a XML to OCI-Lob Object directly . Because .. . .. . The Oracle Call Interface OCI is an application programming interface API that allows applications written in C to interact with one or more Oracle Servers . OCI gives your programs the capability to perform the full range of database operations that are possible with Oracle9i database including SQL statement processing and object manipulation . Let it be like If we have any XMLAGG function with getClobVal in side the query which we are storing as Val which returns OCI-Lob Object as below .. . .. . the below function will give us the XML Contents of OCI-Lob Object CLOB DataType Which I have mentioned in the Questions . Now If I remove load from printVar row Val - load and do printVar row Val it will again return me the OCI-Lob Object . To get OCI-Lob Object We do need Oracle Select Query in addition we can pass XMLAttributes Elements with getClobVal or any function . But We can t parse XML and convert it to OCI-Lob Object as it always interact with the Oracle Database Server . .. . .. . So to run the PHP Unit test what I did was I took the XML and Converted that to an OCIMockObject Which Will have all the XML Values and parse it to the function . It Worked This link is useful to learn more about Oracle Call Interface OCI http : docs.oracle.com cd B28359 01 appdev.111 b28395 toc.htm .. . .. . Thanks .", "Question : I am researching on various Oracle JDBC connection-pooling mechanisms and as I understand Oracle offers 4 connection-pooling mechanisms when OCI driver is used .. . .. . 1 . Oracle DataSource .. . 2 . Oracle OCI Connection Pooling .. . 3 . Oracle UCP Universal connection-pooling -recommended over OracleDataSource .. . 4 . Oracle Database Resident Connection pooling .. . .. . Please correct me if I am wrong . I wanted to know the pros and cons of using Oracle UCP Universal Connection Pooling as compared to Oracle OCI Connection Pooling provided by the OCI driver . Please share your thoughts experience on this topic . .. . Answer : I will try adding some details based on the reading I have done so far . Below are some distinct features supported by the different connection-pooling mechanisms .. . .. . 1 . Oracle UCP Universal Connection Pooling .. . .. . a . Supports features like Fast Connection Failover FCF Runtime connection load-balancing and connection affinity . b . JMX Support .. . .. . c . Support for labelling connections .. . .. . d . Support for connection harvesting .. . .. . 2 . OCI Oracle Call Interface Connection Pooling .. . .. . a . Support for session multiplexing . 3 . OracleDataSource .. . .. . a . Implicit connection cache . Comment : Can we have both UCP and OCI in one implementation Comment : @Suvasis - Not sure but what would you gain Comment : I read blogs and articles on OCI . I am not sure if both are compatible to give better solution or any one is always better than other . How both are different or simillar Comment : I detail above on the features of each connection pools . Anyways I realized neither of them were good in terms of performance mainly when compared with other open-source connection pools like tomcat-jdbc and bonecp . Comment : Even I feel we dont have much documentations or examples on configuring OCI or UCP available on net . I am still looking for . Anyways thanks for the info .", "Question : Sorry for being the question very naive but the same is true for my experience with the subject . From the googling what i understood i just want to confirm that the understanding is correct . Everyone is welcome to pin point where i am wrong . 1 . OCI is basically a set of APIs which the C C++ programmers can use to write C C++ applications to access Oracle Database . 2 . a Oracle instant client SDK is a DLL Shared library which USES OCI . The C C++ code written by C C++ programmers links to the Oracle instant client libraries hence uses OCI as well . b The benefit of instant client is that it eases the programmers pain to write some complex code . c Even if C C++ programmer doesn t use Instant Client libraries they can still use OCI get the work done Is this correct d Is this true C C++ programmers just need OCI library to write an application which connects to Remote Oracle database does table operations Do we need any ODBC .. . drivers also If yes why Won t oci.lib be enough 3 . What is the difference between FULL Oracle Client Instant Oracle Client Is it true that Instant Oracle client is just a subset of FULL Oracle client 4 . I am not able to obtain the interoperatibility matrix of Instant Client will various Oracle databases . Searched alot on Oracle website . The only thing i could find is link-to Oracle support site which i can t access . Please clarify my doubts . Many thanks in advance . .. . Answer : Oracle instant client is a small subset of the full thick client . It includes the OCI C-libraries JDBC and ODBC which makes is possible for programs written in C Perl Python Java Scala and so on to connect to an Oracle database server . Instant client dont include familiar Oracle tools like sqlplus sqlldr exp imp and more . However sqlplus can be installed separately to work with instant client without needing a full client .", "Question : Sorry for being the question very naive but the same is true for my experience with the subject . From the googling what i understood i just want to confirm that the understanding is correct . Everyone is welcome to pin point where i am wrong . 1 . OCI is basically a set of APIs which the C C++ programmers can use to write C C++ applications to access Oracle Database . 2 . a Oracle instant client SDK is a DLL Shared library which USES OCI . The C C++ code written by C C++ programmers links to the Oracle instant client libraries hence uses OCI as well . b The benefit of instant client is that it eases the programmers pain to write some complex code . c Even if C C++ programmer doesn t use Instant Client libraries they can still use OCI get the work done Is this correct d Is this true C C++ programmers just need OCI library to write an application which connects to Remote Oracle database does table operations Do we need any ODBC .. . drivers also If yes why Won t oci.lib be enough 3 . What is the difference between FULL Oracle Client Instant Oracle Client Is it true that Instant Oracle client is just a subset of FULL Oracle client 4 . I am not able to obtain the interoperatibility matrix of Instant Client will various Oracle databases . Searched alot on Oracle website . The only thing i could find is link-to Oracle support site which i can t access . Please clarify my doubts . Many thanks in advance . .. . Answer : Briefly : .. . .. . OCI is C API libary . There is also C++ library called OCCI but I do not recommend it you can have problems with C++ ABI changes dialects on various compilers .. . .. . Both Instant and thick Oracle client contain OCI library OCI.DLL or linclntsh.so . The one provided by Instant client is more-or-less self-contained . e.i . it does not depend on other libs provided with Oracle client compare output from ldd on Linux or depwalk on Windows . Both also contain necessary headers .. . .. . The C API in both clients is practically identical . The only exception I recall is a set of supported database native characters sets . InstantClient supports only UTF8 ISO Latin1 and ASCII . thick client also contains a library named libxml.a which is needed when you want to use datatype SYS.XMLTYPE . This library is not for some unknown reason bundled with InstantClient .. . .. . thick client also contains some handy diagnostic tools like tnsping .. . .. . InstantClient is very easy to setup . Users simply unpack a single .zip file . Do not have to set ORACLE HOME PATH LD LIBRARY PATH env . variables . You simply dlopen one library file and that s all . InstanctClient can work without tnsnames.ora although it supports it instead of that you can use jdbc-like EZCONNECT .. . .. . Both types of clients may not be re-distributed unless you re Oracle businesses partner . So you must not embed these driver s lib in your application . Each user must download then separately . So far I have not found a C API way how to distinguish InstantClient OCI.DLL libary . There is InstantClient specific section in Oracle Call Interface Programmer s Guide .. . .. . I recall there might be some problems with InstantClient when you set ORACLE HOME env . variable and it s values ends or does not end with slash", "Question : I have a XML as below - .. . .. . I want this to be converted to OCI-Lob object as below - .. . .. . I have looked for almost all the threads related to OCI-Lob in PHP but didn t get the information which I am looking for . Hope you understand my question . Any suggestions on this would be appreciated . Thank you . .. . Answer : To get OCI-Lob Object We do need Oracle Select Query in addition we can pass XMLAttributes Elements with getClobVal or any function . But We can t parse XML and convert it to OCI-Lob Object as it always interact with the Oracle Database Server . OCI http : stackoverflow.com questions 29589826 how-to-use-xml-to-create-oci-lob-object", "Question : I m trying to change the OS User that is passed to Oracle during database-connection set up in golang oracle oci-8 driver https : github.com mattn go-oci8 . This is in a similar way to setting the v session.osuser in the Java JDBC drivers . I m trying to modify mattn s go-oci8 oracle driver so I can change the os user value on the fly . I ve tried adding conn.attrs.Set os user test os user in the open method . I ve trawled through the oci docs http : docs.oracle.com cd B12037 01 appdev.101 b10779 ociaahan.htm and I think I might need to set OCI ATTR CLIENT IDENTIFIER but I can work out if this is correct or how to do it . Any ideas if it is possible and how to change the osuser value using OCI Cheers .. . Answer : It appears that it is not possible to set the OS User with the OCI driver . The Oracle documentation http : docs.oracle.com cd E18283 01 appdev.112 e13995 oracle jdbc OracleConnection.html CONNECTION PROPERTY THIN VSESSION OSUSER for Java highlights that setting the OS User is only possible when the oracle Java Thin driver is used .", "Question : I am working on an application that uses Oracle OCI to connect to the Oracle database server . The application allows the user to change their Oracle password and uses Alter User xxx Identified By to perform this . However this transmits the user s new password in clear text over the network we cannot use Oracle SSL to encrypt network traffic . I have found that Oracle recommends using the PASSWORD command in SQLPlus rather than ALTER USER one reason being that the new password encrypted . Does the OCI method OCIPasswordChange also encrypt the new password when it is transmitted over the network This is using Oracle 10 and 11 . .. . Answer : Yes OCIPasswordChange does encrypt the new password sent over the network . I have now implemented this and done a packet trace . An encrypted AUTH NEWPASSWORD packet is transmitted to the Oracle database server .", "Question : I m calling OCI apis to connect the oracle database . I have installed instant client for the same and all oracle server-client configuration setup is ready . I have written a sample C application win32 console-application to test the oci apis . Set following parameters in the project settings .. . .. . While building an application it is giving a linker-error .. . .. . Using .. . Answer : My bad . Was linking 64-bit library with 32-bit application . Should install 32-bit OCI library to work on 32-bit application .", "Question : When I execute a fetch from an Oracle database using PHP OCI numbers that are less than 1 are shown as .XXXXXX e.g . .249999 . Is there a way to set this to 0.XXXXXX or to any other format without modifying every query to use to-char explicitly Perhaps through some session parameters .. . Answer : There is no way to do what you re asking globally short of modifying php oci-extension source code . The reason for this behavior is because oracle oci omits 0s in results and php converts all results from oci to strings without performing any casting depending on column datatype . Even results in SQL Plus omit 0 by default and SQL Plus formatting has to be invoked with set numformat to customize column formatting and prepend 0s . There is currently no alter session parameter you can set to change this behavior . Most common way to work around this is to use a wrapper around your queries and check for numeric columns with is numeric and then format the numeric column values with number format or sprintf . Hopefully your application already uses a wrapper around stock php oci functions so you can make the change in one location .", "Question : When using Pro C a embedded SQL preprocessor from Oracle for C-Code or OCI I noticed that the connect init routine installs some signal handlers . That means before a .. . .. . or a .. . .. . I can verify that for example those signals have following handlers : .. . .. . After the connect init statement the table looks like : .. . .. . where 0x7eff9e60bdac denotes sslsshandler and 0x7eff9ea17f9c denotes skgesig sigactionHandler - both symbols defined in libclntsh.so.11.1 - the Oracle runtime library . I am concerned about those Oracle signal handlers because it seems that they introduce quite some non-deterministic behaviour . That means depending on the OS hardware and kind of segfault abort I ve observed following behaviour : .. . .. . an ugly stacktrace that does not contain much useful information .. . direct program exit with exit-status 1 - without any core-file writing and no error message .. . direct program exit with exit-status 0 sic Especially the last behaviour is grotesque . Thus I am interested in : .. . .. . the motivation - why are those signal handlers installed by Oracle how to disable them - at least for signals that yield a core-file by default - because for my use-case I want a core under those circumstances during development or a reliable and informative exit status in production .. . is it safe to overwrite the Oracle signal-handler via e.g . act.sa handler SIG DFL sigaction SIGABRT act 0 what are the disadvantages of resetting SIGABRT SIGSEGV and friends to SIG DFL after connect Comment : Best solution would be not to use buggy non-thread-safe software like Oracle . .. . Answer : Signal handling and diagnostic framework considerations : the OCI diagnostic framework installs signal handlers that may impact any signal handling that you use in your application . You can disable OCI signal handling by setting .. . .. . in the sqlnet.ora file . Refer to Fault Diagnosability in OCI http : docs.oracle.com cd E18283 01 appdev.112 e10646 oci10new.htm CHDCIAHJ in Oracle Call Interface Programmer s Guide http : docs.oracle.com cd E18283 01 appdev.112 e10646 toc.htm for information . Please try to configure this environment variable in sqlnet.ora file", "Question : I would like to call an Oracle stored procedure from C++ using the OCI interface and iterate over the results using an out SYS REF CURSOR as a parameter to the procedure . I m new to OCI so might be missing something simple . Most of this code is taken from here : https : community.oracle.com thread 507765 start 0 tstart 0 https : community.oracle.com thread 507765 start 0 tstart 0 .. . .. . My stored procedure is : .. . .. . And my c++ code snippet is : .. . .. . The stored procedure will be difficult to change so prefer to amend my code . Oracle version is : Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 Thanks in advance . Comment : I would like to know why you are not using OCCI instant client Comment : What is in sqlCharArray Comment : Hi I have updated the code above with more details including sqlCharArray . I ve not heard of OCCI until now looks very interesting however I would still like to know if this is possible and how in OCI . .. . Answer : You ve set : .. . .. . Which has no bind parameters you re trying to set one hence the error and the procedure definition requires one . You need to call it as : Comment : Thanks Alex it works now in this test program I did try this approach in my main program before and it did not work but now I know it was due to passing pointers and references everywhere and not the OCI calls themselves .", "Question : Need to communicate my C code to Oracle 11g . I figure out oci is appropriate . and I don t know how to install it . on Linux kernel-2.6.32-279.el6.i686 .. . .. . I used this code in hello.c .. . .. . and command .. . .. . Error message displayed : .. . .. . and Instant client is installed in location .. . .. . I know it s basic but me newbie too . .. . Answer : To build OCI applications you need the SDK which includes the header-files etc . The SDK is included with the Full client and the database since you re using the Instant client you need an additional download - see the official Oracle Instant Client page http : www.oracle.com technetwork database features instant-client index-100365.html for download links .", "Question : null .. . Answer : Our native C++ app accesses an Oracle Database through OCI https : docs.oracle.com database 121 LNOCI toc.htm . not OCCI http : docs.oracle.com database 121 LNCPP toc.htm .. . .. . We re currently compiling on VS2010 . We want to migrate our code base to VS2015 and while it seems implied that OCI should work there I noticed that the 12c Version of the OCI.dll http : download.oracle.com otn nt instantclient 121020 instantclient-basic-windows.x64-12.1.0.2.0.zip statically links to MSVCR100.dll https : msdn.microsoft.com en-us library abx4dbyh v vs.100 .aspx which is the dynamic CRT lib of Visual Studio 2010 . Should I expect OCI 12c Instant Client access to work through a native C++ app compiled with the VS2015 toolset Or any Visual-C++ version newer that 2010 really . Our app would use the MSVCR libs of 2015 and the OCI.dll would continue to ose the MSVCR100 which is not a problem in principle http : stackoverflow.com a 36727785 321013 . .. . .. . Disclaimer : Personally I d say : hell yes sure it should work but I can t find any official support statement probably temporary search blindness and I m not really fluent with the full OCI API so I m not sure whether there are corner cases where invalid stuff could be passed .", "Question : null .. . Answer : In order to limit the number of connections to the Oracle database I m studying the possibility to create multiple transactions from only one session from my application instead of creating a session for each parallel transaction I d need . I m aware of connection-pooling features like DRCP etc . Here I wonder if I can do this with a single simple OCI connection in C by using OCI Contexts maybe", "Question : I ve tried to install OCI so i can use new PDO oci : dbname.. . .. . .. . After 1 5h of fight I ve installed oracle instantclient basic and sdk and then oci for php as described here http : ubuntuforums.org showthread.php t 92528 . Now I m a bit confused because my PHPinfo tells that OCI8 Support is enabled but in PDO section there s only odbc in PDO drivers section . Can anyone tell me when did I go wrong P.S . I ve got XUBUNTU 12.10 and following packets installed : php-pear php5 php5-cli php5-common php5-dbg php5-dev php5-odbc Please answer fast cause I got only week for this project : .. . .. . Edit : Thanks for explaining . Now I m trying to install pdo oci following this : http : lacot.org blog 2009 11 03 ubuntu-php5-oci8-and-pdo oci-the-perfect-install.html .. . .. . and now invoking this : .. . .. . usr local src PDO OCI-1.0 . configure --with-oci8 instantclient opt oracle instantclient 12.1 .. . .. . I m getting following error : .. . .. . configure : error : Oracle-OCI needed libraries not found under opt oracle instantclient .. . .. . I wonder if doing this on Windows wouldn t be easier . Comment : That link explains how to use OCI8 not PDO . They re different and unrelated extensions . .. . Answer : You should note that there re two completely different PHP extensions designed to connect to Oracle databases : .. . .. . OCI8 http : php.net oci8 is the extension developed by Oracle Corporation . It s actively maintained and it s the recommended way to interact with Oracle . PDO OCI http : php.net pdo oci is the PDO driver developed by the community . It was never finished and it s actually kind of abandoned thus the EXPERIMENTAL warning displayed in the documentation . Both contain the OCI Oracle Call Interface term because both make use internally of the OCI API provided by Oracle . As such you need the Oracle Instant Client no matter what library you choose . But you then need to install the corresponding PHP packages . In your case you re installing OCI8 and then trying to run PDO code .", "Question : null .. . Answer : I have an application which uses the OCI 7 API . This application is successfully deployed on a variety of configurations like .. . .. . WS2003 Oracle9 and WS2008 R2 Oracle12 r1 . I am now trying to deploy the app on WS2012 R2 but I am facing a frustrating issue where the application crashes with an illegal access somewhere in oranls12.dll . This makes think that it has something to do with the locale and or system variables . I have checked that the NLS LANG system variable is set as the same the database uses which is AMERICAN AMERICA.WE8MSWIN1252 . I have tried using the binary which I know works on WS2008 and I have also compiled it on WS2012 . It still crashes . Does anyone know what is wrong or have any pointers on how to debug this properly Any details needed I will provide . To answer the comments below the app uses the OCI 7 API which is still provided with the newer drivers . The app itself is compiled against OCI 12 . The database running on the server is Oracle 12.1.0.1 . Comment : OCI 7 I m afraid nobody can help you unless you provide more details . Best solution would be to open a SR on Metalink . Comment : Is there any particular reason you can t use a later OCI release As far as I know OCI7 has been dead for more than 15 years and I really hope you re not using Oracle 7.x . Comment : @timclutton OCI7 uses different API . AFAIK the only justification today for using OCI7 is when you to extract file handle id of your TCP connection . This can be helpful for dead connection detection . Comment : @timclutton : see edit : Comment : @ibre5041 : The app works fine on WS2008 . This is also compiled against O12 .", "Question : null .. . Answer : I m writing a OCI C++ that will read data from an Oracle XE database . The SQL statement SELECT FROM TESTTABLE works fine on SQLPlus returning 1 row of data . The code I wrote is as follows using implicit describe bind variables after SQL execution : .. . .. . For some reason no data is read and OCIStmtFetch2 returns OCI NO DATA . I can t find out what s going on and this is my first attempt to work with OCI . Help appreciated . Comment : C is not C++ is not C Don t add unrelated tags", "Question : I have been reading about how to connect to my oracle database from my C win application but I keep hitting the wall . I have decided to use odp.net and OCI such that the client computer not needs to install a client but I can t get it to work . I have a small test application the code I shown below and in my solution I have added the following dll s from oracle OCI : oci.dll orannzsbb11.dll and oraociicus11.dll . They are all placed together with the final .exe file . Test Code : .. . .. . The problem occurs already in the using-statement the program just stop working and I get no response . What is the magic that I need to do to get the OCI to work Comment : Is the OracleConnection class part of the System.Data.OracleClient or the Oracle.DataAccess.Client namespace Your description is somewhat confusing because ODP.NET is the heaviest client available . Comment : It is the Oracle.DataAccess.Client - the only thing that I want to achive is to be able to connect to an oracle database without installing a client Comment : You don t use ODP.NET do you If you had installed ODP.NET you would have gone through a full-blown Oracle client installation that includes OCI and many registry settings . But I doesn t seem that this is the road you want to go . Comment : My plan was to use odp.net and yes i have gone through the full-blown installation to get all the dll s . I use opd.net such that i can use the Factory Instance because i have a generic database layer becuase my application uses multiple DBMS s .. . Answer : Read the installation instructions from Oracle for ODAC found here http : www.oracle.com technetwork topics dotnet install112012-164342.html . This also discusses common setup issues . You ll also need to include a reference to Oracle.DataAccess in your solution and using Oracle.DataAccess.Client For your connection you may want to use an Oracle SID that can be resolved via your tnsnames file try tnsping from cmd prompt .", "Question : null .. . Answer : I need to use php to connect oracle database on an ARM mechine but there are no released version of Oracle Instant Client for ARM linux . How can I enable oci extension on the ARM linux Or can I use something other than oci to connect Oracle Any help or idea Thanks . Comment : just an idea maybe jdbc could be used or does it also need native non-java db-specific drivers on client-side Comment : Possible duplicate of Oracle Instant Client for ARM based Debian device http : stackoverflow.com questions 26167682 oracle-instant-client-for-arm-based-debian-device Comment : @StefanHegny Thanks but I don t use Java only want to connect oracle via php code . Comment : @Master o.P . I see but it might turn out this is impossible.. . Comment : @StefanHegny Well I see now . Thank you for your time and answering", "Question : I m trying to compile SOCI http : soci.sourceforge.net which use OCI Oracle Call Interface under windows . Details : Visual studio 2012 Oracle version 11.2.0 64 bit .. . .. . I found ORCALE HOME OCI LIB MSVC libraries . But it won t like I tried both oraocci11.lib and oci.lib . The linkage error I get : .. . .. . Any Ideas I m really stuck on that one . Thanks Guy .. . Answer : Well I found eventually a oci.lib that I can link against Instant Client Package .. . .. . http : www.oracle.com technetwork topics winsoft-085727.html Comment : Note that this is only an import .lib not a static .lib . You also need the .dll at runtime in your PATH ." ] }
[ "yes-answer-long", "yes-answer-short" ]
oracle
UNK_RELATION
draw2d@toolkit@44
draw2d -- draw2d is a layout and rendering @placeholder for displaying graphics on an swt canvas .
{ "confidence": [ 53.26744842529297, 49.79579162597656, 46.434898376464844, 46.40728759765625, 45.73774337768555, 45.614437103271484, 44.202674865722656, 44.202674865722656, 44.19715118408203, 43.9820671081543, 43.12091827392578, 43.03311538696289, 43.03311538696289, 42.359779357910156, 42.359779357910156, 41.83102035522461, 41.26575469970703, 40.49372863769531, 39.892173767089844, 39.892173767089844, 39.892173767089844, 39.70576477050781, 37.95842361450195, 37.9178581237793, 37.526039123535156, 37.526039123535156, 36.54966354370117, 36.54966354370117, 36.54966354370117, 36.54966354370117, 36.54966354370117, 36.54966354370117, 36.54966354370117, 36.54966354370117, 35.473426818847656, 35.473426818847656, 35.473426818847656, 35.473426818847656, 35.473426818847656, 35.42670822143555, 34.78159713745117, 34.18353271484375, 34.18353271484375, 33.705360412597656, 33.705360412597656, 33.41551208496094, 33.174461364746094, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 32.04731750488281, 30.971084594726562, 30.971084594726562, 30.971084594726562, 30.971084594726562, 30.659982681274414, 30.659982681274414, 30.659982681274414, 30.544296264648438, 29.68118667602539, 29.68118667602539, 29.68118667602539, 29.68118667602539, 29.68118667602539, 29.68118667602539, 29.68118667602539, 29.291786193847656, 28.215553283691406, 28.215553283691406, 28.215553283691406, 28.215553283691406, 26.416610717773438, 26.205493927001953, 26.205493927001953, 26.205493927001953, 26.205493927001953, 26.205493927001953, 25.209300994873047, 25.129257202148438, 22.944046020507812, 22.809431076049805, 22.228858947753906, 22.15943145751953, 21.264686584472656, 21.229141235351562, 20.810657501220703, 20.48857879638672, 20.445064544677734, 20.356842041015625, 19.595855712890625, 19.346054077148438, 19.171939849853516, 18.84396743774414, 18.51966094970703 ], "content": [ "Hence for SWT there is no way to differentiate between a draw2d Label or say a draw2d Connection .", "In this example draw2d-canvas is implemented as an angularjs-directive .", "I want to allow the user to draw a rectangle on the canvas with Draw2D http : www.draw2d.org draw2d index.html library .", "So I m making a draw2d program .", "This software depends on draw2d a rendering library for javascript .", "I want to use Draw2D touch http : www.draw2d.org draw2d in an AMD environment .", "The widgets of SWT and draw2d are quite different from each other .", "SWT just provides a platform to draw2d where something can be drawn .", "Is there no draw2d documentation or tutorials", "I m using draw2d js library .", "Draw2d is meant to be lightweight .", "canvas.clear is a function written in draw2d touch which clears the canvas .", "We are facing a problem in handling a large number of Draw2d Figures in a single Canvas .", "Here it is : http : www.draw2d.org draw2d forum .", "There are many examples as part of the draw2d project .", "Can I use draw2d for this .", "How to get know what two figures was conneted in draw2d js libdrary http : www.draw2d.org draw2d", "Well apparently Draw2d itself it able to do it but then you ll loose the layout .", "i found one method ImageFigure in draw2d .", "How to properly wrap one figure by another in Draw2D", "I want to create a flowchart via Draw2D .", "More research to come...... . .. . .. . Well the answer from the Draw2d Developer http : www.draw2d.org draw2d is that getBBox will not function correctly on a text element until the element is in the DOM and visible .", "Now I cannot figure out how to dispose the font as the figure for the EditPart is a Draw2D Label not an SWT Widget .", "This is not an issue with Draw2D but rather lack of knowledge by me as to how to get it to work .", "Or would I have to port the algorithm to Draw2D", "draw2d touch use the jquery-ui dragdrop stuff .", "I want to know how I delete a connection in draw2d .", "Forgive me if this is a dumb question I m a newbie with Draw2d Touch http : www.draw2d.org .", "I m using Draw2D http : draw2d.org draw2d touch jsdoc to render diagram .", "Ho do I draw a polyline with draw2d javascript not eclipse", "Clicking the gear on the top right of the examples webpage shows the Draw2D API documentation .", "It works i dont know why Draw2D set the path fill to none.. .", "I am trying use draw2d for my plugin development .", "I have been using draw2d library not GEF and ScrollPane .", "I m trying to inject a new instance of draw2d provided by their downloadable library .", "I swapped the loading order by putting draw2d before angular still the same .", "It seems that draw2d rotates only the inner content of a figure when I rotate it .", "I ve got a problem with Draw2D GEF and cannot think of a good idea .", "Why did draw2d developers decide to roll their own styling", "IMHO you could try to get in Draw2d sources and try disabling their custom-drawn and replacing them with native ones from SWT .", "So I set up a shim config for Draw2D relevant parts included : .. . .. . Draw2D tries to access Raphael and Shifty globally : .. . .. . even with the shim config I m getting ReferenceError because Raphael is not defined .", "i am trying to build an app with extjs 4 and draw2d touch library .", "You can introspec thte example buildin commandstack from draw2d .", "I keep having : ncaught Error : injector : modulerr Failed to instantiate module mean due to : Error : injector : modulerr Failed to instantiate module draw2d due to : Error : injector : nomod Module draw2d is not available", "I keep having : Uncaught Error : injector : modulerr Failed to instantiate module mean due to : Error : injector : modulerr Failed to instantiate module draw2d due to : Error : injector : nomod Module draw2d is not available", "I am trying to use draw2d javascript library inside an ui-bootstrap-tpls accordion inside an angularjs application .", "Now we do a workaround like this : .. . .. . As you see setHelp method first parameter should be a SWT or JFace Control but it was set to be the the current workbench.I think a figure in draw2d is lightweight and has not be associated with anything about SWT or JFace .", "Graphiti tries to implement almost all functions object from Draw2D......but it requires some time .", "Now working with Graphiti in-place of Draw2D but the code for your locator should look as follow didn t tested :", "I find only draw2d eclipse examples .. . .. . It s really anoying to have only examples and the frameworks source code .", "http : draw2d.org draw2d touch jsdoc api .. . .. . I d also like to see some more Draw2D tutorials to get started .", "A additional resource is Draw2D official forum where however there are only 5 posts and 22 members .", "Not sure if that s enough to fix your problem with draw2d but hopefully it ll be a step in the right direction .", "I have this question in draw2d-js there is a user images and want to make it looks like css3 border-radius .", "Check the details here : http : nyssen.blogspot.de 2010 12 draw2d-examples-hidden-treasure.html", "Currently I am working on a web application that uses draw2d library to draw shapes and charts .", "Unfortunately I don t know draw2d and or GEF well enough to find my problem .", "In Draw2D-js you need always to extend Classes if you want to do something new .", "It s essentially a wrapper around the raphael.js functionality but takes care of draw2d touch things like clears events and such .", "I have an editor that has both draw2d tree and Nebula s GridTreeViewer basically a JFace TreeViewer .", "In draw2d I get scrollbars provided by org.eclipse.draw2d.ScrollPane and in GridTreeViewer I get scrollbars from JFace .", "I am working with the Draw2D library which allows for exporting of the JSON but when I try to do it I cannot get it to export to MVC .", "index.html : .. . .. . app.js : Taken from the angularjs template delivered as part of the draw2d package .. . .. . Here is a graphic showing the result : The top graphic is the expected result .", "I am guessing that the draw2d library and the ui-bootstrap-tpls for the according and perhaps other templates conflict in someway either in attribute naming and or css .", "Child elements will be represented as box EditParts contained within their parent s box and so on.. . .. . .. . Each one of my EditParts will have a draw2d Figure which itself will have at least two or three more decorative draw2d figures of its own .", "How do I add a forced line-break within a draw2d TextFlow figure .", "I m using the JS GraphLib Draw2D and on onContextMenu event I append the jQuery-Menu and it appears but doesn t close", "how can i drag a draw2d shape from one column and drop it in the other", "I posted the same question in the google group of Draw2d and receive the following answer from the framework developer Andreas Herz .", "I just happen to be using the draw2d.js Draw2D Touch library which wraps around Raphael.js .", "I understand that Draw2D doesn t provide support for more complex figures like cylinders and that we have to construct them ourselves .", "Here http : doublexia.wordpress.com 2011 06 23 use-eclipse-draw2d-to-create-custom-figure someone creates a Hexagon .", "In there I just put a similar question : https : groups.google.com forum embed place topic draw2d-touch ZEHs0OyGGIo but so far I had no answer .", "So I m trying to build as a personal project my course curriculum and I decided to use Draw2D because I think it s pretty complete .", "It is meant for creating diagrams where you work with figures pretty much as you would do with controls - and Draw2d manages Z order clipping and such .", "I have written some sample code to see if the problem is with our code or that draw2d performance degrades in general with more number of widgets .", "The same problem exists within the sample application which indicates that we may have to do some optimizations within the draw2d codebase itself .", "I m try to build an example of drag drop but without success : following my code .. . .. . Draggable object .. . .. . Canvas .. . .. . I m trying to use http : draw2d.org draw2d touch jsdoc 5 draw2d examples code-snippets buildin commandstack index.html example but onDrop event not fire .", "I think you can t fill an SVG Path in Draw2D for now keep in mind that the SVGFigure import is currently very limited .. . .. . You can use polygon to do that like this : .. . .. . Hope it s what you want : .. . .. . Reference :", "You can add editable connections in this way see example on draw2d-website : .. . .. . If you need to use the editor for the label you have to add : .. . .. . So just make a JQuery event like :", "For now all I have in my code is : .. . .. . I get the org.eclipse.e4.core.di.InjectionException : java.lang.NoClassDefFoundError : org eclipse draw2d LightweightSystem when I launch my eclipse application .", "I am Trying to add a dropListener so I can Drop and text into a draw2d Label in GEf Editor Can anyone help how Can I do that .", "But as soon as I add a Button Draw2d or I add a figure which has a MouseListener attached to it now when I hover over the newly added figure inside the parent it disappears .", "Apart from Baz solution http : stackoverflow.com questions 20398160 how-to-dispose-of-an-swt-font-set-on-a-draw2d-label noredirect 1 comment30460371 20398160 to make the font a static field a good solution is to use a JFace FontRegistry as detailed in this strangeoptics blog post http : strangeoptics.blogspot.de 2011 09 eclipse-rcp-all-my-registries.html .", "Leftmost tree has a custom-drawn scrollbar I assume that s Draw2d tree and rightmost tree shows native scrollbar I guess those are the ones you call JFace .", "SWT Widgets overview http : www.eclipse.org swt widgets .", "it seems you copy-and-pasted an swt sample showing a window with a painted canvas inside a jface editor class", "I want to make an application in order to draw forms rectangle line square arrow like in paint using Java SWT Canvas .", "I m displaying a model using the Tree Layout within Zest .", "I m Not familiar with SWT", "So in the paintFigure Graphics graphics method I do this : .. . .. . But this doesn t change the height .", "I have the following code that creates a rectangle on the canvas .", "As a tooltip can just provide less hints we decide to add F1 context sensitive http : help.eclipse.org helios topic org.eclipse.platform.doc.isv guide ua help context.htm help to the UI components such as a draw2d figure.But facing a problem that : we can t find suitable positions and parameters to invoke the method IWorkbenchHelpSystem.setHelp Control control String contextId .", "is it using Canvas API", "The tooltip is also the same size regardless of the scale of the canvas this was stopping me from simply adding a Figure to the canvas and calling setVisible and setLocation .", "Isn t the whole notion of SWT is to rely on host OS for controls", "create a Canvas using parent then pass that canvas to LightweightSystem .", "I can t use any other layout than Toolbar layout .", "As you want to draw inside the editor you don t need to create new Shell nor dispatch events from the event queue as you would do in a standalone SWT application just create a Canvas and draw into it .", "I think I could use the paint Graphics graphics method of my Figure if only I had some sort of Graphics object that could write to an SVG image file but I can t find anything like that ." ] }
{ "confidence": [ 59.83061981201172, 55.888832092285156, 53.188941955566406, 52.350440979003906, 50.23672103881836, 49.03401565551758, 47.84504318237305, 47.6549072265625, 47.11274337768555, 46.66147994995117, 46.52204895019531, 45.72674560546875, 45.37246322631836, 45.20931625366211, 45.20931625366211, 45.20931625366211, 44.30937957763672, 43.14012145996094, 42.74890899658203, 42.224063873291016 ], "content": [ "Question : As a tooltip can just provide less hints we decide to add F1 context sensitive http : help.eclipse.org helios topic org.eclipse.platform.doc.isv guide ua help context.htm help to the UI components such as a draw2d figure.But facing a problem that : we can t find suitable positions and parameters to invoke the method IWorkbenchHelpSystem.setHelp Control control String contextId . Now we do a workaround like this : .. . .. . As you see setHelp method first parameter should be a SWT or JFace Control but it was set to be the the current workbench.I think a figure in draw2d is lightweight and has not be associated with anything about SWT or JFace . Thanks for solution advice . .. . Answer : The widgets of SWT and draw2d are quite different from each other . SWT just provides a platform to draw2d where something can be drawn . Hence for SWT there is no way to differentiate between a draw2d Label or say a draw2d Connection . All it understands is that something by a Figure which may have any number of figures as it s children will be painted in some specified area painted that s it no semantics to it . You may have a look at the org.eclipse.jface.dialogs.PopupDialog class . May be you can make a custom help Dialog it is not too difficult to extend with extending this class .", "Question : I want to allow the user to draw a rectangle on the canvas with Draw2D http : www.draw2d.org draw2d index.html library . The canvas location of mouse-down will be top-left and the canvas location of mouse-up should become the bottom right . However I am unable to catch the mouse-up and mouse-down events on the canvas . Here is the code I am trying but there is no output : .. . Answer : In Draw2D-js you need always to extend Classes if you want to do something new . you are redefining method with the wrong way .. . .. . in your exemple you can create this : .. . .. . and than use it like this : .. . .. . another method is to use JQuery directly : .. . .. . Reference : .. . .. . http : draw2d.org draw2d touch jsdoc 5 api draw2d.policy.canvas.CanvasPolicy", "Question : I have an editor that has both draw2d tree and Nebula s GridTreeViewer basically a JFace TreeViewer . What I need is working except scrollbars . In draw2d I get scrollbars provided by org.eclipse.draw2d.ScrollPane and in GridTreeViewer I get scrollbars from JFace . I am not sure why but scrollbars look different I would expect them to look the same since they are calling OS s native controls if I am not mistaken Is there a reason why scrollbars look different and is there a way downgrade JFace s scrollbars to look like draw2d s Perhaps there is mistake in setting up ScrollPane s scrollbars Here is the screenshot this is on Ubuntu 13.04 : .. . .. . enter image description here http : i.stack.imgur.com PRs4j.png .. . Answer : There is no mistake on your side . Leftmost tree has a custom-drawn scrollbar I assume that s Draw2d tree and rightmost tree shows native scrollbar I guess those are the ones you call JFace . You can notice that most applications outside of Eclipse show scrollbars like the JFace ones . That is if Ubuntu overlay scrollbars are enabled . There is no easy fix for this . IMHO you could try to get in Draw2d sources and try disabling their custom-drawn and replacing them with native ones from SWT . Or you could use a custom tree instead on Nebula control.. . Please note that JFace toolbars will look drastically different on Mac OS X or Windows will have different size and such . And the users will expect them : Comment : Thanks @Eugene Yeah that s what I would expect . Why did draw2d developers decide to roll their own styling Isn t the whole notion of SWT is to rely on host OS for controls Comment : Draw2d is meant to be lightweight . It is meant for creating diagrams where you work with figures pretty much as you would do with controls - and Draw2d manages Z order clipping and such . They did not want to have every figure to be backed by an OS control - this would consume to many resources on bigger diagrams AFAIK Windows even has a limit on a max number or controls thus they custom draw everything in their viewer . Comment : I get that but I wish there was a way to override styling in favor of OS s control styling that is if it s possible . Comment : It is not possible feasable if you are targetting multiple OSes.. . E.g . Mac OS X has had - not sure if it s still there some controls pulsing when they are selected - custom-drawn controls will immediately look fake . That is one of the problems with the likes of SWING and Qt . Note that you can try overlaying native control e.g . add it on the same parent as your tree and position on top of the tree carefully updating the bounds - but that is generally a waste of time . Comment : Makes sense . Thanks for your help I appreciate it .", "Question : I am trying to use draw2d javascript library inside an ui-bootstrap-tpls accordion inside an angularjs application . A simple example : I would build a plunker but I am unable to include the required libraries . In this example draw2d-canvas is implemented as an angularjs-directive . index.html : .. . .. . app.js : Taken from the angularjs template delivered as part of the draw2d package .. . .. . Here is a graphic showing the result : The top graphic is the expected result . Notice that the box around the text is incorrectly sized and in the wrong place . enter image description here http : i.stack.imgur.com t4fBB.png .. . .. . In addition to the formatting issues text not correctly located and the box not sized correctly the label cannot be selected and moved like the same label outside the accordion . I am guessing that the draw2d library and the ui-bootstrap-tpls for the according and perhaps other templates conflict in someway either in attribute naming and or css . Thank you for your help . .. . Answer : After much searching it seems that the issue revolves around SVG s-function getBBox Get Bound Box . The object is being created to fast . Thus an injection of a short timeout in this case 20ms did the trick . Changing .. . .. . to .. . .. . did the trick . WELL ---- WRONG Or not completely right .. . .. . After getting some sleep it turns out the setTimeout or the angularjs-timeout function only fixes this issue IF is-open true is set on the accordion . If not set or if it is on another accordion then the fix fails . It seems that the Accordion must be open AND the timeout used for the text label to be correctly rendered . More research to come...... . .. . .. . Well the answer from the Draw2d Developer http : www.draw2d.org draw2d is that getBBox will not function correctly on a text element until the element is in the DOM and visible . So I added the modified the uib-accoridion-group header to : .. . .. . I also added an ng-if to the inner div creating the graphic . This causes the DOM to create the div when the accordion is opened . Like magic . Comment : thank you same problem with bootstrap-modal solved adding the draw code inside modal-container .on shown function", "Question : Is there no draw2d documentation or tutorials I searched the web with no success . I find only draw2d eclipse examples .. . .. . It s really anoying to have only examples and the frameworks source code . .. . Answer : I am experiencing the same problem trying to tackle it in the same way of @Bnyboy . A additional resource is Draw2D official forum where however there are only 5 posts and 22 members . Here it is : http : www.draw2d.org draw2d forum . In there I just put a similar question : https : groups.google.com forum embed place topic draw2d-touch ZEHs0OyGGIo but so far I had no answer .", "Question : Is there no draw2d documentation or tutorials I searched the web with no success . I find only draw2d eclipse examples .. . .. . It s really anoying to have only examples and the frameworks source code . .. . Answer : Clicking the gear on the top right of the examples webpage shows the Draw2D API documentation . Here s a direct link . http : draw2d.org draw2d touch jsdoc api .. . .. . I d also like to see some more Draw2D tutorials to get started . I ve had some luck loading the examples in a new window and viewing the source . This is the best I ve found so far .", "Question : In a GEF editor I have the following EditPart : .. . .. . All works fine with most models but - you will have spotted the error already - I never dispose of the font . So with a large-ish model of 10k+ tokens this throws an org.eclipse.swt.SWTError : No more handles . At least I think hope this is what causes the error . Now I cannot figure out how to dispose the font as the figure for the EditPart is a Draw2D Label not an SWT Widget . How can I make sure the dreaded error can be circumvented Comment : So you re creating the same font over and over again instead of making it static and reusing it Comment : Ouch Thanks for the pointer Forest Trees.. . Guess using a FontRegistry would be another solution . .. . Answer : Apart from Baz solution http : stackoverflow.com questions 20398160 how-to-dispose-of-an-swt-font-set-on-a-draw2d-label noredirect 1 comment30460371 20398160 to make the font a static field a good solution is to use a JFace FontRegistry as detailed in this strangeoptics blog post http : strangeoptics.blogspot.de 2011 09 eclipse-rcp-all-my-registries.html .", "Question : null .. . Answer : I want to use Draw2D touch http : www.draw2d.org draw2d in an AMD environment . The library itself isn t AMD compliant but depends on some other - AMD compliant - libraries like Raphael and Shifty . So I set up a shim config for Draw2D relevant parts included : .. . .. . Draw2D tries to access Raphael and Shifty globally : .. . .. . even with the shim config I m getting ReferenceError because Raphael is not defined . The question is basically how to load a library which isn t AMD compliant but relies on AMD compliant libraries . Comment : You must not shim AMD compliant libraries and you included shifty and raphael in your config . Specifying just the path is enough shim is only needed for old-style libraries . Not sure if that s enough to fix your problem with draw2d but hopefully it ll be a step in the right direction . Comment : I realized that later reading the documentation that exports and init have no effect for AMD compliant libraries but removing those shim configs doesn t help either .", "Question : I am having list of nodes to be drawn.Here Node means RectangleFigure . So all these nodes are plotted first on canvas FigureCanvas Then I have a map maintained having dependency relations between nodes drawn earlier . In the map keys are the nodes and values are nothing but a list of nodes maintained . e.g . There are 3 nodes ClassA ClassB InterfaceC .. . .. . I have them drawn on a canvas . And my map is like below : ClassA ClassB ClassB InterfaceC So it means ClassA extends ClassB and ClassB implements InterfaceC . Now I want to draw PolylineConnection in between the nodes drawn already using the map maintained . So how can I proceed for this Any pointers are really appreciated Thanks in advance .. . Answer : There are many examples as part of the draw2d project . Check the details here : http : nyssen.blogspot.de 2010 12 draw2d-examples-hidden-treasure.html Comment : I didnot find anything useful and related with PolylineConnection on the link suggested : Comment : Did you download the examples project and investigate it Comment : I know the basics about drawing Connections the same examples are there on above blog . But the question asked above is somewhat tricky . I am stuck at that point . Anyway thanks for your suggestion .", "Question : i am trying to build an app with extjs 4 and draw2d touch library . the app has a two column panel . how can i drag a draw2d shape from one column and drop it in the other Any help plis thanks workspace http : i.stack.imgur.com 9QWrw.png Comment : Did you read the doc on drag-and-drop in ExtJs Can you share the code you tried so far .. . Answer : draw2d touch use the jquery-ui dragdrop stuff . You must add a css class draw2d droppable to your div to indicate that the node is dragable . You can introspec thte example buildin commandstack from draw2d . Regards", "Question : I m beginning with the MEAN Stack and I m struggling to do something I m sure it s pretty basic . I m trying to inject a new instance of draw2d provided by their downloadable library . I keep having : ncaught Error : injector : modulerr Failed to instantiate module mean due to : Error : injector : modulerr Failed to instantiate module draw2d due to : Error : injector : nomod Module draw2d is not available You either misspelled the module name or forgot to load it . If registering a module ensure that you specify the dependencies as the second argument . Comming from : .. . .. . .. . .. . modules core client app config.js .. . .. . Here are the other files : .. . .. . .. . .. . modules mymodule client controllers projects.client.controller.js .. . .. . modules mymodule client services draw2d.client.service.js .. . .. . The module s package is in public lib vendors draw2d .. . .. . config assets default.js .. . .. . modules mymodule core.client.module.js .. . .. . Can you please help me in explaining me what I did miss Thanks a lot for your precious help : Comment : did you added it into the index.html file Comment : Do I need to When I inspect the generated source I have all my js files correctly included . I swapped the loading order by putting draw2d before angular still the same . I keep having : Uncaught Error : injector : modulerr Failed to instantiate module mean due to : Error : injector : modulerr Failed to instantiate module draw2d due to : Error : injector : nomod Module draw2d is not available You either misspelled the module name or forgot to load it . If registering a module ensure that you specify the dependencies as the second argument . Comment : where do you attach the dependencies to your module Comment : Oh how am I supposed to do that please Comment : You have to do some like this : angular.module app dependency1 dependency2 but if you are using requireJs take a look here : solutionoptimist.com 2013 09 30 http : solutionoptimist.com 2013 09 30 requirejs-angularjs-dependency-injection .. . Answer : Oh boy I found what was providing this error . I didn t have to declare it in the project dependency . Works now.. .", "Question : null .. . Answer : I m try to build an example of drag drop but without success : following my code .. . .. . Draggable object .. . .. . Canvas .. . .. . I m trying to use http : draw2d.org draw2d touch jsdoc 5 draw2d examples code-snippets buildin commandstack index.html example but onDrop event not fire . What I wrong Comment : Solved using class draw2d droppable in foo DOM . Bye", "Question : I m using draw2d js library . I have the following code that creates a rectangle on the canvas . I m trying to access rect using this keyword but its not working .. . .. . Thanks Comment : its not working probably wont get you very far here . What exactly is happening .. . Answer : this in that context does not refer to rect but instead refers to the anonymous function you provided to on : .. . .. . You can just reference rect directly : .. . .. . this is a fairly tricky point of JavaScript . I d recommend reading Mozilla s guide https : developer.mozilla.org en-US docs Web JavaScript Reference Operators this to grok it better .", "Question : i found one method ImageFigure in draw2d . So i want to know is it presnt in graphiti.js also . If it present in graphiti then it solves my problem on grouping object . Thanks In advance . .. . Answer : ImageShape or ImageFigure is not part of the current graphiti version . Graphiti tries to implement almost all functions object from Draw2D......but it requires some time .", "Question : I am trying use draw2d for my plugin development . For now all I have in my code is : .. . .. . I get the org.eclipse.e4.core.di.InjectionException : java.lang.NoClassDefFoundError : org eclipse draw2d LightweightSystem when I launch my eclipse application . I have org.eclipse.draw2d added to my project as an external jar . Can someone please help me with this Thanks in advance .. . Answer : Putting this as the answer to my question now : .. . .. . My required bundle file in Manifest.mf looked like this when I got the errors : .. . .. . I changed it to :", "Question : How to get know what two figures was conneted in draw2d js libdrary http : www.draw2d.org draw2d I cant find corresponding event callback method. . .. . Answer : Sorry found : stackChanged method of CommandStack with one argument event with command.label Connecting Ports make sure you catching postExecute event . Comment : Thanks for bothering to come back and add this detail", "Question : I have a question about Draw2D.js . I m resizing the Canvas by using JQuery-ui but when I resize the canvas I have to destroy it and create a new one .. . Otherwise I ll have many canvases overlapping . If I call canvas.destroy nothing works as mentioned in the documentation . There is any way to do a soft destroy of the canvas Is any resize fuunctionaility in JQuery-ui Thank you @MacGyver i find solution in the second propostion . We have to edit the SVG DOM : .. . .. . i share my solution here jsfiddle http : jsfiddle.net 6pbjh3s6 1 it may helps .. . Answer : You should be able to dynamically change your DOM node of your canvas by setting the width and height manually . Here we have a width of 2500px and a height of 2500px . Or change the width and height of the DIV tag dynamically using JavaScript . Another alternative is to set the zoom dynamically : .. . .. . Then call the app.layout function .. . .. . Reference : Comment : thx the second one it works Comment : Today I found another way to deal with this . It actually answers your actual question . canvas.clear is a function written in draw2d touch which clears the canvas . It s essentially a wrapper around the raphael.js functionality but takes care of draw2d touch things like clears events and such . Comment : Yes i was using canvas.clear but what i was doing needs a soft canvas.destroy that not exists but with the solution you give its good now . When we use canvas.clear its only destroys objects in the canvas and canvas.destroy destroy objects canvas Raphael paper.remove and events and we can t recreate it again . and thx again Comment : Gotcha chief.. .", "Question : null .. . Answer : Is it possible to plug in a prefuse layout such as NodeLinkTreeLayout http : prefuse.org doc api prefuse action layout graph NodeLinkTreeLayout.html to layout a graph in a GEF editor Or would I have to port the algorithm to Draw2D Comment : So you mean that you d be able to interact with the prefuse visualization in the GEF like a normal graph I d be surprised if there is built-in support for this .", "Question : We are facing a problem in handling a large number of Draw2d Figures in a single Canvas . We are building a Tree of the nodes with Connections between a parent and a child node . The number of figures in the canvas are of the order of 10000 just the Node Figures there are about another 10000 Connection figures too that I am not counting . I am attaching a part of one of our diagrams in Image : .. . .. . enter image description here http : i.stack.imgur.com M8YwL.png .. . .. . The problem is this : the nodes in the tree can be collapsed or expanded . When the number of Nodes in the Tree are of the order of 1000-2000 then the Collapse Expand takes place momentarily . However when the node count goes higher it takes more and more time to Collapse Expand any particular node which is irritating . I have written some sample code to see if the problem is with our code or that draw2d performance degrades in general with more number of widgets . The same problem exists within the sample application which indicates that we may have to do some optimizations within the draw2d codebase itself . I made a View in Eclipse to demonstrate that . The code of the same is attached below . Try to expand collapse figures in the View by clicking on the x or buttons it ll take time won t occur instantaneously . Can anyone please provide some pointers as to how this problem can be solved .. . Answer : I figured it out . I am posting it here in case anyone faces similar performance issues . I received help in this regard on the Eclipse forum . The link and full code is provided at the eclipse forum here : http : www.eclipse.org forums index.php m 1064195 Comment : +1 but please post the solution here . Links tend to be dead after a certain amount of time which would render your answer useless . Comment : The Solution for the Problem is this : When a large number of widgets are added to a same parent such a problem will occur because every time there is even a slight modification in any of its children a revalidation is performed for all the siblings . The way to deal such situations is to use some kind of Paging i.e . Divide children in a number of panels and then add them to the parent . This will reduce the amount of revalidation work significantly and hence there would be a marked improvement in the overall performance . The link I provided contains a ZIP file which is sample code . Comment : I am not able to reach the zip file . Can you post it on dropbox or something similar", "Question : Im trying to make an arrow joining a rect and a path triangle . This is my code : .. . .. . As you can see the path has an attribute : fill 000000 but when is rendered shows fill none .. . if i change this attribute manually shows the path filled . Debugger http : i.stack.imgur.com d07cy.png View http : i.stack.imgur.com OgdOZ.png .. . Answer : i don t know what do you want to do exactly . I think you can t fill an SVG Path in Draw2D for now keep in mind that the SVGFigure import is currently very limited .. . .. . You can use polygon to do that like this : .. . .. . Hope it s what you want : .. . .. . Reference : Comment : It works i dont know why Draw2D set the path fill to none.. ." ] }
[ "yes-answer-long", "yes-answer-short" ]
toolkit
UNK_RELATION
xcode-scheme@debugging@164
xcode-scheme -- xcode schemes helps to setup different environments for different builds.xcode schemes help to specify different environment-variables for running @placeholder releasing profiling and archiving .
{ "confidence": [ 45.591976165771484, 42.83620071411133, 38.69010925292969, 38.40907669067383, 36.84531021118164, 36.69163513183594, 36.1953010559082, 35.17403030395508, 34.909454345703125, 34.734169006347656, 34.734169006347656, 34.09386444091797, 33.59629440307617, 33.36317825317383, 30.86508560180664, 30.233409881591797, 29.73696517944336, 29.027851104736328, 28.77933120727539, 27.705154418945312, 27.27136993408203, 27.1861572265625, 27.014572143554688, 26.987937927246094, 26.987937927246094, 26.041244506835938, 26.041244506835938, 25.945632934570312, 25.66834259033203, 25.001598358154297, 24.93457794189453, 24.913307189941406, 24.913307189941406, 24.79644775390625, 24.669906616210938, 24.217239379882812, 23.89636993408203, 23.89636993408203, 23.61225128173828, 23.047622680664062, 22.078989028930664, 20.832809448242188, 20.832809448242188, 20.727825164794922, 20.727825164794922, 20.727825164794922, 20.364667892456055, 19.308055877685547, 19.111007690429688, 18.955852508544922, 18.945642471313477, 18.93379783630371, 18.93379783630371, 18.53099822998047, 18.254878997802734, 18.18143081665039, 18.18143081665039, 18.061708450317383, 17.627548217773438, 17.627548217773438, 17.521991729736328, 17.521991729736328, 17.521991729736328, 16.162864685058594, 16.162864685058594, 16.162864685058594, 16.022212982177734, 15.945894241333008, 15.945894241333008, 15.90021800994873, 15.750019073486328, 15.750019073486328, 15.734305381774902, 15.33105182647705, 15.33105182647705, 15.216291427612305, 15.216291427612305, 15.175579071044922, 14.809972763061523, 14.786275863647461, 14.47343921661377, 14.399389266967773, 14.399389266967773, 14.399389266967773, 14.399389266967773, 14.39089298248291, 14.293142318725586, 14.279302597045898, 14.219428062438965, 14.219428062438965, 13.103931427001953, 12.956262588500977, 12.70146656036377, 12.627416610717773, 12.4754638671875, 12.4754638671875, 12.4754638671875, 12.4754638671875, 12.4754638671875, 12.4754638671875 ], "content": [ "If you have turned Autocreate schemes off for this project you need to choose Product Manage Schemes and create or ask Xcode to autocreate the scheme for the new target .", "But i have manually goto Product- Schemes- Edit Scheme- Manage Schemes and add the schemes for all build configs .", "Then I created the environment variable for my scheme in Xcode .", "PS it probably doesn t help that I m really confused about the relationship between targets schemes and configurations in Xcode .", "It opens with only default scheme and Live Staging schemes are not visible .", "Now xcode shows schemes only on my system and when I send code to another machine in zip-format .", "When you said without manually selecting and running individual schemes I thought you meant the Scheme Editor .", "I created the environment variable for my current scheme in Xcode : .. . .. .", "If I create another scheme that runs both of these schemes then that new scheme will have its own build configuration .", "Only CocoaPods schemes available .", "There is nothing to do with new schemes .", "I would like to have one project and two different schemes so that another person in my team can just change the scheme and get the kind of library they want .", "Xcode normally creates a scheme for the new target automatically .", "I created two schemes in a project .", "Xcode runs tests based on what test targets are included and enabled in a scheme .", "enter image description here http : i.stack.imgur.com MoNLd.png Open scheme editor select scheme near stop button - Scheme Editor and check Shared for schemes you want to share then commit new files or so", "Is there a way to run the unit tests in a debug build and performance tests in a release build without manually selecting and running individual schemes", "Although it s showing build configuration that I made to differentiate between schemes .", "http : stackoverflow.com questions 1371351 add-files-to-an-xcode-project-from-a-script .. . .. . Modify scheme and add pre-action Your schemes also allow you to add pre-actions to your build and you can do the same as above but have it configured as a pre-action instead of a build phase script .", "I am automating the process of Build configuration where-in we have different environments like Development Staging UAT Prod .", "These links might help : Add files to an Xcode project from a script", "Xcode will allow me to run my application as root the Debug Process As option in the scheme allows you to select Me or root .", "For that you click your scheme with the left mouse button to open the scheme editor and to find the table for the environment-variables .", "I m using Xcode 4.6.3 .", "What version of Xcode", "But then I updated my xcode to 5.1 .", "You mean Xcode 5.0.2 not 5.2 .", "I mean you know how theres 6 different build commands .", "https : github.com krzysztofzablocki crafter .. . .. . But what we are missing here is adding the build configs to schemes .", "My Xcode Project is set up with a beta scheme and a distribution scheme so I can include a number of debug features in the beta version using a custom flag lots of ifndef PROD in the debug code .", "Since the build configuration applies to all targets in the scheme you need to find a way to trick Xcode into building your target with both Debug and Release configuration .", "It must be different than the iOS library name .", "There are a few different things you might try .", "I am running a script in my XCode project in the Scheme s Build- Post-actions Run Script .", "http : stackoverflow.com questions 13340823 how-to-make-xcode-run-a-script-before-dependencies https : www.objc.io issues 6-build-tools build-process Xcode : Running a script before every build that modifies source code directly http : stackoverflow.com questions 976454 xcode-running-a-script-before-every-build-that-modifies-source-code-directly but you could also google for xcode run script before build for more links .", "Here are a few links that might help : how to make xcode run a script before dependencies", "Both schemes point to the same target which relies on the new build config to toggle behavior .", "I feel like I must be fundamentally misunderstanding targets and schemes to get this kind of behavior .", "An external SDK we re implementing requires its app key to be set in the Info.plist but requires separate keys for debug enterprise distribution and release schemes .", "Live and staging and it s working fine for my xcode 5.0 .", "XcodeEditor https : github.com appsquickly XcodeEditor lib allows to manipulate Xcode projects so you might create something to automate add-remove SDK physically .", "You could use different test bundles and include exclude what you want .", "Using crafter i am able to generate different build configs for my project .", "What I mean is creating your own custom test targets bundles and using the Xcode Test Navigator .", "Note that Xcode automatically created a .m file with the same name as the OS X library target .", "Xcode run script executed before app build This is a script that is automatically executed before you build .", "Supposedly I was to copy XcodeColors into the Xcode plug-ins path : .. . .. . Library Application Support Developer Shared Xcode Plug-ins .. . .. . Not only the Plug-ins folder did not exist but the whole folder chain starting with Developer was not there .", "Set the debug configuration of this new target to the aforementioned xcconfig file of the release configuration that is basically the part where we fool Xcode .. . 4 .", "Testing with Xcode - Quick Start https : developer.apple.com library prerelease content documentation DeveloperTools Conceptual testing with xcode chapters 02-quick start.html apple ref doc uid TP40014132-CH2-SW1 .. . .. . Testing with Xcode - Running Tests and Viewing Results https : developer.apple.com library prerelease content documentation DeveloperTools Conceptual testing with xcode chapters 05-running tests.html .. . .. . There are several additional interactive ways to run tests .", "I used the first option of the installation instructions https : github.com robbiehanson XcodeColors xcodecolors-installation-instructions-for-xcode-4 .", "In the test configuration for the unit test scheme I selected debug build and for the performance test scheme I selected release build .", "I am now doing with configuration and scheme also to separate App ID etc .", "just like we normally use scheme and preprocessor to separate debug release or staging etc", "I have a unit test and a performance test scheme .", "Hope that helps .", "But for another reason http : stackoverflow.com questions 6703054 xcode-4-creating-a-uiview-xib-not-properly-connecting rq 1 I removed all the DerivedData for my project restarted Xcode and then voil : I have not been so happy to see an ERROR warning yet - it was red .", "For another reason http : stackoverflow.com questions 6703054 xcode-4-creating-a-uiview-xib-not-properly-connecting rq 1 I removed all the DerivedData for my project restarted Xcode and then voil : I have not been so happy to see an ERROR warning yet - it was red .", "The test navigator allows you to directly control which test targets classes and methods are included enabled or disabled in a scheme without having to use the scheme editor .", "The solution for this - maybe obviously at this point - is to use two different facebook-apps so that iOS can route the returning OAuth response to the proper app .", "somehow define if BETA VERSION similar to the global DEBUG variable and I d like to be able to differentiate it with a separate app icon on the springboard as well as a different app name i.e .", "The main problem I see is the desired build configuration for the test action of the scheme .", "But when I switch to one of those branches the scheme to run the app is missing .", "Why not use a test-flight only scheme that has a Flags build setting", "If I run each scheme individually I get a debug build and a release build respectively .", "If I set a build configuration of debug for this new scheme then I will get a debug build for my performance tests as well .", "When I switch to another branch then it s ok this scheme is present and I can run the app successfully .", "Oh and regarding the app icon if you use asset catalogs you can use the Asset Catalog App Icon Set Name build setting to different icons for each build configuration .", "In your code you can then do the following : .. . .. . You can define additional build settings per-configuration in the User-Defined category at the bottom of the build settings in Xcode and then reference them in your Info.plist file .", "For now least irritating way I found to achieve this after wasting lots of hours is by changing the WatchOS app to behave like a framework so Xcode provides the Build phases section .", "hope it helps for some readers .", "It is easier to use URL Scheme Suffix instead of separate Facebook apps .", "That way the Facebook url-scheme knows which app to open after authentication .", "Thanks running Instruments as root worked .", "Export the release configuration for your target into an xcconfig file xcodebuild -scheme schemeName -showBuildSettings release.xcconfig and make sure it only contains the release settings .. . 2 .", "Add the original and the newly created target to the build action of your scheme and add the test bundles assuming they reside in a separate test bundle .. . 5 .", "As described in the linked answer I ve created a new scheme defined a new Enterprise build configuration and set up the enterprise scheme to use a separate and new bundle id .", "When fb returned it would call the url-scheme denoted by fb app-id .. . iOS decided consistently to open the app that was first-installed that would respond to that URL scheme .", "Can anyone help me", "The setup is a bit fragile as you need to add new source files to both targets .", "Maybe this helps : stackoverflow.com questions 27297435 http : stackoverflow.com questions 27297435 detect-if-ios-app-is-downloaded-from-apples-testflight", "I m not sure I understand how this would help .", "You can enable and disable test bundles classes and methods selectively by Control-clicking the items in the test navigator list and choosing Enable or Disable from the shortcut menu thereby enabling or disabling the items in the scheme .", "enter image description here http : i.stack.imgur.com W8Zsc.png .. . .. . Not sure if this is what you re wanting but this is the only option I can think of for testing without going up to the Scheme Editor .", "If you test your scheme it should now build the sources in both debug and release and should run your unit tests on the debug build configuration and the performance tests on the release configuration .", "The beta scheme also has a separate bundle-identifier and bundle display name so that beta and distribution can live side-by-side on a tester s phone separate icons etc .", "With URL Scheme Suffix you can add suffixes to the bundle id for example : com.example.App.live and com.example.App.beta .", "possible duplicate of How to tell at runtime whether an iOS app is running through a TestFlight Beta install http : stackoverflow.com questions 26081543 how-to-tell-at-runtime-whether-an-ios-app-is-running-through-a-testflight-beta-i", "For example you could define a custom BUNDLE ID build setting that s different for Release Beta and Debug builds and then set the value of CFBundleIdentifier in your Info.plist file to BUNDLE ID which would allow you to install Release Beta and Debug builds side-by-side on your device .", "I ve tried reading through this article http : blog.consumedbycode.com unique-icons-for-debug-beta-and-app-store-builds-in-xcode-5 but I couldn t get it to work and I inadvertently messed up all my provisioning profiles when going through the instructions .", "Thanks a lot Pawel..I did try this before it didn t work but now it works....May be previously I was trying before copying my provisioning profiles to Library Developer Xcode Server ProvisioningProfiles..So sorry as I don t have too much reputation i.e .", "Any help would be greatly appreciated .", "image : setting XcodeColors YES environment variable http : i.stack.imgur.com Ao9gl.png .. . .. . and eagerly ran my program .", "@RomanSalabay I have put in an answer maybe that will help .", "In your info.plist change the value of your FacebookAppID to be FACEBOOK ID .. . In your URL Types change the facebook scheme to be fb FACEBOOK ID .. . This should successfully route your facebook-login .", "I am doing enterprise app and it need to submit to App Store also .", "Before I submit to App Store I need to delete hockey SDK and others .", "It is quite painful to remember to delete .", "Is there a way to automatically delete those files when I submit to app-store", "Two thoughts : 1 .", "just wrap ifdef - endif all calls to HockeyApp SDK with some custom flag you have defined for Debug and AdHoc build configuration ." ] }
{ "confidence": [ 58.96770095825195, 57.56496810913086, 55.03657150268555, 54.294124603271484, 53.869598388671875, 51.26287078857422, 41.76960754394531, 37.656558990478516, 35.7498779296875, 34.83495330810547, 33.93799591064453, 32.25304412841797, 30.071884155273438, 28.986839294433594, 23.81104850769043, 23.275203704833984, 19.7509822845459, 19.35045623779297 ], "content": [ "Question : I created two schemes in a project . Live and staging and it s working fine for my xcode 5.0 . But then I updated my xcode to 5.1 . Now xcode shows schemes only on my system and when I send code to another machine in zip-format . It opens with only default scheme and Live Staging schemes are not visible . Although it s showing build configuration that I made to differentiate between schemes . Any ideas for this problem Comment : You mean Xcode 5.0.2 not 5.2 . Comment : sorry I edited it . updated it to 5.1 . .. . Answer : enter image description here http : i.stack.imgur.com MoNLd.png Open scheme editor select scheme near stop button - Scheme Editor and check Shared for schemes you want to share then commit new files or so Comment : @trojanfoe just preparing image", "Question : Is there a way to run the unit tests in a debug build and performance tests in a release build without manually selecting and running individual schemes I have a unit test and a performance test scheme . In the test configuration for the unit test scheme I selected debug build and for the performance test scheme I selected release build . If I run each scheme individually I get a debug build and a release build respectively . If I create another scheme that runs both of these schemes then that new scheme will have its own build configuration . If I set a build configuration of debug for this new scheme then I will get a debug build for my performance tests as well . .. . Answer : You could use different test bundles and include exclude what you want . What I mean is creating your own custom test targets bundles and using the Xcode Test Navigator . So for example creating a MyUnitBundleTests target and a MyPerformanceBundleTests target . They would be two separate test bundles where you choose to included exclude classes methods etc . The Test Navigator displays a hierarchical list of the test bundles and associated classes and methods etc included in a project . You can enable and disable test bundles classes and methods selectively by Control-clicking the items in the test navigator list and choosing Enable or Disable from the shortcut menu thereby enabling or disabling the items in the scheme . Testing with Xcode - Quick Start https : developer.apple.com library prerelease content documentation DeveloperTools Conceptual testing with xcode chapters 02-quick start.html apple ref doc uid TP40014132-CH2-SW1 .. . .. . Testing with Xcode - Running Tests and Viewing Results https : developer.apple.com library prerelease content documentation DeveloperTools Conceptual testing with xcode chapters 05-running tests.html .. . .. . There are several additional interactive ways to run tests . Xcode runs tests based on what test targets are included and enabled in a scheme . The test navigator allows you to directly control which test targets classes and methods are included enabled or disabled in a scheme without having to use the scheme editor . .. . .. . enter image description here http : i.stack.imgur.com W8Zsc.png .. . .. . Not sure if this is what you re wanting but this is the only option I can think of for testing without going up to the Scheme Editor . Comment : I m not sure I understand how this would help . I currently have 2 targets - one built for performance one for testing . I can run either one but I can t run both . The test navigator shows the not selected target as gray and I have to manually switch to it in order to be able to run it . Comment : Hi . When you said without manually selecting and running individual schemes I thought you meant the Scheme Editor .", "Question : I am trying to build a library for inclusion in other iOS Mac OS X projects . I currently have two separate projects that I switch between to build the library . I would like to have one project and two different schemes so that another person in my team can just change the scheme and get the kind of library they want . I would like to avoid having to manually add a new file to each separate project individually when I need to do so . Thoughts .. . Answer : 1 . Open your iOS project . 2 . Choose File New Target from the menu bar . 3 . Click Framework Library in the OS X section . 4 . Choose the Cocoa Library target . 5 . Enter a name for the OS X version of the library . It must be different than the iOS library name . Example : MyLibraryOSX . 6 . Maybe change the type to Static . 7 . Click Finish . 8 . Select your project itself in the Project Navigator . 9 . Click on the new OS X library target in the TARGETS section . 10 . Click on the Build Phases tab . 11 . Open the Compile Sources section . 12 . Note that Xcode automatically created a .m file with the same name as the OS X library target . You may wish to delete this from your project . 13 . Add your library sources to the Compile Sources section . Xcode normally creates a scheme for the new target automatically . If you have turned Autocreate schemes off for this project you need to choose Product Manage Schemes and create or ask Xcode to autocreate the scheme for the new target . Comment : Thank you for your quick response this did what I needed to do .", "Question : null .. . Answer : I am automating the process of Build configuration where-in we have different environments like Development Staging UAT Prod . I have already got a great auto generation project called crafter which does a lot of automation for me . https : github.com krzysztofzablocki crafter .. . .. . But what we are missing here is adding the build configs to schemes . Using crafter i am able to generate different build configs for my project . But i have manually goto Product- Schemes- Edit Scheme- Manage Schemes and add the schemes for all build configs . So is it possible to automate this process Is so how and can this be added to the crafter project itself . I am working on this so if got the solution will post it here .", "Question : Is there a way to run the unit tests in a debug build and performance tests in a release build without manually selecting and running individual schemes I have a unit test and a performance test scheme . In the test configuration for the unit test scheme I selected debug build and for the performance test scheme I selected release build . If I run each scheme individually I get a debug build and a release build respectively . If I create another scheme that runs both of these schemes then that new scheme will have its own build configuration . If I set a build configuration of debug for this new scheme then I will get a debug build for my performance tests as well . .. . Answer : There might be a way to achieve the desired behaviour but it is more of a hack . The main problem I see is the desired build configuration for the test action of the scheme . Since the build configuration applies to all targets in the scheme you need to find a way to trick Xcode into building your target with both Debug and Release configuration . That being said here is the idea : .. . .. . 1 . Export the release configuration for your target into an xcconfig file xcodebuild -scheme schemeName -showBuildSettings release.xcconfig and make sure it only contains the release settings .. . 2 . Create another target for your performance tests that builds the same source files .. . 3 . Set the debug configuration of this new target to the aforementioned xcconfig file of the release configuration that is basically the part where we fool Xcode .. . 4 . Add the original and the newly created target to the build action of your scheme and add the test bundles assuming they reside in a separate test bundle .. . 5 . Select the debug build configuration for the test action . If you test your scheme it should now build the sources in both debug and release and should run your unit tests on the debug build configuration and the performance tests on the release configuration . The setup is a bit fragile as you need to add new source files to both targets . You should be able to automate the process using a ruby script and the xcodeproj gem though . Hope that helps .", "Question : My application s Info.plist file has around 20 30 keys inside . An external SDK we re implementing requires its app key to be set in the Info.plist but requires separate keys for debug enterprise distribution and release schemes . Is there a way I can create conditional additions to the Info.plist without having to maintain three duplicates of the file and duplicate all of the other keys which are identical across all targets Basically what I d like is the base plist exactly as it is now then additional new -Debug -Distribution and Release ones which just contain this new key . What I m trying to avoid is repetition of all keys since it will make adding new ones in future a hassle . Is this possible .. . Answer : There are a few different things you might try . Xcode run script executed before app build This is a script that is automatically executed before you build . Let s say the 3 duplicate plist files are called InfoA.plist InfoB.plist and InfoC.plist which are all exact duplicate . When you build the project the contents of InfoA.plist are duplicated to InfoB.plist and InfoC.plist . This would require some knowledge of writing a shell script to do that but the script is fairly simple . You could duplicate and rename the files in the script . Or you could use command-line tools to copy the contents of the main file to the duplicate files . Two command-line utilities you can use to modify the contents of plist files are plutil and https : developer.apple.com library mac documentation Darwin Reference ManPages man8 PlistBuddy.8.html . These links might help : Add files to an Xcode project from a script http : stackoverflow.com questions 1371351 add-files-to-an-xcode-project-from-a-script .. . .. . Modify scheme and add pre-action Your schemes also allow you to add pre-actions to your build and you can do the same as above but have it configured as a pre-action instead of a build phase script . Here are a few links that might help : how to make xcode run a script before dependencies http : stackoverflow.com questions 13340823 how-to-make-xcode-run-a-script-before-dependencies https : www.objc.io issues 6-build-tools build-process Xcode : Running a script before every build that modifies source code directly http : stackoverflow.com questions 976454 xcode-running-a-script-before-every-build-that-modifies-source-code-directly but you could also google for xcode run script before build for more links .", "Question : null .. . Answer : I m in the middle of transitioning from TestFlight s native app to Apple s TestFlight through iTunes Connect . My Xcode Project is set up with a beta scheme and a distribution scheme so I can include a number of debug features in the beta version using a custom flag lots of ifndef PROD in the debug code . The beta scheme also has a separate bundle-identifier and bundle display name so that beta and distribution can live side-by-side on a tester s phone separate icons etc . With Apple s TestFlight the bundle ID needs to be the same for beta and for distribution . Because of that I can t include any of the debug features in my current arrangement . I m looking for a way around this . One possibility I thought of was to create another app in iTunes Connect solely for testing but that seems dirty . Is there a conditional or a way to test in the code whether the current build is a TestFlight build or a distribution build Or is there a better way to handle this Thanks in advance Comment : Why not use a test-flight only scheme that has a Flags build setting Comment : @matt : He is asking about iTunes Connect beta-testing . There is nothing to do with new schemes . You need to upload the build with distribution profile for beta-testing . Comment : Maybe this helps : stackoverflow.com questions 27297435 http : stackoverflow.com questions 27297435 detect-if-ios-app-is-downloaded-from-apples-testflight Comment : possible duplicate of How to tell at runtime whether an iOS app is running through a TestFlight Beta install http : stackoverflow.com questions 26081543 how-to-tell-at-runtime-whether-an-ios-app-is-running-through-a-testflight-beta-i", "Question : Using CoconutKit https : github.com defagos CoconutKit I wanted to see all their logs in color . Sadly I did not get XcodeColors https : github.com robbiehanson XcodeColors to run . Supposedly I was to copy XcodeColors into the Xcode plug-ins path : .. . .. . Library Application Support Developer Shared Xcode Plug-ins .. . .. . Not only the Plug-ins folder did not exist but the whole folder chain starting with Developer was not there . I created all of the folders and put the files where they nominally belonged . I created the environment variable for my current scheme in Xcode : .. . .. . image : setting XcodeColors YES environment variable http : i.stack.imgur.com Ao9gl.png .. . .. . and eagerly ran my program . No colored debug logs . Any ideas why that could be Thanks A . .. . .. . Edit : The first answer was quite correct . Still it did not work . But for another reason http : stackoverflow.com questions 6703054 xcode-4-creating-a-uiview-xib-not-properly-connecting rq 1 I removed all the DerivedData for my project restarted Xcode and then voil : I have not been so happy to see an ERROR warning yet - it was red . image : debugger text with a red ERROR warning and the crash log http : i.stack.imgur.com aezsl.png Comment : can you provide a more clear steps as to how you got it to work please Comment : I used the first option of the installation instructions https : github.com robbiehanson XcodeColors xcodecolors-installation-instructions-for-xcode-4 . Then I created the environment variable for my scheme in Xcode . For that you click your scheme with the left mouse button to open the scheme editor and to find the table for the environment-variables . Then if it still does not work as in my case delete all the derived data for your project . It worked for me after that . If you need more info pose a separate question please . .. . Answer : The installation instructions https : github.com robbiehanson XcodeColors for XcodeColors state : .. . .. . i.e . your home-directory not the global directory Library Application Support Developer .. . . Comment : Thank you for this information . It made me find out how to show hidden-files http : lifehacker.com 188892 show-hidden-files-in-finder in Finder curtesy of Gina http : gina.kinja.com . There must be something else as well because it still does not work . In the hidden library there already was a folder named Xcode but it was a sibling of the folder called Shared . There was not yet a folder named Xcode inside the folder Shared so I copied that . Apart from typos what else could I have missed Comment : @AOphagen You might be best approaching the author of XcodeColors he s likely to have seen this issue many times . Comment : Thank you . For another reason http : stackoverflow.com questions 6703054 xcode-4-creating-a-uiview-xib-not-properly-connecting rq 1 I removed all the DerivedData for my project restarted Xcode and then voil : I have not been so happy to see an ERROR warning yet - it was red . I am giving you answer the green thumbs up now . Comment : for other readers who tries to find this folder the library folder is hidden in mac . u need to unhide it . and the home-directory normally it means the user s home-directory e.g . mike would be the user mike s home-directory . hope it helps for some readers . Comment : Start Terminal.app and type chflags nohidden Library .", "Question : I m trying to follow the convention described in this answer http : stackoverflow.com questions 10796159 manage-ios-enterprise-developer-program to manage both an app-store and enterprise version of the same app but am seeing some really interesting behavior . As described in the linked answer I ve created a new scheme defined a new Enterprise build configuration and set up the enterprise scheme to use a separate and new bundle id . Both schemes point to the same target which relies on the new build config to toggle behavior . I am successfully able to generate an enterprise build and distribute it over-the-air however when I install both versions of the same app on the same simulator or phone the enterprise version actually runs the app-store version of the app . Any changes that I make that are enterprise specific do not get reflected . Even when I close the app - the iOS7 animation back to the home screen animates back to the app-store icon - not the enterprise one . Obviously I want to be able to maintain these as separate versions that run independently . I feel like I must be fundamentally misunderstanding targets and schemes to get this kind of behavior . Any help would be greatly appreciated . .. . Answer : Pretty interesting bug . What was happening was : .. . .. . We were using facebook-login to authenticate with our own services on the enterprise version . The FB SDK would take over and kick out to a web view or the fb app depending on it s own logic . Critically - we were using the same facebook app configured on their developer site . When fb returned it would call the url-scheme denoted by fb app-id .. . iOS decided consistently to open the app that was first-installed that would respond to that URL scheme . In most cases this was the app-store version NOT the enterprise version . The solution for this - maybe obviously at this point - is to use two different facebook-apps so that iOS can route the returning OAuth response to the proper app . In keeping with the answer that I was originally working off this is best done by.. . .. . .. . Creating a new user defined build setting entitled FACEBOOK ID .. . Use your production app-id for Debug and Release while using the new id for Enterprise . In your info.plist change the value of your FacebookAppID to be FACEBOOK ID .. . In your URL Types change the facebook scheme to be fb FACEBOOK ID .. . This should successfully route your facebook-login . Keep in mind this is a general potential bug for ALL deep links - not just facebook-login .", "Question : null .. . Answer : I ve run into one thing I ve never seen before . Throughout this week I ve worked with several branches in my project and they all have been committed and pushed to the origin and now when I m home I decided to work for a while . But when I switch to one of those branches the scheme to run the app is missing . Only CocoaPods schemes available . This is how it looks : .. . .. . enter image description here http : i.stack.imgur.com j5xL1.png .. . .. . It s only on one particular branch . When I switch to another branch then it s ok this scheme is present and I can run the app successfully . What s that How to fix it", "Question : I m trying to follow the convention described in this answer http : stackoverflow.com questions 10796159 manage-ios-enterprise-developer-program to manage both an app-store and enterprise version of the same app but am seeing some really interesting behavior . As described in the linked answer I ve created a new scheme defined a new Enterprise build configuration and set up the enterprise scheme to use a separate and new bundle id . Both schemes point to the same target which relies on the new build config to toggle behavior . I am successfully able to generate an enterprise build and distribute it over-the-air however when I install both versions of the same app on the same simulator or phone the enterprise version actually runs the app-store version of the app . Any changes that I make that are enterprise specific do not get reflected . Even when I close the app - the iOS7 animation back to the home screen animates back to the app-store icon - not the enterprise one . Obviously I want to be able to maintain these as separate versions that run independently . I feel like I must be fundamentally misunderstanding targets and schemes to get this kind of behavior . Any help would be greatly appreciated . .. . Answer : It is easier to use URL Scheme Suffix instead of separate Facebook apps . With URL Scheme Suffix you can add suffixes to the bundle id for example : com.example.App.live and com.example.App.beta . That way the Facebook url-scheme knows which app to open after authentication . See the documentation on Facebook s developer site for more into : https : developers.facebook.com docs ios troubleshooting sharedappid", "Question : Xcode will allow me to run my application as root the Debug Process As option in the scheme allows you to select Me or root . How can I run it through the profiler as root I m using Xcode 4.6.3 . Comment : What version of Xcode Comment : @trojanfoe I edited the question Comment : I don t think you can unless you run Instruments as root i.e . sudo open Path To Instruments.app and attach to the process . Comment : Thanks running Instruments as root worked . I had to do sudo Applications Xcode.app Contents Applications Instruments.app Contents MacOS Ins truments instead of open though Comment : i have install helperTool successfully still github.com halo macosvpn https : github.com halo macosvpn socurce code not store password in System Keychain on Debug Process as Me . Can anyone help me .. . Answer : The solution is to run Instruments as root and attach to the process . To run Instruments as root : sudo Applications Xcode.app Contents Applications Instruments.app Contents MacOS Ins truments", "Question : null .. . Answer : I am doing enterprise app and it need to submit to App Store also . Before I submit to App Store I need to delete hockey SDK and others . It is quite painful to remember to delete . I am now doing with configuration and scheme also to separate App ID etc . Is there a way to automatically delete those files when I submit to app-store just like we normally use scheme and preprocessor to separate debug release or staging etc Comment : Two thoughts : 1 . just wrap ifdef - endif all calls to HockeyApp SDK with some custom flag you have defined for Debug and AdHoc build configuration . So for Release configurations those calls are not compiled . 2 . XcodeEditor https : github.com appsquickly XcodeEditor lib allows to manipulate Xcode projects so you might create something to automate add-remove SDK physically .", "Question : I m trying to create a way to be able to distribute a beta version of my app via Testflight without overwriting the production version . I d like to be able to know in the code whether it s a beta build or a production build i.e . somehow define if BETA VERSION similar to the global DEBUG variable and I d like to be able to differentiate it with a separate app icon on the springboard as well as a different app name i.e . MyApp Beta or similar . I set up a beta configuration by duplicating my release configuration and I already have a provisioning-profile for AdHoc builds I ve been distributing via Testflight for the last six months or so . I know that to change the app name I need to change the bundle display name property in the project s plist file but I m not really sure how to make a separate profile to hold all of these changes . I ve tried reading through this article http : blog.consumedbycode.com unique-icons-for-debug-beta-and-app-store-builds-in-xcode-5 but I couldn t get it to work and I inadvertently messed up all my provisioning profiles when going through the instructions . I ve been struggling with this for a few weeks now . The details of this process are pretty opaque so any detailed instructions or pointers are particularly appreciated . Thank you in advance PS it probably doesn t help that I m really confused about the relationship between targets schemes and configurations in Xcode . .. . Answer : I use three configurations in my project : Release Beta and Debug where Beta is a duplicate of Release . In each of the three configurations I m including the following in my target s build settings : .. . .. . What this will do is define a separate preprocessor macro for each configuration . In your code you can then do the following : .. . .. . You can define additional build settings per-configuration in the User-Defined category at the bottom of the build settings in Xcode and then reference them in your Info.plist file . For example you could define a custom BUNDLE ID build setting that s different for Release Beta and Debug builds and then set the value of CFBundleIdentifier in your Info.plist file to BUNDLE ID which would allow you to install Release Beta and Debug builds side-by-side on your device . Update : .. . .. . If you want to see a good example of how to set all of this up check out the project configuration in Cheddar for iOS https : github.com nothingmagical cheddar-ios . Comment : The User-Defined area is at the bottom of your target s build settings . Click on the project file in the left sidebar then click on your target select the Build Settings tab and scroll all the way down . If you don t see the section click the + at the top of the screen next to Levels . You should see something like this : cl.ly image 142Y1G3H2U3i http : cl.ly image 142Y1G3H2U3i Comment : The Preprocessor Macros setting is the right one to use for GCC PREPROCESSOR DEFINITIONS the latter is just the raw key you would use in a .xcconfig file . Comment : Nope no wildcard necessary . Just define BUNDLE ID to be whatever you want in your build setting and then replace the value of CFBundleIdentifier with the string BUNDLE ID in your Info.plist file . Comment : If your bundle IDs all use the same prefix you should be able to use your team provisioning-profile to install all of your test apps on devices . Otherwise you can create separate app IDs and provisioning profiles in the developer portal . Comment : Oh and regarding the app icon if you use asset catalogs you can use the Asset Catalog App Icon Set Name build setting to different icons for each build configuration . If you don t use asset catalogs you ll need to define another custom build setting with your icon file names and include them in your Info.plist . Here s what the asset catalog build settings look like : cl.ly image 0U3a2I1K0738 http : cl.ly image 0U3a2I1K0738", "Question : I have a project with a WatchOS2 target along with an Extension . I want to duplicate both the WatchOS App target and the extension . However when I duplicate the WatchOS App target it is still linked to the old extension . Since we no longer have access to build phases for WatchOS App I cannot change it in the Embed App Extension Phase . Inital State .. . .. . WatchAppTarget1 Embed Extension - WatchAppExtension1 .. . WatchAppExtension1 .. . .. . Final State .. . .. . WatchAppTarget1 Embed Extension - WatchAppExtension1 .. . WatchAppExtension1 .. . WatchAppTarget-Duplicate Embed Extension still pointing to - WatchAppExtension1 .. . WatchAppExtension-Duplicate .. . .. . Is there anyway of changing the WatchOS App Target to accept the duplicated Extension as its choice to embed other than manually editing the .pbxproj Comment : I m facing the same problem . Did you manage to resolve it Comment : @RomanSalabay I have put in an answer maybe that will help . .. . Answer : For now least irritating way I found to achieve this after wasting lots of hours is by changing the WatchOS app to behave like a framework so Xcode provides the Build phases section . Open the project.pbxproj in a text-editor go to the section which goes like Begin PBXNativeTarget section find your WatchOS target the one you want to change in the configuration it should have a line : .. . .. . productType com.apple.product-type.application.watchapp2 .. . .. . Change this to : .. . .. . productType com.apple.product-type.application OR productType com.apple.product-type.framework .. . .. . Now open the project in Xcode you should be apple to see the Build Phases section go there and remove the old extension references in Target Dependencies and Embed App Extension and replace it with the new ones . Once you are done go back to the project.pbxproj and undo your change and make the WatchOS target back to productType com.apple.product-type.application.watchapp2 .. . .. . Sometimes you might have to make a fresh build scheme for both the WatchOS and the iOS app but this should do the trick Comment : It works like a charm Comment : Thanks have been struggling with this for hours .", "Question : I am running a script in my XCode project in the Scheme s Build- Post-actions Run Script . It runs fine but I would like to see the console output of that script . It doesn t seem to be included in the Log Navigator tab where can I find this log .. . Answer : The output from those scripts doesn t seem to be logged anywhere by default . Your best bet is to manually redirect the output of the script to a known location . For example add the following as the first line of your script : .. . .. . This will redirect all following output to stdout and stderr to your specified log file .", "Question : My integration succeeded but archive fails every-time with following warning mentioned below - : .. . Answer : I had the same problem . In my case the code-signing was set to automatic . When I change it to an distribution certificate it worked . Comment : Thanks a lot Pawel..I did try this before it didn t work but now it works....May be previously I was trying before copying my provisioning profiles to Library Developer Xcode Server ProvisioningProfiles..So sorry as I don t have too much reputation i.e . 15 is required I can t vote up for you..but whenever I will have I ll do it for you..Cheers Comment : What I have noticed in the build log Library Developer XcodeServer IntegrationAssets 0bf59b5e7af4ba98e99d13d1a80 f2b28 Bot 1 build.log Command usr bin codesign trying to sign my app with OS X Developer certificate which is created by Xcode server I guess and archive is getting failed because I don t have private key for that. .", "Question : null .. . Answer : So what i need to do is set a value of a string to either Value1 or Value2 depending upon if the program was created using the Archive commans . So what i think i need to do is check for if the current run command is using the archive build . I mean you know how theres 6 different build commands . Build Run Test Profile Analyze Archive . I need a certain string to be set to this value once the code is created using the Archive command . So if anyone has any ideas on how to do it can you inform the rest of us thanks ." ] }
[ "yes-answer-long", "yes-answer-short" ]
debugging
UNK_RELATION
xml-validation@xml@48
xml-validation -- the procedure of checking an @placeholder document against some kind of schema that describes rules that this type of document must conform to .
{ "confidence": [ 45.22164535522461, 41.96611785888672, 41.27321243286133, 39.77701187133789, 38.709983825683594, 38.379234313964844, 38.00199890136719, 37.64662170410156, 37.60626983642578, 37.290016174316406, 37.17612838745117, 36.948184967041016, 36.70025634765625, 36.186302185058594, 36.184722900390625, 35.68150329589844, 35.59654235839844, 35.57293701171875, 35.5694465637207, 35.02473831176758, 34.539791107177734, 34.46573257446289, 34.32548904418945, 34.142333984375, 34.076080322265625, 33.82198715209961, 33.77334213256836, 33.383544921875, 33.366668701171875, 33.147220611572266, 33.147220611572266, 33.14290237426758, 32.99598693847656, 32.887420654296875, 32.64497756958008, 32.61732482910156, 32.5137939453125, 32.403656005859375, 32.388916015625, 32.27676010131836, 31.9229736328125, 31.860305786132812, 31.76888656616211, 31.564586639404297, 31.51361083984375, 31.336917877197266, 31.19713592529297, 31.14845085144043, 31.11770248413086, 31.005615234375, 30.833629608154297, 30.724767684936523, 30.660781860351562, 30.423065185546875, 30.272296905517578, 30.2547607421875, 30.199844360351562, 30.181095123291016, 30.13753890991211, 30.05864143371582, 30.03411102294922, 29.824249267578125, 29.759159088134766, 29.74781608581543, 29.686920166015625, 29.52511215209961, 29.49188804626465, 29.431713104248047, 29.356338500976562, 29.342342376708984, 29.289630889892578, 29.28557586669922, 29.17426300048828, 29.084251403808594, 29.01558494567871, 28.858264923095703, 28.819942474365234, 28.807010650634766, 28.725736618041992, 28.6851806640625, 28.637277603149414, 28.583206176757812, 28.55774688720703, 28.55774688720703, 28.425960540771484, 28.407085418701172, 28.407085418701172, 28.333890914916992, 28.213272094726562, 28.107433319091797, 28.080120086669922, 28.011096954345703, 28.011096954345703, 27.99941062927246, 27.996414184570312, 27.9118709564209, 27.78313636779785, 27.722492218017578, 27.65418243408203, 27.558990478515625 ], "content": [ "Validation is the process of checking a document against a DTD more generally against a set of construction rules .", "In addition to the well-formedness rules if an XML document also follows the rules specified in the associated DTD Schema it is said to be a valid XML document .", "For each element type associated with an all element in an XML Schema Document there must be a corresponding element in the corresponding XML instance .", "The parser will then automatically validate the document against this super schema .", "an XML document checked against an XML Schema can be valid without having a DTD .", "UML model rules in addition to a valid XML document .", "No a well-formed XML document doesn t necessarily conform to an XSD .", "First of all the namespaces in the XML Schema document are different .", "There are a couple approaches you can leverage to validate your XML document against an XML schema .", "If an XML document follows all these rules it is said to be well-formed document and XML parsers can be used to parse and process such documents .", "This is a sample XML document I modified some data for Client NDA type reasons sorry for the length .. . .. . Here is some sample code to validate the above Document against the schema .", "It has built-in support for schema validation and can convert Java objects to an XML document and vice-versa .", "@LarsH By definition if an XML document isn t well-formed it can t be checked against a DTD or schema .", "I ve an XML document and I need to come up with xslt to validate certain rules in the XML document .", "One XML document can be valid against some schemas and invalid against others .", "Option A is more recommended which involves parsing the XML document with a DocumentBuilder http : docs.oracle.com javase 1.5.0 docs api javax xml parsers DocumentBuilder.html that has a specific CCD schema source and then checking for validation errors .", "javax.xml.validation APIs .. . .. . The first is to use the javax.xml.validation APIs to validate your document against an XML schema without JAXB .", "I have XBRL based XML document and also SCH file for validation rules .", "You can then use these objects to build an XML document based on this schema .", "XSD defines several ways in which an XSD validator can be requested to assess the schema-validity of a document it does not forbid others : .. . .. . type-driven validation : we can specify a type definition in the schema and a node in the document and ask is this node valid against this type", "I am using XML schema validation to validate XML response against XSD schema .", "Both mean that an XML document adheres to the constraints of an associated schema .", "Valid XML is XML that succeeds validation against a DTD .", "If a XML document is conforming to XML rules all tags started are closed there is a root element etc then it s a well formed XML .", "For document -type stuff relaxng is becoming very popular and for data -type stuff it s W3C XML Schema .", "I am receiving schema validation warning https : www.twilio.com docs api errors 12200 .. . .. . Warning - 12200 .. . .. . Schema validation warning .. . .. . The provided XML does not conform to the Twilio Markup XML schema .", "There are alternatives to XML Schema for validation .", "By default Xerces will ignore a schema document if it already has a schema document for the same namespace .", "Do any of the XML libraries in NPM support the validation of XML against an XSD schema", "element-driven validation : we can specify an element declaration in the schema and an element node in the document and ask is this element valid against this declaration", "lax-wildcard validation : we can specify a node in the document instance and ask is this node valid against its declaration in the schema if any", "Here s my schema : .. . .. . The code for the XML document is : .. . .. . I m using Netbeans to validate .", "If your xml uses namespaces and the document is not in the namespace it is supposed to be by default validation will always pass because the document won t be validated .", "XML schema validation + XMLsignature with xerces in Android http : stackoverflow.com questions 13142567 xml-schema-validation-xmlsignature-with-xerces-in-android", "Valid XML may have elements and attributes with the same name if permitted by an associated schema DTD XSD etc because validity is function of the relationship between an XML document and a schema not an intrinsic property of an XML document .", "XML is valid if it will validate against a DTD or schema .", ".. . .. . Observations : .. . .. . A document that is not well-formed is not XML .", "I posted another similar question with some variation of the input xml document stackoverflow.com questions 9505086 http : stackoverflow.com questions 9505086 xslt-transformation-to-validate-rules-in-xml-document .", "the actual XML Schema validation error .", "I resolved this very error on Java 1.6 with the following line : .. . .. . This allows me to use Jing to validate an XML document against a Compact RELAX NG schema .", "Which means the XML is parsed even if it does not conform to the schema .", "I need to validate it against a xsd document .", "In PHP I am trying to validate an XML document using a DTD specified by my application - not by the externally fetched XML document .", "possible duplicate of schema validation XML http : stackoverflow.com questions 4584080 schema-validation-xml", "I am validating XML documents against a schema .", "The validation checks the XML file against the XSD scheme .", "Well a DTD is a kind of schema for XML .", "Document Type Definitions DTDs or XML Schemas can be used to define the structure and content of a specific class of XML documents .", "I m trying to do XML validation against some XSD in python .", "DTD is the acronym for Document Type Definition .", "An XML document cannot be valid until it is well-formed .", "If I enable MTOM and schema validation I must use the base64Binary type directly however I am trying to conform to a fixed spec where the MTOM field also has a contentType attribute .", "Testing against the general ISO Schematron rules your Schematron document is correct except for the targetNamespace attribute .", "I want to load an XML document in Xerces-C++ version 2.8 under Linux and validate it using a DTD schema not referenced from the document .", "The resulting schema would look like .. . .. . You can then validate a snippet document against this new schema using a code like .. . .. . MySchema.xsd is the original schema SchemaTransform.xslt is the transformation as shown above rootelement.xml is an XML document containing a single snippet node .", "My sys params.xsd begins : .. . .. . My sys params.xml begins : .. . .. . My XML reports this validation error on the xml : .. . .. . Error schema document sys params.xsd has different target namespace from the one specified in instance document http : www.w3schools.com .. . .. . No doubt my code is quite wrong but I need some help to correct it please .", "XML Schema has two ways to identify the type .", "I m playing around with an XML schema and trying to produce a simple valid document that uses it .", "http : www.xmlvalidation.com .. . .. . Be sure to check the Validate against external XML schema Box", "The OWL 2 validation rules are not XML level rules they apply to ontologies written in XML or otherwise .", "stackoverflow.com questions 2396903 http : stackoverflow.com questions 2396903 java-xml-validation-against-xsd-schema", "The DTD specified in the xml document must be a valid url and the XmlReader will download it each time .", "Create an empty document with your DTD then load your target XML into the empty document", ".. . parse an XML document into a DOM tree .. . DocumentBuilder parser DocumentBuilderFactory.newInstance .newDocumentBuilder .. . Document document parser.parse new File instance.xml .. . .. . create a SchemaFactory capable of understanding WXS schemas .. . SchemaFactory factory SchemaFactory.newInstance XMLConstants.W3C XML SCHEMA NS URI .. . .. . load a WXS schema represented by a Schema instance .. . Source schemaFile new StreamSource new File mySchema.xsd .. . Schema schema factory.newSchema schemaFile .. . .. . create a Validator instance which can be used to validate an instance document .. . Validator validator schema.newValidator .. . .. . validate the DOM tree .. . try .. . validator.validate new DOMSource document .. . catch SAXException e .. . instance document is invalid", "Shouldn t the value passed to SchemaFactory.newInstance be XMLConstants.W3C XML SCHEMA NS URI instead as described in stackoverflow.com questions 2396903 http : stackoverflow.com questions 2396903 java-xml-validation-against-xsd-schema", "I suppose the alternative in my case will be to validate the document and then perform a subsequent validation sweep checking for PIs via XPath or something", "This obviously differs from case to case - XML that is valid against one schema won t be valid against another schema even though it is still well-formed .", "So your problem appears to be : how do I make the C schema validator enforce Schematron rules embedded in an XSD schema document", "I wish to link an xml document to its Relax NG description document using the xml-model tag as specified in its W3C draft http : www.w3.org XML 2010 01 xml-model .", "Just because an XML document is an infoset does not mean it conforms to an XSD and is a valid XML document .", "An advise to easy validations is taht you use some XML editor like notepad++ plus xml plug-in or Oxygen and validate against official schema .", "For that you need the namespace URI and the method DOMDocument : : createElementNS Docs http : php.net domdocument.createElementns : .. . .. . This already creates the following XML document : .. . .. . The next part is to add the XML Schema Instance Schemalocation attribute for the validation .", "The online XML Schema Validator http : tools.decisionsoft.com schemaValidate from DecisionSoft allows you to check an XML file against a given schema .", "I was validating an XSD against a XML document and I get this error : .. . .. . cvc-complex-type.2.4.a : Invalid content was found starting with element artSpent : name .", "XML file .. . .. . XML schema", "Unfortunately It is not practical in our environment to have to hard code a schema location in the XML document though .", "I just want to correctly point to the location of the schema from the document to be validated .", "I have a problem while trying to validate an XML file against a XML schema .", ".. . .. . Acronyms .. . .. . CCD Continuity of Care Document .. . .. . CDA Clinical Document Architecture .. . .. . RIM Reference Information Model .. . .. . As a supplementary link a pretty handy online tool for CCD document validation can be found here : https : www.lantanagroup.com validator", ".. . Errors in file xml-schema : 2 : 196 TargetNamespace.2 : Expecting no namespace but the schema document has a target namespace of https : arce.ine.es ARCE ficheros SolicitudEncuesta.xsd .", "There are some XSLT Stylesheets that you can use to validate XML documents against an Schematron schema .", "This is where I think the problem lies : .. . .. . When the code is compiled and ran everything works but no validation is carried out on the XML against the schema .", "In addition the XML document is valid if it meets certain further constraints .", "Relying on the order of the elements in the document feels like an affront to the essence of XML .", "This is part of the XML 1.0 specification and allows one to describe and verify that a given document instance conforms to the set of rules detailing its structure and content .", "The XML document has embedded DTD declaration and it fails .", "but what makes it an infoset as opposed to a vanilla xml document", "I have a situation where we want to validate an XML document held as a byte stream in memory against an XSD placed amongst others in a file system .", "Under those circumstances xmllint quite correctly reports that the root element of the document is not valid against any top-level element declaration in the schema .", "This may then be serialized into text in an XML document but it is the XML infoset that is the reality .", ".. . The returned Schema object assumes that if documents refer to the same URL in the schema location hints they will always resolve to the same schema document .", "I am using libxml2 v2.6.30 for XML validation with XSD schema 1.0 .", "If i add elementFormDefault qualified to schema the XML validation it s OK .", "Assuming that in an xbrl document the first few bytes of the xbrl without the xml-declaration will always start with either be xbrl or xbrli : xbrl .. . .. . Would it be safe to assume that an XBRL document is defined by the root tag of the document to either be xbrl or xbrli : xbrl", "The value of an attribute does not match the type specified by the XML schema .", "XML- Example : .. . .. . Xml Schema :", "What is Schema Validation of WSDL .", "You must to reference the schema on xml root node like this :", "E.g . with Jing we use the RNG2Schtrn.xsl XSLT style sheet to extract the Schematron rules into a separate schema and co-validate against that .", "This usually doesn t look pretty but it s a solution if you have to stick with W3C XML Schema and or if you absolutely must allow non-strict rules to your XML ." ] }
{ "confidence": [ 53.977413177490234, 53.897342681884766, 52.81455612182617, 52.76212692260742, 50.36176681518555, 49.362552642822266, 48.97224807739258, 47.594234466552734, 44.66648864746094, 44.613853454589844, 44.01982116699219, 43.34843063354492, 42.44617462158203, 42.09675598144531, 41.76559066772461, 41.66982650756836, 41.532230377197266, 41.51512145996094, 41.359275817871094, 41.295494079589844 ], "content": [ "Question : Trying to get Xerces-C to validate an XML file against a schema file but with no luck . The constructor below takes in the location of the XML file and the schema file and sets relevent member variables : .. . .. . The area of the constructor where the XML parse is set up is shown below . This is where I think the problem lies : .. . .. . When the code is compiled and ran everything works but no validation is carried out on the XML against the schema . Which means the XML is parsed even if it does not conform to the schema . After checking I have also been able to ascertain that the errorCount value remains 0 for all schemas . Comment : possible duplicate of stackoverflow.com questions 2455071 http : stackoverflow.com questions 2455071 validating-document-in-xerces-c Comment : Maybe you could compare your code with the example codesynthesis.com boris data load-grammar load-grammar-dom.cxx http : codesynthesis.com boris data load-grammar load-grammar-dom.cxx that was discussed in this blog post codesynthesis.com boris blog 2010 03 15 http : www.codesynthesis.com boris blog 2010 03 15 validating-external-schemas-xerces-cxx .. . Answer : You must to reference the schema on xml root node like this :", "Question : I was experimenting with xsi : type and noticed that when the xsi : type attribute is present in the root element then it appears that the root element s name does not play any role in the XSD validation . SSCCE http : sscce.org follows . A.xsd is : .. . .. . Given the above schema the following XML document a.xml is clearly valid against it : .. . .. . What s puzzling is that it Xerces reports that the following instance document a-v2.xml is also valid : .. . .. . To demonstrate that I downloaded Xerces2 for Java from this link http : apache.forthnet.gr xerces j binaries Xerces-J-bin.2.11.0.tar.gz exploded the tarball and placed the following three jar files in a certain location : .. . .. . 1 . xercesImpl.jar .. . 2 . xml-apis.jar .. . 3 . xercesSamples.jar .. . .. . I then wrote this validation script : .. . .. . Invoking the validate script with : .. . .. . .. . demonstrates that Xerces validates both a.xml and a-v2.xml as correct . In contrast xmllint when invoked with : .. . .. . .. . validates the first version but complains about the second : .. . .. . Schemas validity error : Element absurdRootElementName : No matching global declaration available for the validation root . My questions are : .. . .. . does setting the xsi : type mean I can set the root element s name to any value I like without impacting XSD validation outcome which tool is right Xerces or xmllint .. . Answer : Unlike some other validation languages XSD does not define a single simple Boolean-valued concept of validity against a given schema . So the answer to your questions is it depends . XSD defines several ways in which an XSD validator can be requested to assess the schema-validity of a document it does not forbid others : .. . .. . type-driven validation : we can specify a type definition in the schema and a node in the document and ask is this node valid against this type In that case an xsi : type attribute on the element node we specified will not override the type we specified . I almost said it will have no effect but it can : if xsi : type is specified its value must name a type actually present in the schema if there is no top-level type with the indicated QName the xsi : type attribute is invalid and its parent will be invalid . element-driven validation : we can specify an element declaration in the schema and an element node in the document and ask is this element valid against this declaration In that case the element instance will be validated against the element declaration we have specified . An xsi : type attribute on the element node we specified will in the absence of errors override the type specified . If the type specified in the instance cannot be found in the schema or if it s found but is not validly derived from the declared type or if some other rules are violated then there will be validity issues . attribute-driven validation doesn t apply in the case you re talking about it involves specifying an attribute declaration in the schema and an attribute node in the instance and asking is this attribute instance valid against this attribute declaration . lax-wildcard validation : we can specify a node in the document instance and ask is this node valid against its declaration in the schema if any In lax-wildcard validation the expectation is that at the application level a valid node counts as success an invalid node counts as failure and a node whose validity is unknown because there is no such declaration counts as success . In this case an xsi : type attribute on the validation root will be taken as identifying a governing type definition . strict-wildcard validation : this is essentially like lax-wildcard validation except that if the validity of the validation root is unknown because there is no governing element declaration or type definition then it counts at the application level as failure . Many command-line tools default to lax-wildcard validation of the outermost element in the XML input : they look in the schema for a top-level declaration for it validate against that declaration if they find one and are silent if they don t find one . This leads to the bizarre consequence that if no declaration is found owing to a namespace error or for whatever reason it may look to the user as-if the document were valid instead of merely being not know to be invalid . In the cases you describe Xerces appears to be defaulting to lax or strict wildcard mode finding the xsi : type declaration and correctly declaring the document valid . The xmllint processor appears to be defaulting to a different mode slightly different from any of those described by the spec in which a top-level element declaration is sought and an error message is issued if it s not found . That s very similar to strict-wildcard validation mode as defined in the XSD spec but it appears to exclude the possibility of validating against a type specified in the instance by an xsi : type attribute . Under those circumstances xmllint quite correctly reports that the root element of the document is not valid against any top-level element declaration in the schema . Now we can extend the It depends answer more informatively . does setting the xsi : type mean I can set the root element s name to any value I like without impacting XSD validation outcome It depends on what kind of validation you re performing . Cases where the answer is yes include these : .. . .. . The name of the root element never has any effect on validation episodes that start from some other node so in all cases where you request validation of an attribute or of an element other than the root element you can indeed set its value to whatever you like . In cases where you request type-driven validation or cases where you request lax or strict wildcard validation and the schema has no top-level element declaration matching the root element the name of the root element will have no effect on schema-validity assessment . Cases where the answer is no : .. . .. . In cases where you request element-driven validation the name of the root element must match the name given on the element declaration . In cases where a you request wildcard validation and b the schema has a matching element declaration then the name of the root element will have an effect on schema-validity assessment because it will determine which element declaration is selected as the governing element declaration which will in turn determine whether the instance-specified type is or is not validly derived from the declared type of the element . which tool is right Xerces or xmllint It depends on how you define rightness . The XSD spec defines several ways of requesting validation and in 1.1 assigns the names given above for them but it very clearly does not attempt to define user or application interfaces as part of the standard so there is no right or wrong with respect to the exact formulation of the validation question a schema-validator assumes when you call it its default validation routine . Comment : Impressively thorough and well expressed answer regarding a disappointingly convoluted decision procedure . Comment : After reading the answer I wonder whether the equivalent of an international tribunal for crimes against humanity in the field of software technologies should be established and make sure it prosecutes every single person even remotely related to any organization involved in XML specifications from committee chairs down to unsuspecting contractors providing janitorial services . Comment : I m sorry you feel that way . The XSD spec is unnecessarily hard to read and the WG was unnecessarily unhelpful to people who want a simple story you can always provide a simple story as the default and allow other stories as options but I think distinguishing between validation against an element declaration and validation against a type definition is actually a good idea . Many implementors have not done very well with the freedom and responsibilities assigned them by the spec that s only partly the spec s fault .", "Question : When I have an example CCD should I use : .. . .. . 1 . An XSD schema and conclude that I have a valid CCD . or .. . .. . 2 . I use some other non-schema based method . UML model rules in addition to a valid XML document . Is there even such a thing as ccd.xsd Even if it only partially guides me to create a valid CCD . .. . Answer : Option A is more recommended which involves parsing the XML document with a DocumentBuilder http : docs.oracle.com javase 1.5.0 docs api javax xml parsers DocumentBuilder.html that has a specific CCD schema source and then checking for validation errors . I recommend looking at the XMLValidation class in the SchematronValidator http : gazelle.ihe.net content schematron-based-document-validator project the validXMLUsingXSD .. . method does what you are describing . There are several places to find an XSD for valid CCD XML but if you don t know where to start you can find most of the XSDs for CDA CCR schemas at Microsoft HealthVault . There are some additional ways to use schematron rules to further validate your CCD document see the Meaningful Use Validator from NIST . The code for what you are doing will look like the snippet below where schemaLocation is your XSD file location . The ErrorHandler will store any validation errors .", "Question : I wasn t aware of a difference but a coworker says there is although he can t back it up . What s the difference if any .. . Answer : DTD is the acronym for Document Type Definition . This is a description of the content for a family of XML files . This is part of the XML 1.0 specification and allows one to describe and verify that a given document instance conforms to the set of rules detailing its structure and content . Validation is the process of checking a document against a DTD more generally against a set of construction rules . The validation process and building DTDs are the two most difficult parts of the XML life cycle . Briefly a DTD defines all the possible elements to be found within your document what is the formal shape of your document tree by defining the allowed content of an element either text a regular expression for the allowed list of children or mixed-content i.e . both text and children . The DTD also defines the valid attributes for all elements and the types of those attributes . Comment : Hello @Rachna . This explains the validation part quite well but doesn t explain when we can call a XML file well-formed .. .", "Question : Forgive me if my question will sound strange - I am kind of new to XXE stuff . Basically I am working on an app which takes xml file as input and then processes it . We found out that the app is vulnerable to XXE DoS attack namely famous Billion Laughs case . Before the file is processed it is validated against schema . So my question is will the DoS attack take place during the validation Or during the validation the xml entities are not expanded and hence the DoS attack will happen only after validation when validated file is parsed .. . Answer : Basically a parser MUST expand entities to validate a document see 4.4.3 in XML recommendation http : www.w3.org TR xml include-if-valid since your entities may include some markup and build up a valid document . So yes the problem may occur during validation of the XML file .", "Question : I m generating xml files that need to conform to an xsd that was given to me . What s the best way to do this .. . Answer : If you are generating XML files programatically you may want to look at the XMLBeans http : xmlbeans.apache.org library . Using a command-line tool XMLBeans will automatically generate and package up a set of Java objects based on an XSD . You can then use these objects to build an XML document based on this schema . It has built-in support for schema validation and can convert Java objects to an XML document and vice-versa . Castor http : www.castor.org and JAXB http : java.sun.com developer technicalArticles WebServices jaxb are other Java libraries that serve a similar purpose to XMLBeans .", "Question : I m generating xml files that need to conform to an xsd that was given to me . What s the best way to do this .. . Answer : The Java runtime library supports validation . Last time I checked this was the Apache Xerces parser under the covers . You should probably use a javax.xml.validation.Validator http : java.sun.com j2se 1.5.0 docs api javax xml-validation Validator.html . The schema factory constant is the string http : www.w3.org 2001 XMLSchema which defines XSDs . The above code validates a WAR deployment-descriptor against the URL http : java.sun.com xml ns j2ee web-app 2 4.xsd but you could just as easily validate against a local file . You should not use the DOMParser to validate a document unless your goal is to create a document object-model anyway . This will start creating DOM objects as it parses the document - wasteful if you aren t going to use them . Comment : Hours upon the net trying to find this why haven t I learned to search SO first yet Comment : Shouldn t the value passed to SchemaFactory.newInstance be XMLConstants.W3C XML SCHEMA NS URI instead as described in stackoverflow.com questions 2396903 http : stackoverflow.com questions 2396903 java-xml-validation-against-xsd-schema Comment : @Chry Cheng - not sure I understand the example code does use the constant W3C XML SCHEMA NS URI http : docs.oracle.com javase 7 docs api javax xml XMLConstants.html W3C XML SCHEMA NS URI . Comment : You re right . My mistake . I ve gone cross-eyed . I thought you referenced W3C XML SCHEMA INSTANCE NS URI instead . Comment : Are you using a DOM or SAX parser in this example How do i tell which parser you are using as i cant see a reference to either .", "Question : I m generating xml files that need to conform to an xsd that was given to me . What s the best way to do this .. . Answer : Using Java 7 you can follow the documentation provided in package description http : docs.oracle.com javase 7 docs api javax xml-validation package-summary.html . .. . parse an XML document into a DOM tree .. . DocumentBuilder parser DocumentBuilderFactory.newInstance .newDocumentBuilder .. . Document document parser.parse new File instance.xml .. . .. . create a SchemaFactory capable of understanding WXS schemas .. . SchemaFactory factory SchemaFactory.newInstance XMLConstants.W3C XML SCHEMA NS URI .. . .. . load a WXS schema represented by a Schema instance .. . Source schemaFile new StreamSource new File mySchema.xsd .. . Schema schema factory.newSchema schemaFile .. . .. . create a Validator instance which can be used to validate an instance document .. . Validator validator schema.newValidator .. . .. . validate the DOM tree .. . try .. . validator.validate new DOMSource document .. . catch SAXException e .. . instance document is invalid .. . Comment : Using Java 7. . That was actually included in Java 5 http : docs.oracle.com javase 1.5.0 docs api javax xml-validation package-summary.html . Comment : This is basically the same as the accepted answer http : stackoverflow.com a 16054 . This solution seems to me a bit inefficient though as it unnecessarily builds the DOM for the xml to parse : parser.parse new File instance.xml . The validator accepts a Source so you can : validator.validate new StreamSource new File instance.xml . Comment : Working this way a SAXException would be thrown at the first error in the xml-file and stops then the validation . But I want to know all errors . If I use an ErrorHandler own class that implements ErrorHandler instead it recognizes all errors but the try-catch-block of validator.validate does not throw any Exception. . How do I recognize an error in the class that invokes the validate-method of my validator Thanks for your help", "Question : Maybe it s me but it appears that if you have an XSD .. . .. . that defines the schema for this document .. . .. . It would fail to validate if you added another element say EmailAddress and mix up the order .. . .. . I don t want to add EmailAddress to the document and have it be marked optional . I just want an XSD that validates the bare minimum requirements that the document must meet . Is there a way to do this EDIT : .. . .. . marc s pointed out below that you can use xs : any inside of xs : sequence to allow more elements unfortunately you have to maintain the order of elements . Alternatively I can use xs : all which doesn t enforce the order of elements but alas doesn t allow me to place xs : any inside of it . Comment : Some good answers and discussion but I have to go with Abel s as it was so detailed and also explained WHY what I was looking for didn t exist . .. . Answer : You should be able to extend your schema with the xs : any element for extensibility - see W3Schools http : www.w3schools.com Schema schema complex any.asp for details . When you add the processContents lax then the .NET XML validation should succeed on it . See MSDN docs on xs : any http : msdn.microsoft.com en-us library ms256043.aspx for more details . Update : if you require more flexibility and less stringent validation you might want to look at other methods of defining schemas for your XML - something like RelaxNG http : www.relaxng.org . XML Schema is - on purpose - rather strict about its rules so maybe that s just the wrong tool for this job at hand . Comment : while that almost works the order becomes important . GivenName and SurName must be the first and second elements respectively...at least I think that s the effect of xs : sequence . I could change it to xs : all . But then I can t use xs : any.. . Comment : which tells me that XSD is inherently broken . XML is supposed to be eXtensible . Order of elements isn t supposed to matter . So first why can you define a sequence Second why can t we write extensible XSDs Comment : I realize a sequence is a sequence I think it s bad that it exists as it violates the basic principle of XML extensibility . Aside from that why can t I define an XSD that is truly extensible . Using xs : sequence and xs : any sort of works but I have to ensure that the sequenced elements are first and appear in order.. . which shouldn t matter given the nature of XML . Comment : @Chad : Maybe if you really need this kind of flexibility XML schema is just the wrong tool for the job . Have you ever looked at RelaxNG relaxng.org http : www.relaxng.org Comment : I need to define a minimum level of conformance . Nowhere did I say anything anywhere anytime . I need to define a minimum document and allow it to be extensible . If you need to define a sequence of elements in your XML I would say you should define it IN the element with a sequence attribute . Relying on the order of the elements in the document feels like an affront to the essence of XML .", "Question : I wasn t aware of a difference but a coworker says there is although he can t back it up . What s the difference if any .. . Answer : W3C in the XML specification has defined certain rules that needs to be followed while creating XML documents . The examples of such rules include having exactly one root element having end-tag for each start-tag using single double quotes for attribute values and so on . If an XML document follows all these rules it is said to be well-formed document and XML parsers can be used to parse and process such documents . Document Type Definitions DTDs or XML Schemas can be used to define the structure and content of a specific class of XML documents . This includes the parent-child relationship details attribute lists data type information value restrictions etc . In addition to the well-formedness rules if an XML document also follows the rules specified in the associated DTD Schema it is said to be a valid XML document . All valid XML documents are well-formed but the reverse is not always true . Well-formed XML documents do not necessarily have to be valid .", "Question : i have to implement schematron validation for my xml xbrl files.i have searched and tried some libraries such as NMatrix and Saxon based on msdn . http : msdn.microsoft.com en-us library aa468554.aspx .. . .. . -NMatrix schematron validation not validate my xml i mean it is not giving any exception . -Saxon free edition is not validate xml through sch files . My question is how can i implement xml-validation based on schematron rules . I have also open advices for other languages java php . Thanks for your help . Comment : I found a .NET implementation for Schematron . Check my answers .. . Answer : There are some XSLT Stylesheets that you can use to validate XML documents against an Schematron schema . You could use them with the XSLtransform class and look at the resulting document . The official stylesheet for version 1.5 can be found here http : xml.ascc.net schematron 1.5 .. . .. . You can also take a look to Probatron http : www.probatron.org probatrondotnet.html I have never used it but its website states that it s a .net validator for schematron . Comment : tnx for replay but i dont like .net libraries for that subject . Comment : Probatron seems very dead and malfunct .", "Question : I have a xml file created using jaxb . I need to validate it against a xsd document . Is it possible to just do validation without unmarshalling . I need to then print the errors in the xml file . Comment : One of the main advantages of generating a binding code from xsd and then using the code to create an instance xml is to output a valid and well-formed xml . I am not sure why you want to validate it again Comment : You can set Schema and ValidationEventHandler on the marshaller itself . It will validate against the schema during marshalling . See docs.oracle.com javase 6 docs api javax xml bind http : docs.oracle.com javase 6 docs api javax xml bind Marshaller.html setSchema javax.xml.validation.Schema .. . Answer : Yes you can use validator found in java from 1.5 . here is the reference doc http : docs.oracle.com javase 1.5.0 docs api javax xml-validation package-summary.html .. . .. . Apart from it you can use dom based or stream based API to validate your XML document against xsd file . If you wish to use SAX API for your task then hear is the example : .. . .. . Otherwise you can use DOM DOM4J or XOM API . For further reference you can see here http : www.ibm.com developerworks xml library x-javaxmlvalidapi index.html . There is a related answer http : stackoverflow.com questions 9094662 validate-an-xml-against-an-xsd-in-java-getting-a-hold-of-the-schemalocation in stackoverflow also . Comment : You can validate before marshalling as well : JAXBSource source new JAXBSource jaxbContext objectBeingMarshalled validator.validate source Comment : i am getting this exeception sax exception : The processing instruction target matching xX mM lL is not allowed . Comment : it mean that in your XML starting it has some space remove space or anything else at the beginning of your XML follow the link : gonithethinker.blogspot.com 2012 06 http : gonithethinker.blogspot.com 2012 06 processing-instruction-target-matching.html @AutoMeta", "Question : Currently I m using PHSchematron library to validate schematron in Java . If I put sch : p tag as the child of sch : pattern then it throws NullPointerException as SchematronOutputType is null . I tried putting sch : p as child of sch : schema and sch : rule without any problems though the XSD denotes that the p element could be child of schema phase pattern . I m not sure whether the problem lies in the implementation of PHSchematron or not . I m supposed the xmlns : sch points to the 1.5 schematron XSD version . schematron 1.5.xsd : .. . .. . sample schematron.sch .. . .. . SchematronUtil.java : .. . .. . Main method : Comment : Why did you tag the question with xslt Comment : @MathiasM ller because I validate using XSLT2 PHSchematron supports XSLT and Pure Schematron validations .. . Answer : Testing against the general ISO Schematron rules your Schematron document is correct except for the targetNamespace attribute . Having a default namespace in it xmlns .. . does not make much sense either since all of the elements are prefixed . Schematron .. . .. . Then the Schematron is fine but there is a bunch of problems with the XML Schema . First of all the namespaces in the XML Schema document are different . The Schematron file has http : purl.oclc.org dsdl schematron while in the XSD it is http : www.ascc.net xml schematron . This is most likely because you are using an age-old XML Schema for an older version of Schematron . Having the correct namespaces should resolve the problem with sch : p not being allowed inside sch : pattern . After fixing the namespace issue in the XSD the following problems remain : .. . .. . All of this can be fixed by modifying your XML Schema the following is a version that works : .. . .. . XML Schema .. . .. . But please keep in mind : this XSD document is outdated and does not reflect the latest changes to the Schematron specification . It is very likely that there will be other problems with it . As an alternative you could use recent ISO Schematron and SQF schemas from Schematron Quickfix https : github.com schematron-quickfix sqf tree master schemas . Make sure you download all schema components and then validate against iso-schematron.xsd https : github.com schematron-quickfix sqf blob master schemas iso-schematron.xsd . Comment : Thank you for pointing me the ISO Schematron XSD file . How do you test the validation of it by Notepad++ Comment : @Silentbang I have used Oxygen for testing but I m sure you can also do it with Notepad++ or a command-line tool like xmllint . You need a tool that understands both XSD and Schematron though . Comment : @Silentbang So did this solve your problem Is anything missing from my answer Please either accept this answer or let me know if there is something wrong with it .", "Question : I have a situation where we want to validate an XML document held as a byte stream in memory against an XSD placed amongst others in a file system . We would like to avoid having the file name explicitly mentioned in the XML file but instead tell the XML parser to use a catalog of one or more XSD files for validation . My attempt to create a DocumentBuilder provider for Guice 3.0 looks like : .. . .. . and I have also tried with file names too . Eclipse accepts the XSD - when put in the catalog it can validate the XML dealt with here .. . .. . It appears to the naked eye that the parser halts briefly when trying to validate . This might be a network lookup . -Djaxp.debug 1 only adds these lines .. . .. . How can I get the parser in JDK 6 to tell me what it is doing If I cannot do that how do I inspect the XML Catalog usage inside it to see why the XSDs provided are not selected What obvious thing have I overlooked .. . Answer : You say .. . .. . We would like to avoid having the file name explicitly mentioned in the XML file .. . .. . How then would the parser be able to select the appropriate schema What you can try is to create a Schema using a SchemaFactory based on all the available schema resources and attach that to the document builder factory . The parser will then automatically validate the document against this super schema . If your set of schemas has internal dependencies i.e . import or include make sure that those references are resolved correctly using relative URLs or a specialised resolver . UPDATE : .. . .. . After reading this http : java.sun.com j2ee 1.4 docs tutorial doc JAXPDOM8.html a bit more carefully I realize that you approach should have the same effect as my proposal so something else is going n . I can only say that what I describe works very well . Comment : To my understanding each XSD mentions which namespace it can validate for . If any of those namespaces are used in the XML I would like the parser to use the corresponding XSD .", "Question : I wasn t aware of a difference but a coworker says there is although he can t back it up . What s the difference if any .. . Answer : As others have said well-formed XML conforms to the XML spec and valid XML conforms to a given schema . Another way to put it is that well-formed XML is syntactically correct it can be parsed while valid XML is semantically correct it can be matched to a known vocabulary and grammar . An XML document cannot be valid until it is well-formed . All XML documents are held to the same standard for well-formedness an RFC put out by the W3 . One XML document can be valid against some schemas and invalid against others . There are a number of schema languages many of which are themselves XML-based . Comment : A good answer except for semantically . See my comment on @Vinko s answer . Comment : @LarsH point taken . Maybe it would be closer to say grammatically correct .", "Question : How can I validate an XML file against a DTD that is stored locally as a file The XML file does not have any DOCTYPE declaration or may have one that should then be overridden . I had a look at this thread http : stackoverflow.com questions 470313 net-how-to-validate-xml-file-with-dtd-without-doctype-declaration but besides the fact they are using .NET I doubt that this is a good solution . Any input appreciated .. . Answer : In an ideal world you d be able to validate using a Validator http : java.sun.com javase 6 docs api javax xml-validation package-summary.html . Something like this : .. . .. . Unfortunately the Sun implementation at least as of Java 6 does not include support for creating a Schema instance from a DTD . You might be able to track down a 3rd party implementation . Your best bet may be to alter the document to include the DTD before parsing using some other mechanism . .. . .. . You can use a transformer http : java.sun.com javase 6 docs api javax xml transform package-summary.html to insert a DTD declaration : .. . .. . ...but this does not seem to replace an existing DTD declaration . .. . .. . This StAX http : java.sun.com javase 6 docs api javax xml stream package-summary.html event reader can do the job : .. . .. . It will send a given DTD declaration right after the document start and discard any from the old document . Demo usage : .. . .. . Note that the XMLEventReader could form the source for some other transformation mechanism that performed validation . .. . .. . It would be much easier to validate using a W3 schema if you have that option . Comment : Thank you very much for your extensive answer that really helps me a lot . I will have a look into converting the DTD to a W3 schema as I can use the Validator of Sun then . Comment : my XML file does not have any DOCTYPE declaration . and I m parsing file using SAXParser in Android . DTD generated by myself . How can I validate an XML file using my DTD in SAX parsing Comment : @Khushbu - it would be better if you asked a new question . Comment : I have already asked question http : stackoverflow.com questions 8091513 how-to-apply-validation-of-local-dtd-file-to-xml-file-in-java but I have not get proper answer .", "Question : When I have an example CCD should I use : .. . .. . 1 . An XSD schema and conclude that I have a valid CCD . or .. . .. . 2 . I use some other non-schema based method . UML model rules in addition to a valid XML document . Is there even such a thing as ccd.xsd Even if it only partially guides me to create a valid CCD . .. . Answer : Old question but I still thought I would answer it because I was looking for a solution to this problem recently and ended up doing a fair amount of research . I tried using the Everest API http : te.marc-hi.ca view.aspx project af66d54ed41e4ac18b44d0d3ca6cabf0 which has a built-in API to validate various HL7 documents . This is a great way to test within your code if you have generated a valid document . NIST http : xreg2.nist.gov cda-validation webservice.html provides a webservice and a sample client too that can be used within your code again to validate documents like CCD CCDA etc . If you just need to manually validate a generated document then NIST has another http : transport-testing.nist.gov ttt one . I hope it helps.. .", "Question : I am trying to do xml-validation . I am being given a list of schemas at run-time possibly wrapped in a jar . Validation passes or failes based on the order in which I provide the schemas to the SchemaFactory . Here is what I am doing : .. . .. . again this fails if the passed set of schema do not start with the schema to which the root element of the xml referrs . Is there a fix to this or am I doing something wrong Comment : Can you post the schemas and XML somewhere Comment : @davidfmatheson Unfortunately that is not possible I can say that it is a set of schemas the root schema and a second schema that allows for the replacement of the body of the first schema with a different tag . .. . Answer : By default Xerces will ignore a schema document if it already has a schema document for the same namespace . This behaviour can be changed using the factory option .. . .. . http : apache.org xml features validation schema handle-multiple-imports Comment : I am getting an HTTP 404 in this link could you provide some additional details Comment : Also I need to load 2 schemas each of which import additionals schemas . If I load these in the correct order all s well . Otherwise no joy . The two schemas have different target namspaces . Comment : Try searching for it instead of using it as a URL . It s a JAXP option name not a URL . OK some browsers make that difficult by combining the address-bar and the search bar . Do it the old way by going to google.com . Comment : When I attempt to set the above feature on the factory I get : SAXNotRecognizedException : Feature http : apache.org xml features validation schema handle-multiple-imports is not recognized Comment : Perhaps you re using the JDK version of Xerces rather than the Apache version But sorry I ve pointed you in the right direction but I can t go any further than this is providing support for my competitors products", "Question : I ve been looking for solutions to this problem for far too long considering how easy it sounds so I ve come for some help . I have an XML Schema which I have used with xjc to create my JAXB binding . This works fine when the XML is well formed . Unfortunately it also doesn t complain when the XML is not well formed . I cannot figure out how to do proper full validation against the schema when I try to unmarshall an XML file . I have managed to use a ValidationEventCollector to handle events which works for XML parsing errors such as mismatched tags but doesn t raise any events when there is a tag that is required but is completely absent . From what I have seen validation can be done againsta schema but you must know the path to the schema in order to pass it into the setSchema method . The problem I have is that the path to the schema is stored in the XML header and I can t knwo at run time where the schema is going to be . Which is why it s stored in the XML file : .. . .. . ...etc .. . .. . Every example I see uses setValidating true which is now deprecated so throws an exception . This is the Java code I have so far which seems to only do XML validation not schema validation : .. . .. . So what is the proper way to do this validation I was expecting there to be a validate method on the JAXB generated classes but I guess that would be too simple for Java . .. . Answer : OK I ve found the solution . Using the schema factory to create a schema but without specifying a schema file makes it work with the noNamespaceSchemaLocation specified in the XML file . So the code from above has had this added : .. . .. . Shame that took the best part of 24 hours to find the answer to The javadoc for SchemaFactory.newSchema http : java.sun.com javase 6 docs api javax xml-validation SchemaFactory.html newSchema 28 29 says : .. . .. . For XML Schema this method creates a Schema object that performs validation by using location hints specified in documents . .. . The returned Schema object assumes that if documents refer to the same URL in the schema location hints they will always resolve to the same schema document . This asusmption allows implementations to reuse parsed results of schema documents so that multiple validations against the same schema will run faster . Comment : Interesting I didn t know that . I took the liberty of adding some info to your answer for future reference . Comment : Instead of specifying the XMLSchema URL explicitly per the javadocs use the appropriate value from XMLConstants as specified here : docs.oracle.com javase 6 docs api index.html javax xml http : docs.oracle.com javase 6 docs api index.html javax xml-validation Schema.html Comment : @icfantv our are right I use : Schema schema SchemaFactory.newInstance XMLConstants.W3C XML SCHEMA NS URI .newSchema but the reference was : docs.oracle.com javase 6 docs api index.html javax xml http : docs.oracle.com javase 6 docs api index.html javax xml-validation Schema.html - Additionally the thing i didn t understand about this solution is that the url is constant : it does not refer to the location of our own schema was not obvious to me Comment : oops : direct reference to XMLConstants : docs.oracle.com javase 6 docs api javax xml http : docs.oracle.com javase 6 docs api javax xml XMLConstants.html W3C XML SCHEMA NS URI", "Question : I have following XSD code : .. . .. . The problem here is : the elements location multipleChoiceInput etc . must appear in the same order they are declared . I don t want this to happen I want that in the validation process the sequence should not be relevant . How can I achieve this Another possibility I ve tried has been : .. . .. . In this example the sequence really does not matter anymore and I can have so much elements as I want what all would not allow me to do . But I still have the Problem with the min- and maxOccurs . In this example I could have so many pictureInput s as possible what is againt the constraint that I would like to have either 0 or 1 . Thanks a lot for helping .. . Answer : NOTE : I have changed sequence to all .. . .. . Sequence forces order as defined . if order doesn t matter then all is used . If there are chances of element occurence more than once then xsd : any can be used . You can find details of xsd : any at following link : .. . .. . http : www.w3schools.com schema schema complex any.asp Comment : Thanks for answering YoK but all can not be used in my case cause all requires the element to appear only ONCE min- and maxOccurs can only accept the values 0 and 1 . Comment : Then maybe xs : any is your friend . Comment : Ya in this case any needs to be used . Will also update answer . Comment : Thanks again guys but neither ANY nor ALL takes following in consideration : 1 I want to have one and only one element location 2 I want to have 0 or 1 element pictureInput .. . Looking forward other suggestions . Comment : Did you verify that ALL doesn t work cause on following link it says : he all element provides an XML representation that describes an unordered-set of element types . For each element type associated with an all element in an XML Schema Document there must be a corresponding element in the corresponding XML instance . However they may appear in the any order . In fact there may be zero or many elements for each type depending upon the values of the minOccurs and maxOccurs attributes associated with the corresponding element type . xmlschemareference.com allElement.html http : www.xmlschemareference.com allElement.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
xml
UNK_RELATION
fakesmile@svg@41
fakesmile -- a polyfill for declarative @placeholder animations smil .
{ "confidence": [ 39.3261604309082, 29.182788848876953, 28.417190551757812, 27.59627914428711, 27.065534591674805, 26.221614837646484, 26.00098991394043, 20.867630004882812, 20.419818878173828, 18.54686737060547, 14.616999626159668, 14.616999626159668, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137, 11.370409965515137 ], "content": [ "I am working on a SMIL animation and to get it running in Internet Explorer v9+ I am using FakeSmile http : leunen.me fakesmile index.html javascript library .", "Maybe this can help : stackoverflow.com questions 11459460 fakesmile-with-ie9 http : stackoverflow.com questions 11459460 fakesmile-with-ie9", "Because IE9 and up do support SVG s just not animating them through SMIL animations .", "I m trying to fake SMIL support in IE9 with FakeSmile http : fakesmil.blogspot.co.il .. . .. . I m creating the SVG element dynamically adding a rect element with animate element and calling beginElement .", "FakeSmile is just javascript so you could always figure out where the bug is and fix it .", "Fenring leunen-d anwered that fakesmil doesn t support dynamic animations and that it could be added with the following function : https : answers.launchpad.net smil +question 203333", "IE doesn t support SMIL animation .", "Check my fiddle http : jsfiddle.net jimish LB9dV .. . .. . Is this possible to do with web animations as almost all browsers are going to drop SVG animation support", "IE9 gives me an error : Object doesn t support property or method beginElement .. . .. . Static SVG works : http : jsfiddle.net FG3PG 1 .. . .. . How do I use FakeSmile to fix it", "I used SMIL animation in both the fiddles that I mentioned.In IE animation in 1st fiddle is working correctly and not working in 2nd fiddle in which I added DOM elements dynamically .", "Now issue is when I try to animate any curved path Path which includes curveto into its d attribute element has d element and value of d is containing curveto which is identified by c in svg file Its showing weird shape .", "But for other browsers its working totally fine .", "The following shows what I m trying to do : http : jsfiddle.net DgMDV 13 .. . .. . And here is the same code :", "what s with the script type text javascript src vb.js script", "it s throwing a 404 to the JS console @ jsFiddle .", "I ve added static svg example that works .", "When dynamically creating the animate element it fails .", "you should change your question as your dynamic demo is incomplete and fails on other browsers then IE .", "I ve tested the dynamic demo on FF and Chrome and it works fine .", "Ok this works in IE. . jsfiddle.net whyoz c3wb5sbr http : jsfiddle.net whyoz c3wb5sbr", "It seems you re setting a property incorrectly : .. . .. . Change the property name to match the value :", "I was following the Opera tutorial which says that begin indefinite means that the animation should start now .", "dev.opera.com articles view advanced-svg-animation-techniques http : dev.opera.com articles view advanced-svg-animation-techniques When I comment the line that sets the begin attribute I do get the animation working on IE9 but beginElement still gives me the same error jsfiddle.net DgMDV 14 http : jsfiddle.net DgMDV 14", "I m trying to do SVG element s animation while dynamically adding DOM elements with jquery .", "If I add those elements inside body as below its working.Working Sample for this is http : jsfiddle.net bZdfH 2 .. . .. . When I add it dynamically animation will not start in IE however it works with Chrome and FireFox.Here is what I have .", "Here is jsfiddle http : jsfiddle.net pBK4S for the Working Sample.Can anyone please help me", "Source : http : caniuse.com search svg", "It is working while creating elements statically.Then why it is not working for dynamic creation of those elements.Any reason", "Not sure if I understood u correctly" ] }
{ "confidence": [ 52.407745361328125, 49.00407028198242, 47.184356689453125, 33.56470489501953 ], "content": [ "Question : null .. . Answer : I am working on a SMIL animation and to get it running in Internet Explorer v9+ I am using FakeSmile http : leunen.me fakesmile index.html javascript library . Now issue is when I try to animate any curved path Path which includes curveto into its d attribute element has d element and value of d is containing curveto which is identified by c in svg file Its showing weird shape . But for other browsers its working totally fine . Check my fiddle http : jsfiddle.net jimish LB9dV .. . .. . Is this possible to do with web animations as almost all browsers are going to drop SVG animation support Comment : FakeSmile is just javascript so you could always figure out where the bug is and fix it .", "Question : I m trying to do SVG element s animation while dynamically adding DOM elements with jquery . If I add those elements inside body as below its working.Working Sample for this is http : jsfiddle.net bZdfH 2 .. . .. . When I add it dynamically animation will not start in IE however it works with Chrome and FireFox.Here is what I have . Here is jsfiddle http : jsfiddle.net pBK4S for the Working Sample.Can anyone please help me Comment : Maybe this can help : stackoverflow.com questions 11459460 fakesmile-with-ie9 http : stackoverflow.com questions 11459460 fakesmile-with-ie9 .. . Answer : IE doesn t support SMIL animation . Source : http : caniuse.com search svg Comment : It is working while creating elements statically.Then why it is not working for dynamic creation of those elements.Any reason Comment : Because IE9 and up do support SVG s just not animating them through SMIL animations . Not sure if I understood u correctly Comment : I used SMIL animation in both the fiddles that I mentioned.In IE animation in 1st fiddle is working correctly and not working in 2nd fiddle in which I added DOM elements dynamically .", "Question : I m trying to fake SMIL support in IE9 with FakeSmile http : fakesmil.blogspot.co.il .. . .. . I m creating the SVG element dynamically adding a rect element with animate element and calling beginElement . IE9 gives me an error : Object doesn t support property or method beginElement .. . .. . Static SVG works : http : jsfiddle.net FG3PG 1 .. . .. . How do I use FakeSmile to fix it The following shows what I m trying to do : http : jsfiddle.net DgMDV 13 .. . .. . And here is the same code : Comment : what s with the script type text javascript src vb.js script it s throwing a 404 to the JS console @ jsFiddle . Comment : I ve added static svg example that works . When dynamically creating the animate element it fails . Comment : you should change your question as your dynamic demo is incomplete and fails on other browsers then IE . Comment : I ve tested the dynamic demo on FF and Chrome and it works fine . .. . Answer : Fenring leunen-d anwered that fakesmil doesn t support dynamic animations and that it could be added with the following function : https : answers.launchpad.net smil +question 203333 Comment : Ok this works in IE. . jsfiddle.net whyoz c3wb5sbr http : jsfiddle.net whyoz c3wb5sbr", "Question : I m trying to fake SMIL support in IE9 with FakeSmile http : fakesmil.blogspot.co.il .. . .. . I m creating the SVG element dynamically adding a rect element with animate element and calling beginElement . IE9 gives me an error : Object doesn t support property or method beginElement .. . .. . Static SVG works : http : jsfiddle.net FG3PG 1 .. . .. . How do I use FakeSmile to fix it The following shows what I m trying to do : http : jsfiddle.net DgMDV 13 .. . .. . And here is the same code : Comment : what s with the script type text javascript src vb.js script it s throwing a 404 to the JS console @ jsFiddle . Comment : I ve added static svg example that works . When dynamically creating the animate element it fails . Comment : you should change your question as your dynamic demo is incomplete and fails on other browsers then IE . Comment : I ve tested the dynamic demo on FF and Chrome and it works fine . .. . Answer : It seems you re setting a property incorrectly : .. . .. . Change the property name to match the value : Comment : I was following the Opera tutorial which says that begin indefinite means that the animation should start now . dev.opera.com articles view advanced-svg-animation-techniques http : dev.opera.com articles view advanced-svg-animation-techniques When I comment the line that sets the begin attribute I do get the animation working on IE9 but beginElement still gives me the same error jsfiddle.net DgMDV 14 http : jsfiddle.net DgMDV 14" ] }
[ "yes-answer-long", "yes-answer-short" ]
svg
UNK_RELATION
shadow-dom@dom@112
shadow-dom -- shadow-dom is a part of the web components specification that allows you to include a subtree of @placeholder elements into the rendering of a document but not into the main document dom tree .
{ "confidence": [ 101.013916015625, 77.26477813720703, 76.81269073486328, 73.4433822631836, 72.82768249511719, 72.38867950439453, 71.2858657836914, 69.1302490234375, 69.0904769897461, 68.3904800415039, 68.3904800415039, 68.0243148803711, 67.72184753417969, 67.25386047363281, 67.25111389160156, 66.83766174316406, 66.17269134521484, 65.62813568115234, 65.23400115966797, 64.85780334472656, 64.85780334472656, 64.66742706298828, 63.744937896728516, 63.58710479736328, 63.51286697387695, 63.51286697387695, 63.32497024536133, 63.202117919921875, 62.96635437011719, 62.760711669921875, 62.14746856689453, 62.13630676269531, 62.0610237121582, 61.928531646728516, 61.73627471923828, 61.67572784423828, 61.297454833984375, 61.0236930847168, 60.95124816894531, 60.82828140258789, 60.796531677246094, 60.69773483276367, 60.603477478027344, 60.54920959472656, 59.915283203125, 59.842010498046875, 59.798316955566406, 59.76652526855469, 59.214599609375, 58.82123947143555, 58.81454849243164, 58.76633834838867, 58.76633834838867, 58.76633834838867, 58.700992584228516, 58.63740921020508, 58.56367874145508, 58.481319427490234, 58.481319427490234, 58.481319427490234, 58.481319427490234, 58.09972381591797, 57.930973052978516, 57.81156539916992, 57.653724670410156, 57.427330017089844, 57.409385681152344, 57.409385681152344, 57.14588165283203, 57.14588165283203, 57.045352935791016, 56.948490142822266, 56.78117370605469, 56.76457595825195, 56.6574821472168, 56.611289978027344, 56.611289978027344, 56.305946350097656, 55.808555603027344, 55.52934265136719, 55.49867248535156, 55.35608673095703, 55.26744079589844, 55.20979690551758, 55.111351013183594, 55.111351013183594, 55.111351013183594, 55.111351013183594, 55.111351013183594, 54.99082946777344, 54.481895446777344, 54.36174392700195, 54.36174392700195, 54.32875061035156, 54.03966522216797, 53.93878173828125, 53.819374084472656, 53.817596435546875, 53.73435592651367, 53.70756912231445 ], "content": [ "Reading through articles and tutorials about the Shadow DOM I came across a description which confused me a bit : .. . .. . Shadow DOM refers to the ability of the browser to include a subtree of DOM elements into the rendering of a document but not into the main document DOM tree .", "No how to access shadow DOM elements through the shadow DOM s parent document .", "The content is in the document the presentation is in the Shadow DOM .", "So a Shadow tree is not part of the DOM tree", "From the Shadow DOM https : www.w3.org TR shadow-dom shadow-trees spec .. . .. . A document tree is a node tree whose root node is a document .", "It will contain elements that are in a shadow-dom .", "The shadow-dom is the virtual dom .", "https : www.w3.org TR 2015 WD-shadow-dom-20151215 shadow-dom-example .. . .. . The shadow DOM is part of the DOM but a virtual DOM is a hidden copy of the DOM .", "I was referring to the shadow-dom thats part of Web Components : w3.org TR 2015 WD-shadow-dom-20151215 http : www.w3.org TR 2015 WD-shadow-dom-20151215", "This is what the Shadow DOM does but for all the web components .", "Something similar to the behavior of a shadow-dom in Web components .", "there is no is part of a shadow DOM OR a light DOM", "Is there a way to access the shadow DOM elements", "Now 2016 you can access an element inside a Shadow DOM tree using the method querySelector on the Shadow DOM root : .. . .. . NB : it works only with user created Shadow DOM elements no user-agent ones .", "FontAwesome in a Shadow DOM you should : .. . .. . 1 Declare the Font .. . .. . First include the link rel stylesheet element in the main document .", "Your question is how to access the DOM elements within the shadow DOM", "You cannot access the DOM of a user-agent Shadow DOM only custom Shadow DOM .", "The shadow-dom is different than the virtual dom right", "The only Light DOM which is not preceeded by a shadow Root is part of the document because Light DOM is relative as shown above .", "This is not at all what shadow DOM is .", "Encapsulation is the purpose of Shadow DOM .", "Visualizing Shadow DOM Concepts https : developers.google.com web updates 2013 03 Visualizing-Shadow-DOM-Concepts", "Styles of Shadow DOM s host element affect Shadow DOM elements also .", "Shadow DOM .. . .. . Shadow dom is mostly about encapsulation of the implementation .", "Including span.special elements from shadow DOM .", "Here I have created elements with shadow-dom .", "Events with shadow-dom are tricky .", "I understand that the button is not part of the shadow DOM that s why I m surprised to see it on a shadow DOM listener .", "in shadow-dom", "How can I determine if an element is part of a shadow DOM or a light DOM", "Is there a way to serialize the entire HTML document including Shadow DOM trees", "This is how native Shadow DOM works .", "From reviewing this W3 Spec https : www.w3.org TR 2015 WD-shadow-dom-20151215 shadow-dom-example again it appears that the shadow DOM is simply a reusable DOM fragment .", "You can t access content of Shadow DOM from scripts outside of the Shadow DOM .", "Shadow DOM : Part of the Web Components spec https : www.w3.org standards techs components w3c all as proposed by W3C which basically allows the encapsulation of smaller DOM elements and CSS styles into a single DOM element : .. . .. . Example Shadow DOM Element .. . .. . However video actually encapsulates the following elements : .. . .. . So by using Shadow DOM we re able to hide the implementation details of our web element and only pass along necessary information to the sub-elements i.e .", "Is this the proper way to embed javascript for shadow-dom elements", "To view the Shadow DOM code I enabled Shadow DOM in Chrome s web inspector .", ".. . we can inspect the DOM see what the shadow DOM looks like .", "But for more detail and possible workarounds see also : Accessing Shadow DOM tree with Selenium http : stackoverflow.com questions 23920167 accessing-shadow-dom-tree-with-selenium also : Accessing elements in the shadow DOM http : stackoverflow.com questions 28911799 accessing-elements-in-the-shadow-dom and especially : Finding elements in the shadow DOM http : stackoverflow.com q 28682814 954442", "I m having issues using shadow DOM for one of the web-components paper-stepper and it requires the use of the shady DOM instead .", "@PatriciaBrothers it could possibly be emulated using document fragments or by removing the shadow components from the DOM and putting them into say a div .", "If so how do you prevent others from selecting DOM elements outside of their shadow DOM", "In Shadow DOM land this is called distribution .", "Shady DOM : .. . .. . Shady DOM is a super-fast shim for shadow DOM that provides tree-scoping but has drawbacks .", "The web-component family of specs allow you to create your own elements that work in this way and the Shadow DOM is a critical part of this .", "@Matt Stone - One idea could be to have CSS hide dom elements that are part of the shadow-dom and amend the Javascript DOM query functions for example getElementById such that they will not return any hidden DOM elements .", "Update .. . .. . If you want to search .. . .. . inside the shadow DOM of the current element .. . .. . inside the shadow DOM of an element inside the shadow DOM .. . .. . from outside the current element", "Can this be related to the native implementation on web components in Chrome shadow-dom to be specific .", "If you use shady DOM default instead of shadow DOM then you need to use Polymer API to access the DOM .", "Sure the DevTools allow you to investigate the shadow DOM but if you get the HTML for index.html querySelector body .innerHTML the shadow DOM of the elements is not included .", "You see it because the button is not part of your element s shadow-dom .", "Composition is something Shadow DOM is designed for .", "and that also does not target the shadow-dom .", "Because Firefox has no shadow DOM .", "What is interesting are these CSS attributes pseudo-selectors which operate on the Shadow DOM but aren t part of the Real DOM .", "The dropdown is part of a custom date input and is encapsulated inside the input s shadow DOM .", "http : www.w3.org TR shadow-dom shadowroot-object .. . .. . You can get to the shadow root by walking up the DOM tree .", "How is stateless and shadow DOM related to this all", "Angular2 defaults to encapsulation : ViewEncapsulation.Emulated which is not shadow DOM .", "Here are some more Shadow DOM links : .. . .. . 1 .", "And I can t access it with JS because of shadow DOM .", "Could you also take a look at this thread : Accessing elements in the shadow DOM http : stackoverflow.com questions 28911799 accessing-elements-in-the-shadow-dom", "Shadow dom encapsulate css styles selectors don t cross the shadow boundary .", "Is it possible to access elements within a Shadow DOM using Selenium Chrome webdriver", ".. . .. . Here is an example of what is considered shadow DOM and light DOM for the purpose of this question .", "http : www.polymer-project.org platform shadow-dom.html shadow-dom-subtrees .. . .. . It s quite literally a way to render nodes from light dom into placeholders in the shadow-dom .", "You can use the webcomponents.js http : webcomponents.org library in order to polyfill the Shadow DOM features http : webcomponents.org polyfills shadow-dom in Firefox IE and Edge .", "Note you will need to call contains from the shadow-dom reference eg shadowRoot.contains e.path 0 or some sub element within your shadow-dom .", "Shadow DOM and performance .. . .. . Even though shadow DOM is not about performance in the first place it also has performance implications .", "Possible duplicate of Need help understand Shadow DOM http : stackoverflow.com questions 36656667 need-help-understand-shadow-dom", "If and only if the element is in a shadow DOM we will be able to match it by using the selector : host to identify elements that have a Shadow DOM : : shadow to look in those shadow DOMs and and to match any descendant .", "Basically a shadow-dom or an iframe but without an src attribute .", "At the moment when I want to use an icon in a custom-element s Shadow DOM I have to include parts of the ociticons.css file inline in the Shadow DOM : .. . .. . Apparently @font-face does bleed into the Shadow DOM .", "But if the host element is inside another element s shadow DOM then the event will be retargeted twice before reaching the event handler on the document window .", "read this : glazkov.com 2011 01 14 what-the-heck-is-shadow-dom http : glazkov.com 2011 01 14 what-the-heck-is-shadow-dom and w3.org TR shadow-dom http : www.w3.org TR shadow-dom", "But i want to use the shadow-dom .", "FontAwesome Octicons bleed into the Shadow DOM", "https : www.polymer-project.org platform shadow-dom.html shadow-dom-subtrees .. . .. . This means : Light DOM is always relative to the next ancestor which hosts a shadow root .", "Tl DR : .. . .. . Shadow DOM : .. . .. . Shadow DOM works by hiding the scoped DOM trees from the traditional tree walking functions and accessors childNodes children firstChild and so on .", "When would you want to reach elements in the shadow DOM", "Does the concept of virtual DOM diffing work with Shadow DOM or are they incompatible", "Lets understand Light Dom : .. . .. . The Light DOM is the user supplied DOM of an element that hosts a shadow root .", "An element can take part in a shadow root and in a light dom at the same time .", "With a couple of bits edited out the shadow DOM markup for this using Chrome looks something like : .. . .. . The methods and properties associated with the date input do not appear to reference the shadow DOM at all JSFiddle http : jsfiddle.net 6y9XT 2 so I was wondering how if at all can these shadow DOM elements be accessed", "But it doesn t work in Chrome 35 with native Shadow DOM .", "When the field isn t highlighted the Shadow DOM shows this.. .", "AngularDart uses Shadow DOM in-place of ngTransclude .", "Can I access the shadow-dom with jquery", "It seems the javascript for creating the button is not compatible with shadow DOM .", "w3.org TR shadow-dom distribution-algorithms http : www.w3.org TR shadow-dom distribution-algorithms", "I don t know ReactJS but its virtual DOM seems something completely different than shadow DOM .", "Are you using shady DOM default or shadow DOM on a browser that natively supports it Chrome", "To distribute light DOM nodes into the shadow-dom you use content insertion points .", "Polymer elements instantiate their template s inside of their shadow roots which establish a shadow-dom .", "On the other hand these elements need to be in the DOM somewhere to be rendered by the browser and that s where shadow DOM comes in : Internally the browser replaces every ocurence of input type range in the DOM by the tree .. . .. . And that is shadow DOM : Some elements that are children of certain elements not because you put them there in your HTML but because the parent element is defined to have these children like the audio-element is defined to have a play-button and that are not exposed through the DOM but are generated by the browser internally .", "As it turns out the Shadow DOM retargets click events and encapsulates the events in the shadow .", "It appears that we cannot access shadow DOM of native HTML5 elements..is it true", "s It looks like reactjs uses some shadow-dom which breaks css-selectors across components . s It looks like polymer uses shadow-dom which breaks css-selectors across components by design .", "CSS Variables .. . .. . Pseudo-elements .. . .. . Chrome and Firefox expose certain parts of their Shadow DOM to CSS through special pseudo-elements .", "If you re testing in Chrome you get native shadow-dom ." ] }
{ "confidence": [ 129.934326171875, 121.19841003417969, 117.7430419921875, 91.61473846435547, 88.2435302734375, 85.12673950195312, 82.14422607421875, 81.83963012695312, 81.34513854980469, 80.837646484375, 80.46173858642578, 80.174072265625, 76.86992645263672, 76.73247528076172, 75.47150421142578, 74.87769317626953, 74.63880157470703, 73.69390106201172, 73.66844940185547, 72.66218566894531 ], "content": [ "Question : Reading through articles and tutorials about the Shadow DOM I came across a description which confused me a bit : .. . .. . Shadow DOM refers to the ability of the browser to include a subtree of DOM elements into the rendering of a document but not into the main document DOM tree . So a Shadow tree is not part of the DOM tree But the browser will still see it and render its contents Comment : The idea is that the tree that the browser is rendering is hidden behind custom elements . A good example is the video tag many of the controls could be implemented with divs and buttons but you as the user you do not have access to those internals . The internal representation is not available to code outside the custom component unless you expose it through the shadow DOM or custom methods . See html5rocks.com en tutorials webcomponents shadowdom http : www.html5rocks.com en tutorials webcomponents shadowdom Comment : Yes the shadow DOM is not really part of the tree from the point of code l view of the caller it s hidden behind the implementation and that s the whole point .. . Answer : From the Shadow DOM https : www.w3.org TR shadow-dom shadow-trees spec .. . .. . A document tree is a node tree whose root node is a document . .. . Any element can host zero or one associated node trees called a shadow tree . .. . A shadow host is an element that hosts one shadow tree . .. . A shadow root is the root node of a shadow tree . .. . A tree of trees is a tree of node trees . .. . enter image description here http : i.stack.imgur.com OAtgu.png .. . .. . Then yes shadow trees are outside the document tree but they are still linked forming a tree of trees . And yes the shadow contents are rendered instead of the descendants of the element as defined in CSS Scoping https : www.w3.org TR css-scoping-1 shadow-dom : .. . .. . The most recently-created shadow tree on an element is the active shadow tree for that element . .. . The descendants of a shadow host must not generate boxes in the formatting tree . Instead the contents of the active shadow tree generate boxes as-if they were the contents of the element instead .", "Question : Reading through articles and tutorials about the Shadow DOM I came across a description which confused me a bit : .. . .. . Shadow DOM refers to the ability of the browser to include a subtree of DOM elements into the rendering of a document but not into the main document DOM tree . So a Shadow tree is not part of the DOM tree But the browser will still see it and render its contents Comment : The idea is that the tree that the browser is rendering is hidden behind custom elements . A good example is the video tag many of the controls could be implemented with divs and buttons but you as the user you do not have access to those internals . The internal representation is not available to code outside the custom component unless you expose it through the shadow DOM or custom methods . See html5rocks.com en tutorials webcomponents shadowdom http : www.html5rocks.com en tutorials webcomponents shadowdom Comment : Yes the shadow DOM is not really part of the tree from the point of code l view of the caller it s hidden behind the implementation and that s the whole point .. . Answer : I think the easiest way to understand shadow DOM is by example : .. . .. . .. . div .. . input type range .. . div .. . .. . Your DOM for the above code will look exactly as you d probably expect it : .. . .. . But what your browser renders is something else : There s a horizontal line and a thumb or knob or whatever you call it . So internally the input has some child elements but they are not exposed through the DOM : .. . .. . But as I already wrote : Those are not exposed through the DOM so they are hidden to you your CSS your JS this is not entirely true browsers can give you some access for example Webkit-based browsers allow you to manipulate the appearance of the thumb in CSS via the -webkit-slider-thumb pseudo-element . On the other hand these elements need to be in the DOM somewhere to be rendered by the browser and that s where shadow DOM comes in : Internally the browser replaces every ocurence of input type range in the DOM by the tree .. . .. . And that is shadow DOM : Some elements that are children of certain elements not because you put them there in your HTML but because the parent element is defined to have these children like the audio-element is defined to have a play-button and that are not exposed through the DOM but are generated by the browser internally . A lot more examples and a more thorough explanation can be found here : What the Heck is Shadow DOM https : glazkov.com 2011 01 14 what-the-heck-is-shadow-dom Comment : Agreed the article by Dimitri Glazkov is still a great explainer of Shadow DOM", "Question : Reading through articles and tutorials about the Shadow DOM I came across a description which confused me a bit : .. . .. . Shadow DOM refers to the ability of the browser to include a subtree of DOM elements into the rendering of a document but not into the main document DOM tree . So a Shadow tree is not part of the DOM tree But the browser will still see it and render its contents Comment : The idea is that the tree that the browser is rendering is hidden behind custom elements . A good example is the video tag many of the controls could be implemented with divs and buttons but you as the user you do not have access to those internals . The internal representation is not available to code outside the custom component unless you expose it through the shadow DOM or custom methods . See html5rocks.com en tutorials webcomponents shadowdom http : www.html5rocks.com en tutorials webcomponents shadowdom Comment : Yes the shadow DOM is not really part of the tree from the point of code l view of the caller it s hidden behind the implementation and that s the whole point .. . Answer : It looks like the quote came from this article titled : What the Heck is Shadow DOM https : www.w3.org TR 2015 WD-shadow-dom-20151215 shadow-dom-example .. . .. . The shadow DOM is part of the DOM but a virtual DOM is a hidden copy of the DOM . Sorry about the earlier confusion with virtual DOM . From reviewing this W3 Spec https : www.w3.org TR 2015 WD-shadow-dom-20151215 shadow-dom-example again it appears that the shadow DOM is simply a reusable DOM fragment . The browser will see it will render it s contents . This specification describes a method of combining multiple DOM trees into one hierarchy and how these trees interact with each other within a document thus enabling better composition of the DOM . This technology has been around since at least 2006 when I started using .innerHTML templates inside of JavaScript to build reusable DOM fragments . It s not new technology . It s simply being documented in 2015 by the W3C as an official specification . What is interesting are these CSS attributes pseudo-selectors which operate on the Shadow DOM but aren t part of the Real DOM . They are described at the bottom of the Composed Trees section https : www.w3.org TR 2015 WD-shadow-dom-20151215 composed-trees of the W3 Spec https : www.w3.org TR 2015 WD-shadow-dom-20151215 shadow-dom-example . : : shadow pseudo-element .. . .. . deep combinator which was replaced with a combinator or shadow piercing descendant combinator .. . .. . : : content pseudo-element .. . .. . : host pseudo-class and : host functional pseudo-class .. . .. . : host-context functional pseudo-class .. . .. . They kind of add to these selectors which people sometimes use to create div tags with carets pointers to other on-screen elements : .. . .. . : : before : : after .. . .. . Additional Update : .. . .. . I found more details at Shadow DOM 101 http : www.html5rocks.com en tutorials webcomponents shadowdom link . When viewing the Hello my name is Bob.. . Shellie example about 1 2 way down the page which is right above this text block.. . .. . .. . Now we have achieved separation of content and presentation . The content is in the document the presentation is in the Shadow DOM . They are automatically kept in sync by the browser when it comes time to render something . .. . we can inspect the DOM see what the shadow DOM looks like . It looks like this where both CSS HTML can be encapsulated inside of a shadow DOM element which is hidden inside of a div tag . See : https : developer.chrome.com devtools docs settings-files show-shadow-dom.png .. . .. . It seems like the idea is to encapsulate the CSS HTML so that it doesn t spill out onto other areas of the page . Nor allow other existing on-page code to affect what is inside of that encapsulated code block . Older examples of this encapsulation would be hidden iframe tag which were designed to show ads but stop 3rd party ad code from breaking the JS on our really cool web pages . Here are some more Shadow DOM links : .. . .. . 1 . Shadow DOM 101 http : www.html5rocks.com en tutorials webcomponents shadowdom .. . 2 . Shadow DOM 201 http : www.html5rocks.com en tutorials webcomponents shadowdom-201 .. . 3 . Shadow DOM 301 http : www.html5rocks.com en tutorials webcomponents shadowdom-301 .. . 4 . Visualizing Shadow DOM Concepts https : developers.google.com web updates 2013 03 Visualizing-Shadow-DOM-Concepts Comment : Oh boy I m even more confused now . The shadow-dom is different than the virtual dom right I was referring to the shadow-dom thats part of Web Components : w3.org TR 2015 WD-shadow-dom-20151215 http : www.w3.org TR 2015 WD-shadow-dom-20151215 Comment : The shadow-dom is the virtual dom . There are only 2 : visible DOM hidden DOM . The browser only renders the visible DOM which we normally see but not the hidden DOM . The terms are interchangeable can be confusing . Real viewable visible . Shadow virtual hidden . Does that help Or do I need to edit my answer to make it clearer Comment : This is not at all what shadow DOM is . Comment : I don t know ReactJS but its virtual DOM seems something completely different than shadow DOM . Comment : I think you will confuse people even more shadow DOM and react are not exactly the same thing . There are similarities but you haven t presented them clearly", "Question : I have studied Shadow DOM recently and I was wondering what are the aims of using it instead of the main one . What does it gives Why dont we use standard DOM instead of it except for styling scoping Comment : read this : glazkov.com 2011 01 14 what-the-heck-is-shadow-dom http : glazkov.com 2011 01 14 what-the-heck-is-shadow-dom and w3.org TR shadow-dom http : www.w3.org TR shadow-dom .. . Answer : It allows you to encapsulate functionality effectively putting it in a black-box . It means you can create reusable components whose inner workings aren t exposed this is impossible using standard DOM . As an example take HTML input elements . So say the file-type of input . To use it on an HTML page you simply add input-type-file and it works . You don t need to add any extra code or HTML or CSS to handle how it works it just does and you can t access the internal bits of it . If you were to write a piece of UI using HTML CSS JS that did the same thing it would be fairly complex . But the file input is just a single tag that you can use anywhere it always does the same thing . The web-component family of specs allow you to create your own elements that work in this way and the Shadow DOM is a critical part of this . You can create a new element like my-fantastic-file-input with its functionality encapsulated . It has its own internal DOM subtree but that subtree isn t directly accessible ditto with scoped styles . The new component does not expose its implementation details to the document . You can do most of this stuff using the DOM but the implementation will be wholly tied into the document application structure . With components you extract that implementation and you can reuse it pass it around publish it and let other people drop it into their applications documents and be sure it will work in exactly the same way anywhere . You cannot really do that as things currently stand by using the standard DOM . This is from 2011 and slightly out-of-date but it s a list of some possible use cases for the component model : http : www.w3.org 2008 webapps wiki Component Model Use Cases", "Question : Does implementing Shadow DOM in my projects will make them faster like virtual DOM that s used by React .. . Answer : No Shadow DOM and Virtual DOM are unrelated although somewhat similarly named : .. . .. . Virtual DOM : React concept of keeping two copies of the DOM the original and the updated for differential reasons . Before rendering React diffs the two objects to determine if it should apply an update s to the actual DOM tree . This results in boosted performance as we re only updating the portions of the view that require it not the entire screen . Shadow DOM : Part of the Web Components spec https : www.w3.org standards techs components w3c all as proposed by W3C which basically allows the encapsulation of smaller DOM elements and CSS styles into a single DOM element : .. . .. . Example Shadow DOM Element .. . .. . However video actually encapsulates the following elements : .. . .. . So by using Shadow DOM we re able to hide the implementation details of our web element and only pass along necessary information to the sub-elements i.e . height width which perhaps confusingly strongly resembles the ReactJS idiom of passing props to components . Information provided via : .. . .. . http : www.funnyant.com reactjs-what-is-it .. . http : glazkov.com 2011 01 14 what-the-heck-is-shadow-dom Comment : Do you mean that the performance of Shadow DOM is like DOM but it s just encapsulated Comment : @Hmoo oomH My understanding is that Shadow DOM is more for readability - as we re hiding the implementation details of complex web elements behind a higher-order element e.g . video but there s no expectation of a performance gain . Comment : Thank you You just made it clear to me .", "Question : Does implementing Shadow DOM in my projects will make them faster like virtual DOM that s used by React .. . Answer : Virtual DOM .. . .. . Virtual DOM is about avoiding unnecessary changes to the DOM which are expensive performance-wise because changes to the DOM usually cause re-rendering of the page . Virtual DOM also allows to collect several changes to be applied at once so not every single change causes a re-render but instead re-rendering only happens once after a set of changes was applied to the DOM . Shadow DOM .. . .. . Shadow dom is mostly about encapsulation of the implementation . A single custom-element can implement more-or-less complex logic combined with more-or-less complex DOM . An entire web application of arbitrary complexity can be added to a page by an import and body my-app my-app but also simpler reusable and composable components can be implemented as custom elements where the internal representation is hidden in the shadow DOM like date-picker date-picker . Style encapsulation Shadow DOM is also about preventing styles being applied accidentally to elements the designer didn t intend to for example because the CSS or components library you are using changed a selector that now applies to other elements that use the same CSS class names . Styles added to components are scoped to that component and bleeding out or in of styles is prevented . Shadow DOM and performance .. . .. . Even though shadow DOM is not about performance in the first place it also has performance implications . Because styles are scoped the browser can make assumptions about some changes to affect only a limited area of the page the shadow DOM of a custom-element which can limit re-rendering to the area of such a component instead of re-rendering the entire page . This is the reason the deep and : : shadow CSS combinators which allowed to apply styles across shadow DOM boundaries were deprecated and are subject to be removed soon from Chrome other browsers never had them AFAIK . The mere existence of these combinators prevents the kind of optimization mentioned in the previous paragraph .", "Question : I m having issues using shadow DOM for one of the web-components paper-stepper and it requires the use of the shady DOM instead . I m not sure what the differences are and why that is the case . .. . Answer : Here s https : www.polymer-project.org a good explanation of why . Tl DR : .. . .. . Shadow DOM : .. . .. . Shadow DOM works by hiding the scoped DOM trees from the traditional tree walking functions and accessors childNodes children firstChild and so on . These accessors return only the elements in your scope . What this means is that it hides a layer of complexity from you . One of the examples I found online was about the video video tag . It explains how within it there are the video controls but those are abstracted away and you cannot see them . This is what the Shadow DOM does but for all the web components . Shadow DOM sounds nice but there are limitations .. . .. . It s a lot of code . It s slow to indirect all the DOM API . Structures like NodeList can simply not be emulated . There are certain accessors that cannot be overwritten for example window.document window.document.body . The polyfill returns objects that are not actually Nodes but Node proxies which can be very confusing . This is where shady DOM comes in . Shady DOM : .. . .. . Shady DOM is a super-fast shim for shadow DOM that provides tree-scoping but has drawbacks . Most importantly one must use the shady DOM APIs to work with scoped trees . By using the Shady DOM you now don t have an abstracted view of the components . You can see everything . However with Shady DOM you can examine how the tree would look like if Shadow DOM was being used instead by running this : .. . .. . So taking all this information into consideration on how the different DOMs work it seems like the paper-stepper web-component requires access to the whole tree to work properly . Since the Shadow DOM abstracts the inner elements you have to use Shady DOM or refactor the code in such a way that the inner elements don t need to be accessed from outside the abstraction .", "Question : This question is more aimed at user-created shadow DOM elements but for accessibility I ll use the date input type for this question : .. . .. . Say for example I have a date input on my page . With a couple of bits edited out the shadow DOM markup for this using Chrome looks something like : .. . .. . The methods and properties associated with the date input do not appear to reference the shadow DOM at all JSFiddle http : jsfiddle.net 6y9XT 2 so I was wondering how if at all can these shadow DOM elements be accessed Comment : Your question is how to access the DOM elements within the shadow DOM Also your JSFiddle is incomplete . Comment : No how to access shadow DOM elements through the shadow DOM s parent document . script Access here script input type date -- shadow DOM -- . Incomplete .. . Answer : You can t access content of Shadow DOM from scripts outside of the Shadow DOM . Encapsulation is the purpose of Shadow DOM .", "Question : Besides the new Shadow Dom and the old HTML iframe element is there a way to prevent users from listening for delegated events on DOM elements inside my widget P.S . I heard Firefox had XBL which has features similar to Shadow DOM . Is it currently supported .. . Answer : Read http : davidwalsh.name event-delegate how delegating event-handling works . So I don t think that it s possible . Until you block event propagating on root level e.g . document . Or you can override HTMLElement Element .prototype.addEventListener method . But why do you need it Comment : I need it to encapsulate my DOM API . Blocking propagation on document will break the web-app . As for overriding simple delete HTMLElement.prototype.addEventListener would restore the native method . Comment : Right now reading about Shadow DOM isn t it enough encapsulated Comment : It s not enough encapsulated in browsers that don t support it : Comment : Nhah D I think you care too much . Overcare Comment : @katspaugh even the native implementation of Shadow DOM is not security-encapsulated - you can always gain access to the contained shadow nodes via the shadowRoot property . Shadow DOM hasn t had a goal of security encapsulating its contents since early in 2012 . Note : I m a contributor to the Web Components working group", "Question : This question is more aimed at user-created shadow DOM elements but for accessibility I ll use the date input type for this question : .. . .. . Say for example I have a date input on my page . With a couple of bits edited out the shadow DOM markup for this using Chrome looks something like : .. . .. . The methods and properties associated with the date input do not appear to reference the shadow DOM at all JSFiddle http : jsfiddle.net 6y9XT 2 so I was wondering how if at all can these shadow DOM elements be accessed Comment : Your question is how to access the DOM elements within the shadow DOM Also your JSFiddle is incomplete . Comment : No how to access shadow DOM elements through the shadow DOM s parent document . script Access here script input type date -- shadow DOM -- . Incomplete .. . Answer : int32 t is right in that Shadow DOM by definition is a way to fill a node with DOM that you want to hide from external sources Encapsulation http : en.wikipedia.org wiki Encapsulation 28object-oriented programming 29 . The point is that you as the component author get to choose exactly which parts will be exposed to outside CSS or JavaScript and which will not . Unfortunately you cannot create a public JavaScript interface to your Shadow DOM without using another bleeding-edge spec called Custom Elements http : www.w3.org TR components-intro custom-element-section . If you choose to do that it s as simple as adding custom public methods to your element s prototype . From these you can access the internals of your Shadow DOM see the third example here http : www.w3.org TR components-intro using-custom-elements-in-script . You can however expose hooks for CSS to access the internals of your Shadow DOM without using Custom Elements . There are two ways to do that : .. . .. . 1 . Pseudo-elements .. . 2 . CSS Variables .. . .. . Pseudo-elements .. . .. . Chrome and Firefox expose certain parts of their Shadow DOM to CSS through special pseudo-elements . Here s http : jsfiddle.net 6y9XT 3 your example of the date input with the addition of a CSS rule that only applies to the numerical part of the date field through use of the Chrome-provided -webkit-datetime-edit pseudo-element . Here s https : gist.github.com afabbro 3759334 a partial list of the available WebKit pseudo-elements . You can also just enable the Show Shadow DOM option in DevTools and look for attributes named pseudo . Component authors can also create their own pseudo-elements to expose parts of their Shadow DOM see the 2nd example here http : www.html5rocks.com en tutorials webcomponents shadowdom-201 toc-custom-pseduo . CSS Variables .. . .. . An even better way is to use CSS Variables which you can enable with Enable experimental WebKit features in about : flags in Chrome . Then check out this fiddle http : jsfiddle.net tBFXs 2 which uses CSS Variables to communicate to the Shadow DOM what color it should use for its theme . Comment : Brilliant thanks a lot Comment : It makes sense that you shouldn t be able to access the Shadow DOM from Javascript without some tricks . But is there a way to run Javascript in there at all Comment : I m not the best person to ask as far as vanilla Shadow DOM goes but you certainly can when you re using Custom Elements . Check out Polymer http : www.polymer-project.org getting-started.html add-propertiesmethods-to-your-component for example .", "Question : I have a project where I m using the shadow DOM natively not through a polyfill . I d like to detect if a given element is contained within a shadow DOM or a light DOM . I ve looked through all of the properties on the elements but there don t seem to be any which vary based on the type of DOM an element is in . How can I determine if an element is part of a shadow DOM or a light DOM .. . .. . Here is an example of what is considered shadow DOM and light DOM for the purpose of this question . doctype html .. . title .. . isInShadow test document - can not run in Stack Exchange s sandbox .. . title .. . iframe src about : blank iframe .. . script .. . .. . function isInShadow element .. . TODO .. . .. . .. . function test .. . light root Document .. . light HTML .. . var html document.documentElement .. . .. . console.assert isInShadow html false .. . .. . light BODY .. . var body document.body .. . .. . console.assert isInShadow body false .. . .. . light DIV .. . var div document.createElement div .. . body.appendChild div .. . .. . console.assert isInShadow div false .. . .. . shadow root ShadowRoot .. . var divShadow div.createShadowRoot .. . .. . var shadowDiv document.createElement div .. . divShadow.appendChild shadowDiv .. . .. . shadow DIV .. . console.assert isInShadow shadowDiv true .. . .. . shadow IFRAME .. . var iframe document.querySelector iframe .. . shadowDiv.appendChild iframe .. . .. . console.assert isInShadow iframe true .. . .. . light root Document .. . var iframeDocument iframe.contentWindow.document .. . .. . light HTML .. . var iframeHtml iframeDocument.documentElement .. . .. . console.assert isInShadow iframeHtml false .. . .. . light BODY .. . var iframeBody iframeDocument.body .. . .. . .. . console.assert isInShadow iframeHtml false .. . .. . light DIV .. . var iframeDiv iframeDocument.createElement div .. . iframeBody.appendChild iframeDiv .. . .. . console.assert isInShadow iframeDiv false .. . .. . shadow root ShadowRoot .. . var iframeDivShadow iframeDiv.createShadowRoot .. . .. . shadow DIV .. . var iframeDivShadowDiv iframeDocument.createElement div .. . iframeDivShadow.appendChild iframeDivShadowDiv .. . .. . console.assert isInShadow iframeDivShadowDiv true .. . .. . none Unattached DIV of second Document .. . var iframeUnattached iframeDocument.createElement div .. . .. . console.assert Boolean isInShadow iframeUnattached false .. . .. . none Unattached DIV of first Document .. . var rootUnattached document.createElement div .. . .. . console.assert Boolean isInShadow rootUnattached false .. . .. . .. . onload function main .. . console.group Testing .. . try .. . test .. . console.log Testing complete . .. . finally .. . console.groupEnd .. . .. . .. . .. . script .. . Answer : Lets understand Light Dom : .. . .. . The Light DOM is the user supplied DOM of an element that hosts a shadow root . For more info read at polymer-project . https : www.polymer-project.org platform shadow-dom.html shadow-dom-subtrees .. . .. . This means : Light DOM is always relative to the next ancestor which hosts a shadow root . An Element can be a part of the light dom of a custom-element while it can be a part of the shadow root of another custom-element at same time . Example : .. . .. . According to your question : .. . .. . If you want to know if an element is in a shadow root you just need to grab the element out of the document . The only Light DOM which is not preceeded by a shadow Root is part of the document because Light DOM is relative as shown above . .. . .. . It doesnt work backwards : if its part of the document its not in a Light DOM at all . You need to check if one of the ancestors is hosting a Shadow Root like suggested from Leo . You can use this approach with other elements to . Just replace the document with e.g . my-custom-element and test if div LDofMCE is in Light DOM relative to my-custom-element . Because of the lack of information about why you need this information i cant get closer.. . .. . .. . EDIT : .. . .. . It doesnt work backwards should be understand as follows : .. . .. . Is this element in a Shadow Root : document.contains or the isInShadow node method from Leo deliver the answer . backwards Question : Is this element in a Light DOM In case you start searching relative to document : domcument.contains does not deliver the answer because to be in a Light Dom - one of the elements ancestors needs to be a shadow host . Come to the Point .. . .. . Light DOM is relative . An element can take part in a shadow root and in a light dom at the same time . there is no is part of a shadow DOM OR a light DOM Comment : Create an element with createElement but not append to the document that element also returns false . Is this what do you mean by doesn t work backwards I didn t catch that sentence honestly . However in some way a nice try : Comment : edited answer.. . sorry for the bad word choice", "Question : This question is more aimed at user-created shadow DOM elements but for accessibility I ll use the date input type for this question : .. . .. . Say for example I have a date input on my page . With a couple of bits edited out the shadow DOM markup for this using Chrome looks something like : .. . .. . The methods and properties associated with the date input do not appear to reference the shadow DOM at all JSFiddle http : jsfiddle.net 6y9XT 2 so I was wondering how if at all can these shadow DOM elements be accessed Comment : Your question is how to access the DOM elements within the shadow DOM Also your JSFiddle is incomplete . Comment : No how to access shadow DOM elements through the shadow DOM s parent document . script Access here script input type date -- shadow DOM -- . Incomplete .. . Answer : Now 2016 you can access an element inside a Shadow DOM tree using the method querySelector on the Shadow DOM root : .. . .. . NB : it works only with user created Shadow DOM elements no user-agent ones . Shadow Root .. . var root container.createShadowRoot .. . .. . Inside element .. . var span document.createElement span .. . span.textContent i m inside the Shadow DOM .. . span.id inside .. . root.appendChild span .. . .. . Access inside element .. . function get .. . .. . alert container.shadowRoot.querySelector inside .id .. . .. . .. . .. . DOCTYPE html .. . html .. . head .. . title title .. . meta charset utf-8 .. . head .. . body .. . div id container div .. . button onclick get Get button .. . script .. . script .. . body .. . html", "Question : I want to serialize an entire HTML DOM including Shadow DOM trees into a string i.e . including both the shadow host and shadow root in a way that they can be reconstructed . I can programatically access the Shadow DOM via .shadowRoot.innerHTML but calling .outerHTML on the entire DOM or using an XMLSerializer does not include the shadowRoot . Is there a way to serialize the entire HTML document including Shadow DOM trees Comment : Can you include html js that you have tried at Question .. . Answer : I want to serialize an entire HTML DOM including Shadow DOM trees into a string i.e . including both the shadow host and shadow root in a way that they can be reconstructed . Note shadowRoot nodes are not clonable though you should be able to iterate childNodes of shadowRoot to retrieve .nodeValue or .innerHTML of each node within shadowRoot . Alternatively you can call .innerHTML chained to .treeRoot property of shadowRoot to retrieve full html of shadowRoot . .. . .. . I can programatically access the Shadow DOM via .shadowRoot.innerHTML but calling .outerHTML on the entire DOM or using an XMLSerializer does not include the shadowRoot . You can use .outerHTML called on .host to retrieve html of element within document which hosts shadowRoot . The shadowRoot can then be reconstructed by creating a template element setting .innerHTML to variable shadowHTML which is string .treeRoot.innerHTML appending newly created template element to a shadowRoot .", "Question : Can the Shadow DOM W3C draft be polyfilled in JavaScript by providing custom functions for searching and traversing the DOM Has this been done The attempts I ve found have been rather meek shims and appear not to make much effort to emulate the spec . I appreciate that this is not an easy task but surely someone has given it a thorough consideration Comment : I can t image how this would work as the Shadow DOM is exposing the browser internal UI that has not been available until this point . A solution would need to completely replicate the browser UI behaviour from scratch . Comment : @Matt Stone - One idea could be to have CSS hide dom elements that are part of the shadow-dom and amend the Javascript DOM query functions for example getElementById such that they will not return any hidden DOM elements . Of course there is much more to it than that and a polyfill would obviously have limitations . Comment : @PatriciaBrothers it could possibly be emulated using document fragments or by removing the shadow components from the DOM and putting them into say a div . I doubt this stuff is widely implemented yet so not much need for it . .. . Answer : I ve been working on this exact problem for the last few months . Bottom line there is a polyfill that works on evergreen browsers here https : github.com Polymer ShadowDOM .. . .. . polyfilling of CSS features like @host are not in there yet coming soon .. . .. . So yes it s a hard thing to polyfill specifically because we have to invent secondary DOM trees . We tried to make it as user-friendly as possible which required the use of a rather invasive wrapper technique . In other words if you div document.createElement div you get a thing that looks like a DIV and works like a DIV but is actually a Wrapper object . The ultimate goal of course is for your code to look the same whether its running under the polyfill or under a native implementation . It s not 100 bulletproof in particular it s not possible for us to wrap document for you so you have to do that yourself a la : .. . .. . Other than the document issue the wrappers are intended to work transparently . This is all brand new so I apologize for the lack of docs . We are working on that as we speak . Please file issues https : github.com Polymer ShadowDOM issues new if you have questions or problems we love to get feedback . There is also an email channel for discussing this polyfill and the other polyfills in that org at polymer-dev@googlegroups.com . I doubt this stuff is widely implemented .. . .. . True but it s in Chrome at least . Comment : Wow Scott . This is amazing . I assume this would will be a hit were you present this att Google I O . If Web Components can be successfully polyfilled in any shape or form on IE9 10 the browser vendor who must not be named will be forced to jump on your suggested and beautiful W3C submissions . Otherwise there are plenty of reasons and forces at work to make this another WebGL or Dart . This will make a great deal of ISVs target the web rather than the desktop for many categories of applications . Comment : The shim is very impressive...I wonder is it a viable option for websites that need to be mobile-friendly I m sure there must be a performance hit involved in maintaining the shadow DOM . Comment : Yes there is a performance cost for polyfilling shadow DOM but we don t have any hard numbers yet . All the development is out in the open so we will share any data we generate . The hope is that when used in concert with other technologies like Custom Elements and MDV the usage patterns will tend to provoke the polyfill less frequently . Comment : This sounds great How is browser support for it Does it support IE8 Mobile browsers", "Question : I have a project where I m using the shadow DOM natively not through a polyfill . I d like to detect if a given element is contained within a shadow DOM or a light DOM . I ve looked through all of the properties on the elements but there don t seem to be any which vary based on the type of DOM an element is in . How can I determine if an element is part of a shadow DOM or a light DOM .. . .. . Here is an example of what is considered shadow DOM and light DOM for the purpose of this question . doctype html .. . title .. . isInShadow test document - can not run in Stack Exchange s sandbox .. . title .. . iframe src about : blank iframe .. . script .. . .. . function isInShadow element .. . TODO .. . .. . .. . function test .. . light root Document .. . light HTML .. . var html document.documentElement .. . .. . console.assert isInShadow html false .. . .. . light BODY .. . var body document.body .. . .. . console.assert isInShadow body false .. . .. . light DIV .. . var div document.createElement div .. . body.appendChild div .. . .. . console.assert isInShadow div false .. . .. . shadow root ShadowRoot .. . var divShadow div.createShadowRoot .. . .. . var shadowDiv document.createElement div .. . divShadow.appendChild shadowDiv .. . .. . shadow DIV .. . console.assert isInShadow shadowDiv true .. . .. . shadow IFRAME .. . var iframe document.querySelector iframe .. . shadowDiv.appendChild iframe .. . .. . console.assert isInShadow iframe true .. . .. . light root Document .. . var iframeDocument iframe.contentWindow.document .. . .. . light HTML .. . var iframeHtml iframeDocument.documentElement .. . .. . console.assert isInShadow iframeHtml false .. . .. . light BODY .. . var iframeBody iframeDocument.body .. . .. . .. . console.assert isInShadow iframeHtml false .. . .. . light DIV .. . var iframeDiv iframeDocument.createElement div .. . iframeBody.appendChild iframeDiv .. . .. . console.assert isInShadow iframeDiv false .. . .. . shadow root ShadowRoot .. . var iframeDivShadow iframeDiv.createShadowRoot .. . .. . shadow DIV .. . var iframeDivShadowDiv iframeDocument.createElement div .. . iframeDivShadow.appendChild iframeDivShadowDiv .. . .. . console.assert isInShadow iframeDivShadowDiv true .. . .. . none Unattached DIV of second Document .. . var iframeUnattached iframeDocument.createElement div .. . .. . console.assert Boolean isInShadow iframeUnattached false .. . .. . none Unattached DIV of first Document .. . var rootUnattached document.createElement div .. . .. . console.assert Boolean isInShadow rootUnattached false .. . .. . .. . onload function main .. . console.group Testing .. . try .. . test .. . console.log Testing complete . .. . finally .. . console.groupEnd .. . .. . .. . .. . script .. . Answer : You can check if an element has a shadow parent like this : .. . .. . This uses instanceof over .toString . Comment : however this may fail in iframe Comment : Fail how Can you provide a small example Comment : Here s a simple example : gist.github.com myst729 1d775dcb3c7ddae747b2 https : gist.github.com myst729 1d775dcb3c7ddae747b2 My comment under that gist is the log result . Comment : Well that s silly o.O Apparently toString is more reliable then.. .", "Question : I am working on a Polymer application and I am having trouble adding a Google Plus +1 button to the page . It seems the javascript for creating the button is not compatible with shadow DOM . I am trying to add this element deep inside several shadow DOMs as this is a large application . Using the normal method of adding the button to the page just does nothing .. . .. . This and any other method where the script auomatically tries to find the element do nothing . This is because the query selecter being used by the script doesn t look within the shadow DOM . Now explicitly rendering the button works... . sort of .. . .. . Then in the script for the parent element .. . .. . The button shows up properly and it almost works . When you click it it does add 1 and opens the internal dialog to add a comment . But its broken the dialog size is wrong and when it tries to load information about the url it just loads forever and most of the interface in the dialog doesn t work . enter image description here http : i.stack.imgur.com m0PQg.png .. . .. . You get an error in the console too .. . .. . That line is .. . .. . Obviously that wont work with Shadow DOM because the document of the window will be the top level of the DOM and it won t find the actual element . It s weird that Google would do this and look all the way up from the window document when I gave them the only element they would ever need to touch when I called the render function . If I put all this in a separate document and load it in via an iframe that s what I did for the facebook one I loose functionality because it tries to open the internal dialog inside the tiny iframe and it s unusable . Does anyone know a workaround that will allow you to use a Google Plus button within the shadow or at the very least a way to force the Google plus button to use a popup window for the comment dialog like the facebook button does I have found a few different polymer-elements made by other people for Google Plus buttons but none of them have templates and all add the elements in dynamically so there is no shadow-dom for that element but these elements dont work if they are already inside of a shadow-dom . In my case I have a share paper-dialog that I want to put these buttons in and the paper-dialog puts everything inside it s own shadow-dom . So I cannot eliminate shadow-dom from the application . Any help here would be greatly apreciated Comment : I have the same problem and tried the same things with you with no success . It s weird Google s own projects interfere with each other . .. . Answer : The trick seems to be with this.async see the following code for an example : .. . .. . https : github.com kunalnagar googleplus-badge blob master googleplus-badge.html .. . .. . Here are the pertinent parts :", "Question : What am I doing : .. . .. . I m coding my new app using stateless components with Angular 2 . What I want to do .. . .. . I want create generic component list which contain repeated widgets . There can be a few types of them : .. . .. . Simple item .. . Habit widget item .. . Another widget item .. . .. . So I can create list of habits list of users etc . and it s not always a table . It can be list of any widget . What am I doing to reach it . In my statefull view html I put list component and using Web Component s transclusion set what type of widget should be repeated inside . statefull view .. . .. . list component .. . .. . What s the problem with my solution .. . .. . I need to pass habits object to 2 different places what will cause difficult to find problem if I don t pass the same . Need to handle ngFor from the app view . So I m doing something what list component should handle itself . Conclusion .. . .. . Is there any better solution how I can put list component inside my statefull view HTML and decide there what type of widgets it should contain Of course I will create all this widgets . Comment : How is stateless and shadow DOM related to this all I guess you relate to content from Polymer which allows to project children into the view of another component - is that the case In Angular2 this is ng-content . I looked a bit into a similar list implementation . I think it s possible but not too easy . You could just use ngFor and just use a class that does the data-manipulation instead of a component . Otherwise I think a starting point is the TemplateRef class and the NgFor implementation . Comment : Shadow DOM is used by Angular2 like a new alternative to translusion . These components what I m creating are stateless . They should be stupid and generic . Comment : Ok then I assumed right . Shadow DOM itself isn t really about transclusion but the content or ng-content tag does it . Angular2 defaults to encapsulation : ViewEncapsulation.Emulated which is not shadow DOM . To enable shadow DOM you need to set encapsulation : ViewEncapsulation.Native on each component but that s not really related to your question . Transclusion works mostly the same with or without shadow DOM in Angular 2 . .. . Answer : I find it strange to create dom elements in one component and then simply reproduce them in another - you should be passing your model down the component tree ideally smaller and smaller parts of the model using attributes . In your particular example I don t see two genuinely different parts of the DOM so I would not use nested components at all .", "Question : I have a project where I m using the shadow DOM natively not through a polyfill . I d like to detect if a given element is contained within a shadow DOM or a light DOM . I ve looked through all of the properties on the elements but there don t seem to be any which vary based on the type of DOM an element is in . How can I determine if an element is part of a shadow DOM or a light DOM .. . .. . Here is an example of what is considered shadow DOM and light DOM for the purpose of this question . doctype html .. . title .. . isInShadow test document - can not run in Stack Exchange s sandbox .. . title .. . iframe src about : blank iframe .. . script .. . .. . function isInShadow element .. . TODO .. . .. . .. . function test .. . light root Document .. . light HTML .. . var html document.documentElement .. . .. . console.assert isInShadow html false .. . .. . light BODY .. . var body document.body .. . .. . console.assert isInShadow body false .. . .. . light DIV .. . var div document.createElement div .. . body.appendChild div .. . .. . console.assert isInShadow div false .. . .. . shadow root ShadowRoot .. . var divShadow div.createShadowRoot .. . .. . var shadowDiv document.createElement div .. . divShadow.appendChild shadowDiv .. . .. . shadow DIV .. . console.assert isInShadow shadowDiv true .. . .. . shadow IFRAME .. . var iframe document.querySelector iframe .. . shadowDiv.appendChild iframe .. . .. . console.assert isInShadow iframe true .. . .. . light root Document .. . var iframeDocument iframe.contentWindow.document .. . .. . light HTML .. . var iframeHtml iframeDocument.documentElement .. . .. . console.assert isInShadow iframeHtml false .. . .. . light BODY .. . var iframeBody iframeDocument.body .. . .. . .. . console.assert isInShadow iframeHtml false .. . .. . light DIV .. . var iframeDiv iframeDocument.createElement div .. . iframeBody.appendChild iframeDiv .. . .. . console.assert isInShadow iframeDiv false .. . .. . shadow root ShadowRoot .. . var iframeDivShadow iframeDiv.createShadowRoot .. . .. . shadow DIV .. . var iframeDivShadowDiv iframeDocument.createElement div .. . iframeDivShadow.appendChild iframeDivShadowDiv .. . .. . console.assert isInShadow iframeDivShadowDiv true .. . .. . none Unattached DIV of second Document .. . var iframeUnattached iframeDocument.createElement div .. . .. . console.assert Boolean isInShadow iframeUnattached false .. . .. . none Unattached DIV of first Document .. . var rootUnattached document.createElement div .. . .. . console.assert Boolean isInShadow rootUnattached false .. . .. . .. . onload function main .. . console.group Testing .. . try .. . test .. . console.log Testing complete . .. . finally .. . console.groupEnd .. . .. . .. . .. . script .. . Answer : Warning : Deprecation Risk .. . .. . The : : shadow pseudo-element is deprecated in and being removed from from the dynamic selector profile https : groups.google.com a chromium.org forum msg blink-dev 68qSZM5QMRQ pT2YCqZSomAJ . The approach below only requires that it remain in the static selector profile but it may also be deprecated and removed there in the future . Discussions are ongoing https : github.com w3c webcomponents issues 78 . We can use Element s .matches method https : developer.mozilla.org en-US docs Web API Element.matches to determine if an element is attached to a shadow DOM . If and only if the element is in a shadow DOM we will be able to match it by using the selector : host to identify elements that have a Shadow DOM : : shadow to look in those shadow DOMs and and to match any descendant . function isInShadow element .. . return element.matches : host : : shadow .. . .. . .. . console.group Testing .. . .. . var lightElement document.querySelector div .. . .. . console.assert isInShadow lightElement false .. . .. . var shadowChild document.createElement div .. . lightElement.createShadowRoot .appendChild shadowChild .. . .. . console.assert isInShadow shadowChild true .. . .. . var orphanedElement document.createElement div .. . .. . console.assert isInShadow orphanedElement false .. . .. . var orphanedShadowChild document.createElement div .. . orphanedElement.createShadowRoot .appendChild orphanedShadowChild .. . .. . console.assert isInShadow orphanedShadowChild true .. . .. . var fragmentChild document.createElement div .. . document.createDocumentFragment .appendChild fragmentChild .. . .. . console.assert isInShadow fragmentChild false .. . .. . console.log Complete . .. . console.groupEnd .. . .. . .. . div div Comment : Interestingly this document http : dev.w3.org csswg css-scoping shows the use of : host : : shadow although the description I see implies that any element that has a : : shadow must necessarily be a : host which would make the pseudo-class quite redundant . I am not sure if it is actually necessary to specify : host for reasons I m not understanding from the spec or due to implementation limits . It also makes no mention of how : root would affect a shadow DOM if at all and neither does Selectors 4 http : dev.w3.org csswg selectors-4 the-root-pseudo nor the Shadow DOM spec.. .", "Question : I am searching a way to styling shadow DOM from the outside . For example I would like to set the color of all text in all span.special elements as RED . Including span.special elements from shadow DOM . How I can do this Previously there were : : shadow pseudo-element and deep combinator aka for this purpose . So I could write something like .. . .. . But now : : shadow deep and are deprecated . So what do we have as a replacement of them .. . Answer : Well @import is not a solution if you are working with library web-component that you can t change .. . Finally I found several ways to do it : .. . .. . 1 Cascading . Styles of Shadow DOM s host element affect Shadow DOM elements also . Not an option if you need to style a particular element of the Shadow DOM not every . 2 Custom properties https : www.polymer-project.org 1.0 docs devguide styling If an author of the web-component provided such . 3 In Polymer the have Custom Mixins also https : www.polymer-project.org 1.0 docs devguide styling .. . .. . 4 @import but only for not-library components .. . .. . So there are several possibilities but all of them are limited . No powerful enough way to outside styling as : : shadow were .", "Question : Shadow dom encapsulate css styles selectors don t cross the shadow boundary . Question : How to use global common css styles in shadow-dom suppose there are some common css styles which will be used across all pages e.g . : font-family h1 h2 clear reset .. . how to make it works in shadow-dom .. . Answer : Some solutions : .. . .. . CSS variables : .. . 1 . http : www.html5rocks.com en tutorials webcomponents shadowdom-201 .. . 2 . https : developers.google.com web updates 2016 02 css-variables-why-should-you-care hl en .. . 3 . http : blog.chromium.org 2016 02 chrome-49-beta-css-custom-properties.html .. . : host-context : http : www.html5rocks.com en tutorials webcomponents shadowdom-201 .. . Also I haven t tested but someone suggested @import url common-style.css here : Polymer share styles across elements http : stackoverflow.com questions 30829019 polymer-share-styles-across-elements 32941101 32941101 .. . .. . Please note one of the articles listed above was also pointed out by Amid . By the time that article was written Chrome had no CSS variables . But now it already works natively with the recently launched Google Chrome 49 . Comment : Thanks So CSS variable : host-context : : shadow deprecated are the answers for this question . While the context for this question is : when I m trying angular2 it introduces shadow DOM for components . My concern is if we encapsulate the whole page into one nested shadow DOM tree above things may not be a solution for css sharing imagine we involve in bootstrap how do we use it in shadow DOM" ] }
[ "yes-answer-long", "yes-answer-short" ]
dom
UNK_RELATION
sybase-bcp@sap@72
sybase-bcp -- the bcp utility is used to export or import data from or @placeholder sybase adaptive server enterprise databases to a data file in a user-specified format .
{ "confidence": [ 63.30310821533203, 58.916717529296875, 56.03855895996094, 53.862403869628906, 53.76991271972656, 52.151123046875, 50.3741340637207, 49.41045379638672, 49.17453384399414, 47.590187072753906, 47.590187072753906, 46.94036865234375, 46.104286193847656, 45.41893768310547, 45.08648681640625, 43.782745361328125, 43.57084274291992, 43.435340881347656, 43.421722412109375, 43.2236328125, 43.0463981628418, 43.0463981628418, 43.0463981628418, 39.10224151611328, 39.039215087890625, 37.97615432739258, 36.51881790161133, 34.9268684387207, 34.91404342651367, 34.29938888549805, 33.84166717529297, 33.80117416381836, 33.315250396728516, 32.94903564453125, 32.1225700378418, 30.290708541870117, 29.87494659423828, 29.24547576904297, 28.63364028930664, 28.1219425201416, 28.1219425201416, 28.1219425201416, 26.099742889404297, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 25.690441131591797, 24.950435638427734, 23.540546417236328, 20.55820083618164, 19.159908294677734, 17.169281005859375, 17.169281005859375, 14.856733322143555, 14.856733322143555 ], "content": [ "When we bcp in sybase the following results are produced .", "Is there a way I can load timestamp data into my sybase table using LOAD TABLE BCP query", "A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database .", "1 Java isn t designed for that so it will be very slow 2 native bcp or C+bcp or perl+bcp or any shell command+bcp would scream circles around it and displace it anyway .", "3 . bcp is an utility PROGRAM exists on its own supplied by the vendor that connects to the server much more tightly .", "@Matthias BCP Bulk copy program is used to download the table data into file .", "BCP out the view", "Does anybody know if this is available or not in sybase 15", "We have a system with a lot of Java and its not practical or very effective to shell out from Java and run the BCP command-line utility .", "I disagree with your comments on Java using a BCP api .", "It s like wanting to run bcp via ODBC or JDBC .", "That is preferable to having to rewrite your application or to calling a separate task to BCP the data .. . .. . I assume you d rather not rewrite your whole application in C++ -", "Finally for understanding even if you did obtain the bcp capability in some Library and implemented it when you place the program in the real world any reasonable DBA will dismiss it due to its trickle speed data transport and use bcp with its fire hose instead .", "Is there a way to get BCP out to return NULL values rather then just blanks .. . .. . Current Output : .. . .. . What I want : .. . .. . BCP out code :", "What does BCP stand for See BCP the tag description http : stackoverflow.com tags bcp info .", "Whilst I agree about the limitations of Java and ODBC JDBC that doesn t mean there aren t advantages of using a Java BCP api .", "Much later the vendor made the bcp capability available as a Library API in your terms which can therefore be invoked from any reasonably architected compiler .", "how to do it in sql-server as same as sybase .", "Therefore even then it would be absurd to provide the bcp capability to the Java library that would be worthwhile if and when Java which was designed with other priorities in mind is annointed with large-data transfer capability .", "What does BCP stand for", "In sybase 12 I noticed that the api was exposed in the C client library but not the java one .", "I ve been looking but I haven t found anything that says they ve yet implemented it in the sybase 15 java client library .", "There certainly have been native java drivers to Sybase for a long time no need to go through ODBC .", "Note to readers who expect this to be a complete list : There are two other options which I have not detailed here because they are server-server and not relevant to this thread . .. . .. . Since Java PROGRAMS are currently limited to the one millimetre connection to the ASE server there is no use in providing the bcp API to Java you will merely have a two and a half inch fire hose reticulated through the network with a FLOW of one millimetre it is an absurd enterprise .", "If used on the same host as the server since the hose is not reticulated through the network it moves data even faster .", "But why on Earth would you want to move masses of data from Java to the server", "While this is quite adequate for tasks such as using Excel to draw charts directly from ASE tables where the data-transfer speed is not relevant it is quite inadequate for moving data of any substantial volume for normal app access to a data server except where the programmer is ignorant of the fact that 1 is available .", "Programmers who are not limited to Java think about where the large-data source is located minimise data transfers across networks think about what PROGRAMS are already written and that can be used as opposed to writing their own in isolation from the rest of the planet and use them .", "It also requires the writing of data to a file which is going to increase the number of operations and slow down the whole process .", "It is designed to move large-data volumes at speed .", "a native Open Client Library was implemented it still cannot move data as fast as C C++ COBOL Perl PB it will move data at a trickle quarter inch", "MySQL RUby etc all freeware is wide open to hacking enterprise dbs are not .", "Second Java cannot handle large source data sets efficiently it was not designed for that .", "2324336 john christopher 19900702 .. . .. . but when we bcp in SQL results are different as below .", "Running the command-line utility doesn t give very good error reporting and deadlock retries .", "An ordinary PROGRAM that connects to the ASE server Client-Server style uses the provided Open Client Library this is native and moves the TDS packets efficiently .", "Sometime we can t even write a file as its on a grid which doesn t have a file system and tmp is too small .", "ODBC and thus JDBC because it is built on top of ODBC is a simple method of connecting to the server using a one millimetre hose .", "It s sad that a spec will hinder a company from writing useful software .", "We need to move away from Maslow s Hammer and Use the Right Tool for the Job .", "C C++ COBOL and Perl are such and produce PROGRAMS and therefore provide access to this library directly from your code .", "You cannot obtain the speed of a greyhound from a dachshund there is no use giving it racetrack training .", "Here both the format file is same .", "It lies cheats and steals and skips check-constraints all in the name of speed .", "Great I m all for it .", "As for the speed well JBCP is slower than native api however it is acceptable and certainly faster than calling repeated insert commands .", "Mwillett author of JBCP", "I am not a terribly articulate person but in my soul I know that every programmer knows as you have mentioned that You Just Don t Shell To Command Line Programs To Get Things Done .", "You just don t .", "Thank you for wording it so nicely .", "I am thinking not it may be more an issue with fitting that operation into the JDBC spec .", "I do see a JBCP project out on SourceForge but don t have any experience with it .", "I think you re right .", "If you don t mind your Java program not being portable anymore you can link-to any C library via JNI .", "that s a very good point I don t know why that didn t occur to me 4 years ago .", ": - But alas that problem is a problem no more but this would have been a very good workable idea .", "The answer is NO .", ".. . .. . Further detail responding to comments : .. . .. . 1 .", "The connection is a universally available one inch garden hose .", "PROGRAMS written in C C++ COBOL Perl and PowerBuilder use this transport .", "2 .", ".", "Java does not have 1 and is limited to this 2 transport .", "It is not a special bit of the client API .", "There is no lying and cheating involved all constraints are directed by the DBA performing the task .", "The connection is a two and a half inch fire hose not generally available to the public .", "4 .", "The connection is the same two and a half inch fire hose but due to the additional layers it runs at a maximum speed of a two inch fire hose .", "There is a reason why despite the millions many organisations have poured into Java during its rather long um progression none of them have spent money in providing a firehouse that moves drips and drops .", "You can stop whispering promises in its ear .", "Therefore even if the JDBC strangulation was lifted eg .", "in the one inch hose .", "It may help to move out of your Java Java and nothing but Java mindset and Use the Right Tool PROGRAM for the Job .", "If you are a Java programmer then at least you need to familiarise yourself with the capability and limitations of your programming language and the libraries available .", "The original question demonstrates complete ignorance of that hence I had to supply it in my revised post .", "catless.ncl.ac.uk Risks 26.20.html subj2 http : catless.ncl.ac.uk Risks 26.20.html subj2", "I found this great article on why you shouldn t run shells to get things done .", "You re looking for evidence to support your fixed position .", "The idiot who implemented the reported system does not understand how to set up security on an Unix system .", "But let s not get distracted there are millions maybe billions of shell perl scripts running successfully on the planet most secured but some mickey mouse shops are unsecured .", "Java can be quite slow particularly when programmers insist on massive object structures which are all built on the heap with 12 bytes of overhead per object and pointers flying everywhere .", "However for low-level loops Java is not much slower than C++ an interesting exception is some abysmal floating-point functions .", "create a view from table and convert NULL columns into string NULL .", "Do you really need a timestamp format", "ex : I want to load timestamp of this format 2000 01 01 : 12 : 00 : 00 AM using LOAD TABLE and it is throwing error : .. . .. . cannot convert to Timestamp", "might this be because the MS SQL Server table was created with SET ANSI PADDING ON", "Can you use datetime", "@daria both are same. . Aren t they", "Maybe you can remove the trailing whitespaces", "@MatthiasW ." ] }
{ "confidence": [ 88.81790161132812, 88.7708740234375, 81.88038635253906, 80.21951293945312, 77.70642852783203, 70.16059112548828, 54.037086486816406 ], "content": [ "Question : A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database . It lies cheats and steals and skips check-constraints all in the name of speed . Great I m all for it . In sybase 12 I noticed that the api was exposed in the C client library but not the java one . I ve been looking but I haven t found anything that says they ve yet implemented it in the sybase 15 java client library . Does anybody know if this is available or not in sybase 15 .. . Answer : I disagree with your comments on Java using a BCP api . Whilst I agree about the limitations of Java and ODBC JDBC that doesn t mean there aren t advantages of using a Java BCP api . We have a system with a lot of Java and its not practical or very effective to shell out from Java and run the BCP command-line utility . Running the command-line utility doesn t give very good error reporting and deadlock retries . It also requires the writing of data to a file which is going to increase the number of operations and slow down the whole process . Sometime we can t even write a file as its on a grid which doesn t have a file system and tmp is too small . As for the speed well JBCP is slower than native api however it is acceptable and certainly faster than calling repeated insert commands . Mwillett author of JBCP Comment : I am not a terribly articulate person but in my soul I know that every programmer knows as you have mentioned that You Just Don t Shell To Command Line Programs To Get Things Done . You just don t . Thank you for wording it so nicely .", "Question : null .. . Answer : When we bcp in sybase the following results are produced . 2324336 john christopher 19900702 .. . .. . but when we bcp in SQL results are different as below . Here both the format file is same . how to do it in sql-server as same as sybase . Comment : What does BCP stand for Maybe you can remove the trailing whitespaces Comment : @MatthiasW . What does BCP stand for See BCP the tag description http : stackoverflow.com tags bcp info . Comment : might this be because the MS SQL Server table was created with SET ANSI PADDING ON Comment : @Matthias BCP Bulk copy program is used to download the table data into file .", "Question : A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database . It lies cheats and steals and skips check-constraints all in the name of speed . Great I m all for it . In sybase 12 I noticed that the api was exposed in the C client library but not the java one . I ve been looking but I haven t found anything that says they ve yet implemented it in the sybase 15 java client library . Does anybody know if this is available or not in sybase 15 .. . Answer : The answer is NO . But why on Earth would you want to move masses of data from Java to the server 1 Java isn t designed for that so it will be very slow 2 native bcp or C+bcp or perl+bcp or any shell command+bcp would scream circles around it and displace it anyway . It s like wanting to run bcp via ODBC or JDBC . We need to move away from Maslow s Hammer and Use the Right Tool for the Job . .. . .. . Further detail responding to comments : .. . .. . 1 . An ordinary PROGRAM that connects to the ASE server Client-Server style uses the provided Open Client Library this is native and moves the TDS packets efficiently . The connection is a universally available one inch garden hose . PROGRAMS written in C C++ COBOL Perl and PowerBuilder use this transport . 2 . ODBC and thus JDBC because it is built on top of ODBC is a simple method of connecting to the server using a one millimetre hose . While this is quite adequate for tasks such as using Excel to draw charts directly from ASE tables where the data-transfer speed is not relevant it is quite inadequate for moving data of any substantial volume for normal app access to a data server except where the programmer is ignorant of the fact that 1 is available . . Java does not have 1 and is limited to this 2 transport . 3 . bcp is an utility PROGRAM exists on its own supplied by the vendor that connects to the server much more tightly . It is not a special bit of the client API . There is no lying and cheating involved all constraints are directed by the DBA performing the task . The connection is a two and a half inch fire hose not generally available to the public . It is designed to move large-data volumes at speed . If used on the same host as the server since the hose is not reticulated through the network it moves data even faster . 4 . Much later the vendor made the bcp capability available as a Library API in your terms which can therefore be invoked from any reasonably architected compiler . C C++ COBOL and Perl are such and produce PROGRAMS and therefore provide access to this library directly from your code . The connection is the same two and a half inch fire hose but due to the additional layers it runs at a maximum speed of a two inch fire hose . Note to readers who expect this to be a complete list : There are two other options which I have not detailed here because they are server-server and not relevant to this thread . .. . .. . Since Java PROGRAMS are currently limited to the one millimetre connection to the ASE server there is no use in providing the bcp API to Java you will merely have a two and a half inch fire hose reticulated through the network with a FLOW of one millimetre it is an absurd enterprise . There is a reason why despite the millions many organisations have poured into Java during its rather long um progression none of them have spent money in providing a firehouse that moves drips and drops . You cannot obtain the speed of a greyhound from a dachshund there is no use giving it racetrack training . You can stop whispering promises in its ear . Second Java cannot handle large source data sets efficiently it was not designed for that . Therefore even if the JDBC strangulation was lifted eg . a native Open Client Library was implemented it still cannot move data as fast as C C++ COBOL Perl PB it will move data at a trickle quarter inch in the one inch hose . Therefore even then it would be absurd to provide the bcp capability to the Java library that would be worthwhile if and when Java which was designed with other priorities in mind is annointed with large-data transfer capability . It may help to move out of your Java Java and nothing but Java mindset and Use the Right Tool PROGRAM for the Job . If you are a Java programmer then at least you need to familiarise yourself with the capability and limitations of your programming language and the libraries available . The original question demonstrates complete ignorance of that hence I had to supply it in my revised post . Programmers who are not limited to Java think about where the large-data source is located minimise data transfers across networks think about what PROGRAMS are already written and that can be used as opposed to writing their own in isolation from the rest of the planet and use them . Finally for understanding even if you did obtain the bcp capability in some Library and implemented it when you place the program in the real world any reasonable DBA will dismiss it due to its trickle speed data transport and use bcp with its fire hose instead . Comment : catless.ncl.ac.uk Risks 26.20.html subj2 http : catless.ncl.ac.uk Risks 26.20.html subj2 Comment : I found this great article on why you shouldn t run shells to get things done . Comment : You re looking for evidence to support your fixed position . The idiot who implemented the reported system does not understand how to set up security on an Unix system . MySQL RUby etc all freeware is wide open to hacking enterprise dbs are not . But let s not get distracted there are millions maybe billions of shell perl scripts running successfully on the planet most secured but some mickey mouse shops are unsecured . Comment : Java can be quite slow particularly when programmers insist on massive object structures which are all built on the heap with 12 bytes of overhead per object and pointers flying everywhere . However for low-level loops Java is not much slower than C++ an interesting exception is some abysmal floating-point functions . There certainly have been native java drivers to Sybase for a long time no need to go through ODBC .", "Question : A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database . It lies cheats and steals and skips check-constraints all in the name of speed . Great I m all for it . In sybase 12 I noticed that the api was exposed in the C client library but not the java one . I ve been looking but I haven t found anything that says they ve yet implemented it in the sybase 15 java client library . Does anybody know if this is available or not in sybase 15 .. . Answer : If you don t mind your Java program not being portable anymore you can link-to any C library via JNI . That is preferable to having to rewrite your application or to calling a separate task to BCP the data .. . .. . I assume you d rather not rewrite your whole application in C++ - Comment : that s a very good point I don t know why that didn t occur to me 4 years ago . : - But alas that problem is a problem no more but this would have been a very good workable idea .", "Question : A long time ago I figured out that bcp is just a little C program that calls the special bit of the sybase client api to do mass data moving into the database . It lies cheats and steals and skips check-constraints all in the name of speed . Great I m all for it . In sybase 12 I noticed that the api was exposed in the C client library but not the java one . I ve been looking but I haven t found anything that says they ve yet implemented it in the sybase 15 java client library . Does anybody know if this is available or not in sybase 15 .. . Answer : I am thinking not it may be more an issue with fitting that operation into the JDBC spec . I do see a JBCP project out on SourceForge but don t have any experience with it . Comment : I think you re right . It s sad that a spec will hinder a company from writing useful software .", "Question : null .. . Answer : Is there a way I can load timestamp data into my sybase table using LOAD TABLE BCP query ex : I want to load timestamp of this format 2000 01 01 : 12 : 00 : 00 AM using LOAD TABLE and it is throwing error : .. . .. . cannot convert to Timestamp Comment : Do you really need a timestamp format Can you use datetime Comment : @daria both are same. . Aren t they", "Question : null .. . Answer : Is there a way to get BCP out to return NULL values rather then just blanks .. . .. . Current Output : .. . .. . What I want : .. . .. . BCP out code : Comment : create a view from table and convert NULL columns into string NULL . BCP out the view" ] }
[ "yes-answer-long", "yes-answer-short" ]
sap
UNK_RELATION
freeglut@toolkit@74
freeglut -- freeglut is an open-source alternative to the opengl utility @placeholder glut library .
{ "confidence": [ 56.30205535888672, 49.57991027832031, 48.58414077758789, 48.06953048706055, 46.483062744140625, 46.444252014160156, 46.04621124267578, 44.93189239501953, 44.045631408691406, 43.93902587890625, 42.56203079223633, 42.18048095703125, 41.930782318115234, 41.841590881347656, 41.743438720703125, 41.70254135131836, 41.137874603271484, 41.137874603271484, 41.137874603271484, 40.94843673706055, 40.915889739990234, 40.915889739990234, 40.915889739990234, 40.65903091430664, 40.217098236083984, 40.12298583984375, 40.08974838256836, 40.08974838256836, 39.909324645996094, 39.434814453125, 39.434814453125, 39.434814453125, 39.434814453125, 38.97293472290039, 38.97293472290039, 38.97293472290039, 38.67741394042969, 38.67741394042969, 38.419925689697266, 37.95804214477539, 37.95804214477539, 37.95804214477539, 37.61654281616211, 37.4058723449707, 37.14759063720703, 37.14759063720703, 37.14759063720703, 37.14759063720703, 36.38732147216797, 36.38732147216797, 36.38732147216797, 36.38732147216797, 36.29245376586914, 36.1327018737793, 36.1327018737793, 36.1327018737793, 36.1327018737793, 36.08466339111328, 35.57923889160156, 35.57923889160156, 35.37242889404297, 35.247196197509766, 35.247196197509766, 35.247196197509766, 35.19141387939453, 34.973304748535156, 34.916324615478516, 34.916324615478516, 34.916324615478516, 34.232303619384766, 34.232303619384766, 34.232303619384766, 34.15605545043945, 34.049415588378906, 34.049415588378906, 34.049415588378906, 34.049415588378906, 34.049415588378906, 34.049415588378906, 34.0234260559082, 33.94041442871094, 33.705848693847656, 33.489463806152344, 33.45840835571289, 33.03452682495117, 33.03452682495117, 33.03452682495117, 33.03452682495117, 33.03452682495117, 33.03452682495117, 33.0085334777832, 32.994606018066406, 32.729190826416016, 32.64670181274414, 32.41059494018555, 32.41059494018555, 32.41059494018555, 32.41059494018555, 32.41059494018555 ], "content": [ "glut-and-freeglut http : www.lighthouse3d.com cg-topics glut-and-freeglut", "@jasonaburton : FreeGLUT is not the same thing as GLUT .", "The fact that it has no display callback makes GLUT unhappy https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg main.c L410 .", "I use FreeGLUT to include OpenGL .", "Precisely it is provided from the open-source freeglut http : docs.nvidia.com gameworks content gameworkslibrary optix optix release notes.htm : .. . .. . GLUT .. . .. . Most OptiX samples use the GLUT toolkit .", "OpenGL does not require freeGLUT but I have the feeling that you are writing OpenGL code from somewhere where freeGLUT is used instead of pure OpenGL hence the dependency on freeGLUT .", "I m using MSVC++ and freeglut in order to use openGL .", "install freeglut via macports modify premake4.lua so that it builds the Unofficial OpenGL SDK in the glsdk apart from freeglut .", "Why do you want to use both GLUT and freeglut", "The FreeGLUT version seems to be able to use moderately modern rendering methods VBOs based on browsing the source code https : github.com dcnieho FreeGLUT blob git master freeglut freeglut src fg geometry.c .", "Result of dpkg -L freeglut3-dev : .. . .. . Note that in freeglut http : freeglut.sourceforge.net s repository there is freeglut.pc.in https : github.com dcnieho FreeGLUT blob git master freeglut freeglut freeglut.pc.in file and is included in CMakeLists.txt https : github.com dcnieho FreeGLUT blob git master freeglut freeglut CMakeLists.txt .", "Take a look at github s mirror for its code https : github.com dcnieho FreeGLUT blob 5a6d3b2615d3b4d9629b65b5a0e0539037633963 freeglut freeglut src fg main.c L473 .. . .. . More information here : opengl glutmainloop http : stackoverflow.com q 1862496 1938163", "My goal is to use OpenGL 3.3 using FreeGLUT Is there a way to achieve that", "glutDestroyWindow mainly puts the window on a list to be destroyed https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg window.c L263 as well as clearing all callbacks https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg structure.c L177 except a destroy callback .", "You have to link you program in addition to including the header-files against glut and or the freeglut library .", "In my project I want to use a freeglut library from the unofficial opengl sdk .", "That appears to be something FreeGLUT added .", "One of those libraries is FreeGLUT .", "I use GLEW and freeglut .", "Is there a reason not to use ubuntu s packaged freeglut packages.ubuntu.com search keywords freeglut http : packages.ubuntu.com search keywords freeglut", "I am having problems with using a camera in OpenGL freeGLUT .", "A program crashes if I try to use ifstream while having OpenGL freeglut .", "However I believe it needs to be GLchar to work with OpenGL Freeglut GLEW .", "Windows are actually destroyed-at the end of each main loop https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg main.c L466 .", "to be complete you d need to provide a mingw-compatible glut library too no", "It includes freeglut for example .", "Hard to read but it appears you re not linking with the freeglut library .", "I m trying to use the SOIL library with freeglut and glew .", "Next I setup FreeGLUT by downloading the tarball http : sourceforge.net projects freeglut files freeglut 2.8.0 freeglut-2.8.0.tar.gz download from the project site http : freeglut.sourceforge.net index.php download .", "Freeglut ships with the Windows OptiX distribution .", "I m trying to get FreeGLUT working .", "I downloaded freeglut http : freeglut.sourceforge.net .", "No need to build or install freeglut seperately .", "This was definitely not supported for most solids in GLUT and as far as I can tell is still not supported for cylinders in FreeGLUT .", "The impression I got was that FreeGLUT was very different than GLUT and the example would not work as written .", "FreeGLUT implements many of the same functions but it also adds many more that were never in GLUT .", "completely outdated but an unofficial extension added by freeglut .", "In the code I just include a freeglut header .", "I m using freeGlut included in XQuartz", "I am just starting to learn Computer Graphics so that is why I am using glut freeglut to be more precise .", "From what I can understand I can include either glut or freeglut but not both together .", "Freeglut is an extended implementation of the SGI GLUT Toolkit and with a few exceptions around obsolete hardware implements the same functions .", "I did use the freeglut library but without any luck .", "Related question : installing Freeglut on Linux http : stackoverflow.com questions 11318510 installing-freeglut-on-linux .", "I want to create the opengGL context using freeglut .", "I have linked the static debug freeglut lib .", "I have a font render issue with Anttweakbar and Freeglut .", "Is that only for glsl or is there any way to use FreeGLUT", "I use VS2013 CUDA 7.5 Runtime OpenGl 4.5 Freeglut 2.6 and Anttweakbar 1.16 in my program .", "I have a program which runs in a window using OpenGL VS2012 with freeglut 2.8.1 .", "I m doing some tutorials on OpenGL http : www.arcsynthesis.org gltut Basics Tutorial 2001.html that use FreeGLUT http : freeglut.sourceforge.net .", "I m not familiar with Mac but you need to install both the OpenGL and GLU development libraries to build FreeGLUT which depends on them .", "Unlike OpenGL which availability in a compiler toolchain is mandated by the Windows ABI FreeGLUT is an optional 3rd party library that must be installed separately .", "And how does pkg-config assist in installing freeglut", "Where should I symlinks FreeGLUT and GLEW libraries", "I m using C++ with latest FreeGlut installed .", "Failure to do this gives linker errors relating to freeglut .", "I m trying to build a very basic OpenGL program on OS X using a brew installed FreeGLUT and GLEW on Netbeans .. . .. . brew installed FreeGLUT on usr local Cellar freeglut 2.8.1 with both include lib folders contaings : freeglut.h freeglut ext.h freeglut std.h glut.h and libglut.3.dylib libglut.a respectively .", "There are a few things which seem to be undocuemted about freeglut handling this .", "I m going to show FPS on the screen with the freeglut function glutBitmapString but it shows nothing .", "I am working on a Mac I ve got FreeGlut compiled and installed but I can t seem to get the OpenGL 3.2 context with it .", "Though I know gluCylinder is somewhat old and glu too and glut is still there through freeglut but I saw those two and wondering what s the difference", "It was also suggested that GLUT framework should be used http : old.nabble.com Re 3a-FreeGlut-and-Mac-OSX-p15355299.html on Mac OS X .", "I don t know what OSX ships with but it s probably a hacked version of the original GLUT which likely won t support any of the FreeGLUT extensions .", "In my project I set Additional Include Directories Additional Library Directories for the freeglut .", "Aswell as this there is a file called freeglut its type will be Object File Library .", "Compiling FreeGLUT and SOIL statically for X64 worked for me .", "I exclude using FreeGlut and Tao for the time being", "I have a working project containing freeglut and glew .", "You may need to make sure you have a suitable glut provider installed such as freeglut for some of the CUDA graphical samples such as simpleGL .", "The original glut implementation has some limitation one of them was the main loop never returning freeglut implement glutLeaveMainLoop which should be used instead of exit .", "I should also add that I ran into problems when I tried to use the 3.2 core profile using GLUT or FreeGLUT .", "I am developing graphic project with OpenGL and using freeglut and glew v 1.11.0 .", "I think you can argue that this is a FreeGLUT bug either in the implementation or the documentation .", "I am building an application that uses freeglut in windows 32bit debug mode .", "XQuartz 2.7.2 swapped to FreeGLUT 2.8.0 instead of the old MesaGLUT .", "But this does answer my initial question on how to build freeglut .", "Do you know where-in the FreeGLUT files I will need to make that change", "Hi I was not able to get a 3.2 context using FreeGlut via XQuartz .", "glutSolidCylinder .. . .. . Pros : .. . .. . As long as you re comfortable with using FreeGLUT it s still supported with source code available .", "Earlier I was using freeglut 2.8.0 MSVC Package from link http : www.transmissionzero.co.uk software freeglut-devel which is linked dynamically contain freeglut.dll and everything works fine .", "I had a difficult time getting glut working in Netbeans on Windows 7 until I found freeglut I attributed this to the fact that glut is just very out of date and so are the tutorials I found .", "Now go back to the main freeglut folder .", "Btw I just so the end of your question - yes opengl is needed as a dependency because freeGLUT uses OpenGL but covers some of its complexity window creation input event-handling initialisation of OpenGL stuff etc .", "I am trying to install freeglut on my computer running Linux Mint .", "pkg-config won t assist in installing freeglut though it will assist in using it .", "Also this doesn t explain why ifstream doesn t work at all even with no freeglut .", "I have a DLL written in C++ that uses FreeGlut to visualize some data .", "I recently tried to figure out how to use freeglut with NetBeans 7 .", "Maybe this will help others looking for instructions on using freeglut in Netbeans .", "My source code using FreeGLUT : .. . .. . When I launch directly the program . a.out on the Intel chipset everything works .", "After installing debian in VMware and installing all librarys required to run OpenGL applications with freeglut I used glxgears to make sure everything works fine .", "- I got this from the zip file at http : www.starstonesoftware.com OpenGL .. . .. . In the freeglut folder there should be a folder called VisualStudio2008 go into this .", "You can still try to use FreeGLUT library it is newer and also cross-platform for sure wheel actions are implemented .", "To fix linkage errors as mentioned here : .. . .. . freeglut error LNK1104 http : stackoverflow.com questions 11954344 freeglut-error-lnk1104 .. . .. . I have added : .. . .. . to the head of my .cpp .", "But if i use i got a error message for freeglut : .. . .. . freeglut My program location : GL error : invalid operation .. . .. . And everything is almost OK but anttweakbar doesn t visualize any text .", "Most simple course of action would be to simply drop FreeGLUT sources into a subdirectory of your project and just add it to your CMakeLists.txt FreeGLUT comes with a ready to use CMake configuration so that will just work .", "The reason I want to use freeGlut is because the course I am taking right now requires the assignments to compile on their computers and they are using FreeGlut and I would like to be able to work from home .", "You can download them at FreeGLut download page http : freeglut.sourceforge.net index.php download in section Prepackaged Releases .. . .. . Direct Link http : www.transmissionzero.co.uk software freeglut-devel .. . .. . Please note it s community-maintained ." ] }
{ "confidence": [ 77.90294647216797, 69.34288787841797, 68.82675170898438, 68.06858825683594, 67.2259750366211, 62.40419387817383, 61.94053268432617, 61.83834457397461, 59.50285339355469, 58.54964828491211, 57.10199737548828, 56.57744216918945, 55.12457275390625, 55.0627326965332, 54.84400177001953, 54.58032989501953, 53.22503662109375, 52.964385986328125, 52.67009735107422, 52.464813232421875 ], "content": [ "Question : I have been working in Optix for my ray tracing project i went through its classes and function I know that all the display function and call backs are handled in glutmainloop and it will never end my question is I cannot find any function or .c file where glutmainloop is defined is it hidden Can anyone help me .. . Answer : glutMainLoop is a function from the GL Utility Toolkit GLUT . On Windows the library gets linked in and thus no source code is provided . Precisely it is provided from the open-source freeglut http : docs.nvidia.com gameworks content gameworkslibrary optix optix release notes.htm : .. . .. . GLUT .. . .. . Most OptiX samples use the GLUT toolkit . Freeglut ships with the Windows OptiX distribution . GLUT is installed by default on Mac OSX . A GLUT installation is required to build samples on Linux . Take a look at github s mirror for its code https : github.com dcnieho FreeGLUT blob 5a6d3b2615d3b4d9629b65b5a0e0539037633963 freeglut freeglut src fg main.c L473 .. . .. . More information here : opengl glutmainloop http : stackoverflow.com q 1862496 1938163", "Question : In my project I want to use a freeglut library from the unofficial opengl sdk . I used Premake to generate build files for vs2010 . Then I built all libraries debug . In my project I set Additional Include Directories Additional Library Directories for the freeglut . In additional dependencies I added freeglutD.lib . In the code I just include a freeglut header . When I want to run the program I get an error : .. . .. . The freeglutD.lib is the only file in sdk freeglut lib . There is no freeglut.dll and freeglut.lib in sdk . Earlier I was using freeglut 2.8.0 MSVC Package from link http : www.transmissionzero.co.uk software freeglut-devel which is linked dynamically contain freeglut.dll and everything works fine . What is wrong .. . Answer : My guess is that you forgot these lines from the documentation on using the SDK : .. . .. . You will also need to add some defines to your command-line . These are : .. . .. . FREEGLUT STATIC .. . LIB .. . FREEGLUT LIB PRAGMAS 0 .. . .. . You need that FREEGLUT STATIC to let GLUT know that it s linking statically . Otherwise it looks for a DLL . Comment : Thanks Jason FREEGLUT STATIC solved my linker errors additionally I also had to give -lgdi32 and -lwinmm which seem to be required for statically linking FreeGLUT in a MinGW setup transmissionzero.co.uk computing using-glut-with-mingw http : www.transmissionzero.co.uk computing using-glut-with-mingw .", "Question : Though I know gluCylinder is somewhat old and glu too and glut is still there through freeglut but I saw those two and wondering what s the difference besides that gluCylinder requires that you define a Quadric and what s faster . .. . Answer : The original GLUT did not have a glutSolidCylinder function . That appears to be something FreeGLUT added . gluCylinder .. . .. . Pros : .. . .. . Supports texture coordinate generation . Cons : .. . .. . GLU is old . I mean really really old . The spec was last updated in 1998 and I suspect that the available implementations are just as old . This means that it s using immediate mode rendering glBegin glEnd style which is inefficient and not available anymore in modern versions of OpenGL . GLU support is starting to disappear from some platforms . glutSolidCylinder .. . .. . Pros : .. . .. . As long as you re comfortable with using FreeGLUT it s still supported with source code available . The FreeGLUT version seems to be able to use moderately modern rendering methods VBOs based on browsing the source code https : github.com dcnieho FreeGLUT blob git master freeglut freeglut src fg geometry.c . Cons : .. . .. . Does not generate texture coordinates . This was definitely not supported for most solids in GLUT and as far as I can tell is still not supported for cylinders in FreeGLUT . self-made .. . .. . Rendering a cylinder is very easy . Personally I would just write it myself .", "Question : Some context : I am going through a tutorial http : openglbook.com on using OpenGL . The tutorial requires a couple libraries in order to work . One of those libraries is FreeGLUT . I am on OS X using Lion . I ve downloaded FreeGLUT and followed the instructions http : freeglut.sourceforge.net docs install.php for installation but when I run the make all command I get this error : .. . .. . I ve scoured the internet for a solution and all I ve been able to understand from this is that the compiler is having trouble locating these files and that the path that the compiler is using needs to be changed . EDIT : Okay I ve figured out that it s not the compiler it is that for some reason those files are not there . Going to try figure out why they are not there . Comment : I m not familiar with Mac but you need to install both the OpenGL and GLU development libraries to build FreeGLUT which depends on them . Comment : Using Xcode you can just add a library to a project and OpenGL is a library that can be added so I just assumed those files were installed . Any ideas on how I go about doing that Hehe.. . .. . Answer : On Mac the location of those header-files are not the same as on Linux . So in the code replace this : .. . .. . with this : .. . .. . and that should fix your issue . Comment : Do you know where-in the FreeGLUT files I will need to make that change Comment : No I don t but as far as I know you don t need it . GLUT is pre-installed on OS X so you can just follow the tutorial with the GLUT you already have on your machine and the code should be exactly the same . Comment : The impression I got was that FreeGLUT was very different than GLUT and the example would not work as written . If I can t get this working I will try using GLUT . Comment : So I found where I needed to make that change but now I am getting a new error : GL glx.h : No such file or directory same thing except this time when I changed it to OpenGL glx.h the error still appeared.. . Comment : @jasonaburton : FreeGLUT is not the same thing as GLUT . FreeGLUT implements many of the same functions but it also adds many more that were never in GLUT . I don t know what OSX ships with but it s probably a hacked version of the original GLUT which likely won t support any of the FreeGLUT extensions .", "Question : Some context : I am going through a tutorial http : openglbook.com on using OpenGL . The tutorial requires a couple libraries in order to work . One of those libraries is FreeGLUT . I am on OS X using Lion . I ve downloaded FreeGLUT and followed the instructions http : freeglut.sourceforge.net docs install.php for installation but when I run the make all command I get this error : .. . .. . I ve scoured the internet for a solution and all I ve been able to understand from this is that the compiler is having trouble locating these files and that the path that the compiler is using needs to be changed . EDIT : Okay I ve figured out that it s not the compiler it is that for some reason those files are not there . Going to try figure out why they are not there . Comment : I m not familiar with Mac but you need to install both the OpenGL and GLU development libraries to build FreeGLUT which depends on them . Comment : Using Xcode you can just add a library to a project and OpenGL is a library that can be added so I just assumed those files were installed . Any ideas on how I go about doing that Hehe.. . .. . Answer : That tutorial OpenGLBook.com is based around OpenGL 4.0 core contexts with 3.3 core contexts as an alternative . At best on OS X with Mountain Lion you ll get a 3.2 core context which is similar enough to 3.3 - but unfortunately this is incompatible with GLUT - OS X includes the original GLUT unmodified due to licencing issues which requires many obsolete OpenGL functions that aren t available in 3.2 core contexts . If you want to do this tutorial on OS X 10.6.3 or later without having to deal with many annoying incompatibilities and with future-proof OpenGL I recommend installing a recent version of XQuartz 2.7.2 or later which includes FreeGLUT 2.8.0 to start with . http : xquartz.macosforge.org trac wiki X112.7.2 Comment : Hi I was not able to get a 3.2 context using FreeGlut via XQuartz . I was able to get a 2.1 context with out any issues but I could only get 3.2 via Cocoa . I d love to find out if this can be done .", "Question : I m trying to compile an OpenGL program using Visual Studio 2013 but I get the following error : .. . .. . Error 1 error LNK1104 : cannot open file freeglutd.lib .. . .. . .. . For reference I have FreeGLUT installed and have configured VS to search the correct directories for the include files and library files . Indeed VS recognises the GLUT include files just fine . I ve also added opengl32.lib and freeglut.lib to the Additional Dependencies . Why is VS looking for freeglutd.lib It s definitely not listed in the Additional Dependencies . I can solve the compilation error by renaming libglut.lib to libglutd.lib and removing the former from the dependencies but I m just curious why it s behaving this way . Speaking of Additional Dependencies is adding opengl32.lib actually necessary I can compile my very basic program without it but more than one person has said it s required perhaps for older versions of Visual Studio Comment : Try doing a solution-wide search for libglutd.lib and see what emerges . I suspect that one of your project XML files is slightly corrupted . Comment : @Robert Harvey : I searched the entire solution for libglutd.lib and freeglutd.lib I guess that s what you meant but nothing was found . Edit : I checked the log file as well and the link command doesn t have freeglutd.lib as a library . .. . Answer : Possibly already answered : freeglut error LNK1104 http : stackoverflow.com questions 11954344 freeglut-error-lnk1104 .. . .. . Also two things to check for : .. . .. . Are you building in debug or release-mode The d at the end of freeglutd.lib suggests that it s a library meant for debug builds .. . Try creating a new project from scratch put some basic runnable code in it that uses freeGLUT and see if VS is linking properly . This will also verify if for some reason the project file of the previous project was corrupted as @RobertHarvey suggested or the problem is somewhere else Comment : I looked at that answer before and it didn t help unfortunately . I tried both debug and release-mode . I also did as you suggested and created a new project but no luck . Comment : Hmm interesting . Btw I just so the end of your question - yes opengl is needed as a dependency because freeGLUT uses OpenGL but covers some of its complexity window creation input event-handling initialisation of OpenGL stuff etc . Can you post a screen shot of your project settings linking dependencies headers etc . . OpenGL does not require freeGLUT but I have the feeling that you are writing OpenGL code from somewhere where freeGLUT is used instead of pure OpenGL hence the dependency on freeGLUT . Comment : I just realised I wasn t applying the suggestion from the linked answer properly . I defined those macros after including GL glut.h which is pointless . I can now say the problem is with FREEGLUT LIB PRAGMAS being equal to 1 . More specifically if it is equal to 1 GL freeglut std.h will try to link libglutd.lib if NDEBUG is not defined . So it is meant for debug builds but Release mode doesn t define NDEBUG by default . PS upon inspection of the glut header file opengl32.lib is linked for you if FREEGLUT LIB PRAGMAS is 1 . Comment : Glad it worked out :", "Question : The FreeGLUT API documentation does not include an entry for glutInitContextVersion and when I google for it all I find are a list of questions which don t directly address its usage or effects . Is it documented anywhere .. . Answer : glutInitContextVersion is not part of the official GLUT API which is btw . completely outdated but an unofficial extension added by freeglut . However its usage is quite straight-forwadd as soon as one knows about how OpenGL s context versions work which was defined in the ARB create context https : www.opengl.org registry specs ARB wgl create context.txt familiy of extensions . The function will select which OpenGL version is requested when the context is actually created . Note that this does not require the implementation to return a context with exactly the version you are requesting but it should return one that is compatible to the requested version so that all features of that version are present . There are a few things which seem to be undocuemted about freeglut handling this . From looking into the code for the current stable version 2.8.1 one will see that freeglut implements the following logic : If the implementation cannot fullfill the version constraints but does support the ARB create context extension it will generate some error and no context will be created . However if a version is requested but the implementation does not even support the relevant extensions a legacy GL context is created effectively ignoring the version request completely . This seems a bit inconsistent to me . However as this stuff is not documented and not part of the GLUT spec it is unclear if the behavior will stay the same in the future or not . If you don t need some GLUT-specific features which are basically all relying on deprecated OpenGL anyway you ll might want to look at some more modern alternatives like GLFW http : www.glfw.org . Comment : Thanks that was helpful . I have indeed started looking at GLFW as I didn t realise that FreeGLUT had cross-platform issues .", "Question : I want to create the opengGL context using freeglut . I will first decide the which context to by checking the supporting version using glew and some other parameters . I know for glew to work it needs a opengl context . So I first create a context using glutCreateWindow then check the supported version and then set the version required using the glutInitContextVersion and destroy the previous window using glutDestroyWindow and recreate the new window by using glutCreateWindow . I get this error Freeglut error : ERROR : No display callback registered for window 1 I checked 1 is ID for my previous window which I destroyed . Following is my code .. . .. . I think I need to do this as a openGL context is always required for glew to work . I already tried setting the display function on first window as well though I know I am going to destroy it but that also didn t work . I am setting the current window to new window and then calling the glutMainLoop . So I think this should work .. . .. . According to answer by rhashimoto I tried to put the destroy command at different positions .. . .. . I put the destroy command at begining of reshape callback .. . .. . The I put the destroy command at beginning of display function .. . .. . If I put this at end of Display callback it does not give error but the displayed scene is not correct . Somethings are missing from the scene .. . .. . So is there some specific callback function I need to put this display command I dont think there is any destroy callback I can set . yes there is glutCloseFunc but I think that is meant to be called when window is being destroyed that is when glutDestroyWindow has been called on window .. . Answer : I think you can argue that this is a FreeGLUT bug either in the implementation or the documentation . It looks like glutDestroyWindow needs to be called from a GLUT callback to work properly . glutDestroyWindow mainly puts the window on a list to be destroyed https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg window.c L263 as well as clearing all callbacks https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg structure.c L177 except a destroy callback . This is probably why setting the display function didn t work for you - it was removed when you called glutDestroyWindow . Windows are actually destroyed-at the end of each main loop https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg main.c L466 . So on the first time through the loop your window still exists . The fact that it has no display callback makes GLUT unhappy https : github.com dcnieho FreeGLUT blob c59188a9a8d14efbeed7b0d6feacae7b04d7ad69 freeglut freeglut src fg main.c L410 . The best workaround is probably to arrange to call glutDestroyWindow only via one of the GLUT callbacks . I don t know if this will make the window briefly flash on the screen . My guess is it won t but it might depend on the platform . Comment : I have updated my questions . please see Comment : Weird . Try glutIdleFunc https : www.opengl.org resources libraries glut spec3 node63.html . Comment : My glutIdleFunc is same as my Display function Comment : Not sure what you mean by that . Do you mean that there is no error but some objects aren t drawn If so are you sure that using this extra window is causing the objects not to be drawn And are you sure you are destroying the correct window giving them different title bar names would help distinguish them", "Question : null .. . Answer : I m trying to build a very basic OpenGL program on OS X using a brew installed FreeGLUT and GLEW on Netbeans .. . .. . brew installed FreeGLUT on usr local Cellar freeglut 2.8.1 with both include lib folders contaings : freeglut.h freeglut ext.h freeglut std.h glut.h and libglut.3.dylib libglut.a respectively . brew also installed GLEW on usr local Cellar glew 1.13.0 with both include lib folders contaings : glew.h glxew.h wglew.h and libGLEW.1.13.0.dylib libGLEWmx.a libGLEWmx.1.13.0.dylib libGLEW.a respectively . brew creates some useful symlinks to include files to usr local include GL so that I can include them on Netbeans by adding usr local include to C++ include directories on Netbeans preferences .. . .. . Now I m trying to build my project without any successful attempts except when adding -framework GLUT -framework OpenGL -framework Cocoa to my linker additional options which redirects my includes to Apple frameworks I ve tried lots of linker options like -lGLU with ld : library not found for -lGLU like errors How to build this program successfully independent of Apple frameworks Where should I symlinks FreeGLUT and GLEW libraries What are missing properties Netbeans uses gcc g++ as and gdb away from Apples clang llvm compiler Comment : Neither GLUT nor GLEW are OpenGL they re just utilities for it . You ll have to link-to OpenGL at some point and it s provided by your system .", "Question : I m doing some tutorials on OpenGL http : www.arcsynthesis.org gltut Basics Tutorial 2001.html that use FreeGLUT http : freeglut.sourceforge.net . Apparently http : lookass.ch id 4area artart 216 area art art 221 this is how you build and install it on the mac : .. . .. . Unfortunately this on its own gives me an error when I do the make command : Undefined symbols for architecture x86-64 .. . .. . After doing abit of work I ve found that an improvement on the first line is : .. . .. . Unfortunately when I do the make command I m still getting an error : .. . .. . This has been documented on the net before http : www.bytecompile.org wiki doku.php installing-freeglut but the solution isn t really all that helpful in this instance . I ve also tried swapping it for the GLUT.framwork that comes with OS X but the examples are using FreeGLUT-specific functions . Comment : Ok I ve got a little further in this . Using CPPFLAGS -I usr X11R6 include -L usr X11R6 lib . configure --prefix PWD . . gets rid of the Undefined symbols error . But now I get ld : library not found for -lGL collect2 : ld returned 1 exit status make 2 : libglut.la Error 1 make 1 : all-recursive Error 1 make : all Error 2 Comment : Maybe you should also check with LDFLAGS -L usr X11R6 lib is needed . Comment : Ooh thanks . Ok so I used CPPFLAGS -I usr X11R6 include -L usr X11R6 lib LDFLAGS -L usr X11R6 lib . configure --prefix PWD . . and I got rid of the previous error . Now I get a whole load of errors along the lines of smooth opengl3.c : 101 : error : redefinition of typedef PFNGLGENBUFFERSPROC usr X11R6 include GL glext.h : 5080 : error : previous declaration of PFNGLGENBUFFERSPROC was here Comment : Would you update your question accordingly so that I can start an answer Excessive comments of conversations are not recommended in this site . Comment : Did you get it to work .. . Answer : It was suggested http : lists.macosforge.org pipermail xquartz-dev 2009-April 002304.html on Xquartz s mail list that the freeglut demo is wrong to declare those PFN PROC twice . So by simply commenting out those double-definition from smooth opengl3.c the free glut would pass the compilation phase . However from my experience it would not run and give some error about the GLSL . It was also suggested that GLUT framework should be used http : old.nabble.com Re 3a-FreeGlut-and-Mac-OSX-p15355299.html on Mac OS X . Comment : Unfortunately OSX s GLUT framework doesn t support OpenGL 3.2 .", "Question : I recently tried to figure out how to use freeglut with NetBeans 7 . I Google d a lot and I didn t find a suitable tutorial on how to bind the stuff I need into it . Currently I have more problem then this : .. . .. . First one is : - freeglut 2.8 in order to compile it I need MinGW and msys . I have both installed but I can t configure or make all and make install freeglut . I didn t find an easy-to-read how-to for that task . Next one : - once built where to put what files into a specific folder Last one : - Once put the files into corresponding folder how to use finally freeglut under NetBeans 7 on a C++ project I feel like a lack of information on that . All I found are always answers like : download build install and done . But I m already stuck on the install and build . The solution : Close NetBeans . Install and download MinGW from mingw.org .. . After installing add the Path to your SystemEnvironemt example : C : MinGW . go to Start- Computer right mousebutton select properties go to advanced system setting in the following dialog press Environment Variables . in the tab system variables find the entry Path or PATH add : C : MinGW get freeglut pre-compiled package : http : www.transmissionzero.co.uk computing using-glut-with-mingw there is a good tutorial how to set up . Now have fun just include and you re done . have fun . Note 1 : if you have problems finding make the folder is : C : MinGW msys 1.0 bin make.exe when installed MinGW on C : MinGW . mingw-get install msys in command-line should get msys.. . last but not least dont forget to add msys bin to path too . : .. . .. . here s a full tutorial but in german language . http : techchan.blog.de 2012 03 18 einrichten-opengl-netbeans-7-1-1-teil-0-start-13209096 .. . .. . If you need it in english let me know if you could translate it otherwise i ll think about to translate it myself . .. . Answer : I had a difficult time getting glut working in Netbeans on Windows 7 until I found freeglut I attributed this to the fact that glut is just very out of date and so are the tutorials I found . Maybe this will help others looking for instructions on using freeglut in Netbeans . These instructions are like the ones in the link already provided but help explain how to use it in Netbeans rather than from the command-line . This tutorial expects that you ve already gotten Netbeans and your compiler working together . IF you have not done so I found the guide here very helpful : http : netbeans.org community releases 68 cpp-setup-instructions.html mingw .. . .. . 1 . download and extract freeglut from http : www.transmissionzero.co.uk computing using-glut-with-mingw into an easy to reach folder . I recommend C : FrGlut .. . .. . 2 . either add the bin folder C : FrGlut bin to your Windows PATH variable or copy the freeglut.dll from your bin folder into C : Windows System32 .. . .. . 3 . Open Netbeans and open or create your project .. . .. . 4 . go to : file- project properties .. . .. . 5 . Select your compiler go to include directories and add the path to your freeglut include folder C : FrGlut include .. . .. . 6 . under linker select add libary and navigate to the file C : FrGlut lib libfreeglut.a .. . .. . 7 . select options and add the following individually : .. . .. . -dynamic -lfreeglut -lopengl32 -LC : FrGlut lib libfreeglut.a .. . .. . Netbeans should now be ready to use with your freeglut library . To use the glut libary add the following include to your source : .. . .. . include GL glut.h .. . .. . Remember that freeglut.dll will need to be shared along with your executable in order for the program to run as most users will not already have it . Comment : Tried this in netbeans I got this error : pastebin.com 29FYDHf0 http : pastebin.com 29FYDHf0", "Question : I am trying to learn opengl for a class but am having trouble with getting setup . I am using Windows with the IDE CLion and cygwin64 . So far I have been able to compile and run Gl.h and Glu.h but I am having trouble getting the static library for freeglut . Right now programs error on the last line in the CMakeLists.txt file : .. . .. . with error .. . .. . I looked into it and it appears that after downloading freeglut I need to create the library files specifically the .a file libfreeglut32.a from the source code . I have tried looking for an explanation on how it is done but haven t found an answer . Would anyone be able to help explain how to do this .. . Answer : Unlike OpenGL which availability in a compiler toolchain is mandated by the Windows ABI FreeGLUT is an optional 3rd party library that must be installed separately . Most simple course of action would be to simply drop FreeGLUT sources into a subdirectory of your project and just add it to your CMakeLists.txt FreeGLUT comes with a ready to use CMake configuration so that will just work . On a side note you should not use .. . .. . but .. . .. . I.e . in total you should extract FreeGLUT sources into a subdirectory of your project and change your CMakeLists to Comment : Now I am getting an error of could not find X11 . I went and downloaded cygwin x including the x-org server and xinit but still that does not work . Comment : @ChrisProcak : Well the problem you re running into is that Cygwin tries to provide maximum compatibility with Linux . And in Linux you do graphics through an X server . But in Windows there is no X server unless you start the X server that comes with Cygwin but the OpenGL support of that is meager at best . Instead of Cygwin I strongly advise you to use MinGW to compile your project . The easiest way to install it is using the MSys2 installer msys2.github.io https : msys2.github.io to get a MSys2 environment and then install mingw inside it . That will give you native OpenGL support which you want .", "Question : In my project I want to use a freeglut library from the unofficial opengl sdk . I used Premake to generate build files for vs2010 . Then I built all libraries debug . In my project I set Additional Include Directories Additional Library Directories for the freeglut . In additional dependencies I added freeglutD.lib . In the code I just include a freeglut header . When I want to run the program I get an error : .. . .. . The freeglutD.lib is the only file in sdk freeglut lib . There is no freeglut.dll and freeglut.lib in sdk . Earlier I was using freeglut 2.8.0 MSVC Package from link http : www.transmissionzero.co.uk software freeglut-devel which is linked dynamically contain freeglut.dll and everything works fine . What is wrong .. . Answer : I had an older project from VS12 and got the same LNK1104 error when trying to build it after upgrade in VS15 . All I had to do to fix this was run Package Manager Console Tools - NuGet Package Manager and type in : .. . .. . Note that I have reference to glew.h and freeglut.h in one of my header-files like this :", "Question : Some context : I am going through a tutorial http : openglbook.com on using OpenGL . The tutorial requires a couple libraries in order to work . One of those libraries is FreeGLUT . I am on OS X using Lion . I ve downloaded FreeGLUT and followed the instructions http : freeglut.sourceforge.net docs install.php for installation but when I run the make all command I get this error : .. . .. . I ve scoured the internet for a solution and all I ve been able to understand from this is that the compiler is having trouble locating these files and that the path that the compiler is using needs to be changed . EDIT : Okay I ve figured out that it s not the compiler it is that for some reason those files are not there . Going to try figure out why they are not there . Comment : I m not familiar with Mac but you need to install both the OpenGL and GLU development libraries to build FreeGLUT which depends on them . Comment : Using Xcode you can just add a library to a project and OpenGL is a library that can be added so I just assumed those files were installed . Any ideas on how I go about doing that Hehe.. . .. . Answer : install freeglut via macports modify premake4.lua so that it builds the Unofficial OpenGL SDK in the glsdk apart from freeglut . manually copy and paste the lib and include folders of the freeglut via macports and modify include GL freeglut.h inside framework.cpp framework folder so that it finds the header . also fill the blanks in folder names e.g . Tut 13 Impostors - Tut 13 Impostors .. . .. . it works for me .. . .. . more details here http : stackoverflow.com questions 12229211 issues-with-freeglut-on-mac-os-snow-leopard-it-builds-fine-via-macports 12283617 12283617", "Question : I am using Code : : Blocks with a MinGW compiler . These are my includes : .. . .. . If I try to use a function .. . .. . It throws an error : .. . .. . The function .. . .. . Works perfectly though . If I try to include both glut and freeglut I have correctly installed it I made sure to watch several videos a few times carefully following the steps like this : .. . .. . I get 24 of errors such as : .. . .. . But these don t include the error I was getting before From what I can understand I can include either glut or freeglut but not both together . How do I figure this out Thanks EDIT : .. . .. . Linker options : .. . .. . Completely eliminated the problem now it works as expected . Comment : Possible duplicate of What is an undefined-reference unresolved external symbol error and how do I fix it http : stackoverflow.com questions 12573816 what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix Comment : Why do you want to use both GLUT and freeglut Mixing two separate implementations of mostly the same API sounds like a recipe for failure . .. . Answer : The later errors about undefined references are linker errors not compiler errors . You have to link you program in addition to including the header-files against glut and or the freeglut library . This is done by adding the following options to the linker : Comment : Please elaborate I don t know where to start . Comment : @DDomjosa the linker option -l followed by a library name tells the linker to look for unresolved symbols in said library . You might read up on the basics of how linkers function before attempting code in C++ . Comment : @ThomasMcLeod I ve been learning C++ for over 3 months and I never had a need to mess with linkers . Admittedly I was working with simple command-line programs .", "Question : I am working on a Mac I ve got FreeGlut compiled and installed but I can t seem to get the OpenGL 3.2 context with it . However I can get it without any problem while using GLFW . So in GLFW this code works perfectly fine : .. . .. . But with FreeGlut this code fails on glutCreateWindow : .. . .. . The error it fails with is : .. . .. . I am running on MacOS X 10.8 Mountain Lion with Intel HD4000 graphics having installed XQuartz as my X11 server and having compiled and installed FreeGlut 2.8 from sources . Does anyone know what might be the issue Comment : Having the exact problem but I m using FreeGlut as included in XQuartz opt x11 lib opt x11 include . Did you solve the issue Comment : Same issue here - were you able to solve the problem Comment : Did anyone of you solved the problem I m having the same issue . I m using freeGlut included in XQuartz Comment : The best is to just stick with glfw i got stuck with the same issue on OS X 10.10 . Code compiles fine but then it crashes when running . Have XQuartz setup . Tried with no luck to get version 3.2 .. . Answer : Freeglut is an extended implementation of the SGI GLUT Toolkit and with a few exceptions around obsolete hardware implements the same functions . Unfortunately this includes a number of features that would break in a strictly CORE FORWARD COMPATIBLE implementation . Typically if you request a context WITHOUT specifying a version or profile you will get the best that the combination of driver and GL toolkit can offer which is normally a compatibility profile rather than core profile . Note that the only thing you lose through using a compatibility profile is the supposed checking for deprecated functions . All new core function should work without issue . This problem with freeglut is not restricted to Apple it also manifests under Linux using some Gallium drivers . It is not clear that there is any short-term intent to rectify this so if you need to use CORE FORWARD COMPATIBLE you should probably switch to GLFW or SDL .", "Question : I want to create a window covering my whole desktop screen with displaying colors RGB and then VIBGYOR . The color delay should be 1 second . This is the code I have written but output is not as expected . Can anyone tell me where I am wrong Thanks . .. . Answer : You re initializing the display mode with GLUT DOUBLE double buffering https : en.wikipedia.org wiki Multiple buffering Double buffering in computer graphics you need to add gluSwapBuffers every time you re finished working with the buffer and want to display it . Difference between single buffered GLUT SINGLE and double buffered drawing GLUT DOUBLE http : stackoverflow.com a 28315492 2498790 .. . .. . When using GL SINGLE you can picture your code drawing directly to the display . .. . When using GL DOUBLE you can picture having two buffers . One of them is always visible the other one is not .. . .. . glut examples https : www.opengl.org archives resources code samples glut examples examples examples.html .. . .. . nehe s legacy tutorials http : nehe.gamedev.net .. . .. . What is the nicest way to close GLUT http : stackoverflow.com a 5061297 2498790 .. . .. . void glutLeaveMainLoop void Comment : Thanks That worked . But I wanted to know the difference between the GLUT DOUBLE and GLUT SINGLE Macro because in both cases it worked . Also I want to write some Text before the appearance of 1st color display in the same window . I went through this link-to get understand it but it didn t work well . stackoverflow.com questions 538661 http : stackoverflow.com questions 538661 how-do-i-draw-text-with-glut-opengl-in-c Comment : @Ac3 DeXt3R I ve added some link about the difference has been already answered I also added some glut example which should help you about the text and glut in general and a reference to some easy GL tutorial old but still good for learning purpose Comment : Thanks a lot that is very helpful . Can you please tell me how to Exit the window after displaying everything Comment : @Ac3 DeXt3R take a look at glut examples abgr.c https : www.opengl.org archives resources code samples glut examples examples abgr.c for instance it use glutKeyboardFunc Key to register a key handler in the Key handler check for the ESC key case 27 Comment : The original glut implementation has some limitation one of them was the main loop never returning freeglut implement glutLeaveMainLoop which should be used instead of exit . glut-and-freeglut http : www.lighthouse3d.com cg-topics glut-and-freeglut", "Question : I am working on a Mac I ve got FreeGlut compiled and installed but I can t seem to get the OpenGL 3.2 context with it . However I can get it without any problem while using GLFW . So in GLFW this code works perfectly fine : .. . .. . But with FreeGlut this code fails on glutCreateWindow : .. . .. . The error it fails with is : .. . .. . I am running on MacOS X 10.8 Mountain Lion with Intel HD4000 graphics having installed XQuartz as my X11 server and having compiled and installed FreeGlut 2.8 from sources . Does anyone know what might be the issue Comment : Having the exact problem but I m using FreeGlut as included in XQuartz opt x11 lib opt x11 include . Did you solve the issue Comment : Same issue here - were you able to solve the problem Comment : Did anyone of you solved the problem I m having the same issue . I m using freeGlut included in XQuartz Comment : The best is to just stick with glfw i got stuck with the same issue on OS X 10.10 . Code compiles fine but then it crashes when running . Have XQuartz setup . Tried with no luck to get version 3.2 .. . Answer : In 10.8 and 10.7 GL 3.2 is available if you explicitly call for it when setting up the GL context . Apple calls this the Core Profile to distinguish from the Legacy Profile which is GL 2.1 . I ran into this issue with Wine on OSX it does not support OpenGL 3.2 . My understanding is that the X11 server either Apple X11 or XQuartz currently does not implement the 3.2 support nor is there a switch to flip somewhere to enable it . It could be for compatibility concerns since 3.2 profile will break some existing GL applications https : developer.apple.com library mac documentation graphicsimaging conceptual OpenGL-MacProgGuide UpdatinganApplicationtoSupportOpenGL3 UpdatinganApplicationtoSupportOpenGL3.html apple ref doc uid TP40001987-CH3-SW1 .. . .. . This post suggests http : stackoverflow.com questions 11259328 glut-on-os-x-with-opengl-3-2-core-profile using GLFW or maybe Apple s GLUT.framework if there is still such a thing .. . .. . This page http : www.geeks3d.com 20121109 overview-of-opengl-support-on-os-x explains the GL stack on OSX and confirms the 2.1 issue with GLX . Comment : I am sorry but don t see how this relates to my question . As I have shown - it DOES work with GLFW which runs on top of XQuartz on my system so it does definitely support 3.2 contexts . Comment : I am sorry but don t see how this relates to my question . As I have said - OpenGL 3.2 DOES work with GLFW which runs on top of XQuartz on my system so it does definitely support 3.2 contexts . My only issue is that I would like to use freeglut purely because it s more convenient . But if that s not possible then I will develop using GLFW . But please don t tell me it s impossible to get 3.2 context because I ve already got one . Comment : glfw also has a Cocoa and Carbon port http : sourceforge.net p glfw svn 1617 tree trunk lib are you certain it is running on top of XQuartz", "Question : I am using the following configuration .. . .. . Mac OSX v 10.9.1 .. . Intel HD graphics 4000 1024 MB . My goal is to use OpenGL 3.3 using FreeGLUT Is there a way to achieve that However this site https : developer.apple.com graphicsimaging opengl capabilities states that HD 4000 should support 4.1 . Is that only for glsl or is there any way to use FreeGLUT The reason I want to use freeGlut is because the course I am taking right now requires the assignments to compile on their computers and they are using FreeGlut and I would like to be able to work from home . .. . Answer : MacOS X supports OpenGL-3.2 and later contexts only if you request a core context . You have to initialize FreeGLUT in addition with .. . .. . Another solution is given at http : stackoverflow.com a 13751079 524368 Comment : That did the trick Thanks . Our teachers test program actually initiated the core profile before initializing context 3.2 which for some reason did not work for me . Comment : update It did not work . I tried the solution on the wrong file by mistake my bad . Following the solution in the link you provided did not even compile as GLUT 3 2 CORE PROFILE is an undeclared identifier . Thank you anyway .", "Question : null .. . Answer : I have a font render issue with Anttweakbar and Freeglut . I use VS2013 CUDA 7.5 Runtime OpenGl 4.5 Freeglut 2.6 and Anttweakbar 1.16 in my program . If i don t use Anttweakbar i don t have any problems in my program . But if i use i got a error message for freeglut : .. . .. . freeglut My program location : GL error : invalid operation .. . .. . And everything is almost OK but anttweakbar doesn t visualize any text . Font render issue image http : i.stack.imgur.com TpiaY.png I have tried to solve this problem i can t achieve it . This is code detail of my program : .. . .. . I suppose that connection of OpenGl Pixel Buffer Object and Anttweakbar causes the issue . U.I . : Sorry my English is not very well ." ] }
[ "yes-answer-long", "yes-answer-short" ]
toolkit
UNK_RELATION
dommel@crud@31
dommel -- a library with easy @placeholder operations for dapper .
{ "confidence": [ 36.19584655761719, 35.30409240722656, 31.664140701293945, 30.492290496826172, 22.878074645996094, 14.198076248168945, 14.198076248168945, 14.198076248168945, 14.198076248168945, 14.198076248168945 ], "content": [ "Dommel https : github.com henkmollema Dommel allows you to create a custom IKeyPropertyResolver .", "Are you using DapperExtensions or Dommel", "I d like to create a convention to set the column that are named as Id to be primary-key I ve been looking at the documentacion and so far I ve foud ony to do it manually class by class like : with dommel : .. . .. . I d like something more like : .. . .. . it could be dommel or dapper-extensions or any other I just this implementation to be fluent .", "Also see : the documentation https : github.com henkmollema Dommel ikeypropertyresolver .", "Dapper itself has no knowledge about column names table names and primary keys .", "any advice", "thanks", "Where do you need this for", "either way I can move from one to another I m trying now with DapperExtensions .", "Your implementation would look like : .. . .. . Which should be registered at application start-up using this line of code : .. . .. . You don t need Dapper.FluentMap or Dapper.FluentMap.Dommel for this ." ] }
{ "confidence": [ 50.7347526550293 ], "content": [ "Question : I d like to create a convention to set the column that are named as Id to be primary-key I ve been looking at the documentacion and so far I ve foud ony to do it manually class by class like : with dommel : .. . .. . I d like something more like : .. . .. . it could be dommel or dapper-extensions or any other I just this implementation to be fluent . any advice thanks Comment : Where do you need this for Dapper itself has no knowledge about column names table names and primary keys . Are you using DapperExtensions or Dommel Comment : either way I can move from one to another I m trying now with DapperExtensions . .. . Answer : Dommel https : github.com henkmollema Dommel allows you to create a custom IKeyPropertyResolver . Your implementation would look like : .. . .. . Which should be registered at application start-up using this line of code : .. . .. . You don t need Dapper.FluentMap or Dapper.FluentMap.Dommel for this . Also see : the documentation https : github.com henkmollema Dommel ikeypropertyresolver ." ] }
[ "yes-answer-long", "yes-answer-short" ]
crud
UNK_RELATION
google-go-idea-plugin@intellij-idea@76
google-go-idea-plugin -- the open-source go plugin for jetbrains ides like @placeholder phpstorm webstorm and so on .
{ "confidence": [ 48.13029861450195, 46.737770080566406, 44.432273864746094, 41.941322326660156, 38.81452178955078, 38.48905563354492, 36.521270751953125, 34.67348098754883, 32.56729507446289, 32.16465377807617, 31.614673614501953, 31.351032257080078, 30.90167999267578, 30.839855194091797, 30.616779327392578, 29.28417205810547, 28.64706039428711, 28.2537899017334, 27.02701187133789, 27.00096893310547, 26.899921417236328, 25.83063507080078, 24.089271545410156, 23.876943588256836, 23.83180809020996, 23.56985855102539, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 21.492691040039062, 19.957618713378906, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379, 18.59781837463379 ], "content": [ "I m using IntelliJ Idea and the google-go-lang-idea-plugin from : .. . .. . https : github.com mtoader google-go-lang-idea-plugin issues 173 .. . .. . When I try to add my APT provided Go installation to the Go SDK list I get the following error .. . .. .", "Update the Plugin for Go in IntelliJ", "If you are using the latest version of the plugin see the repository https : github.com go-lang-plugin-org go-lang-idea-plugin pre-release-builds then you are able to fully customize the GOPATH layout .", "It turns out that google-go-lang-idea-plugin requires a slightly different folder structure than the default apt install produces .", "So I just had this exact problem on IntelliJ 2016.1.3 with Go 1.5 . .. . .. . I had installed the IntelliJ Go Plugin a while ago and installed GO 1.5 a while back and it all worked fine .", "Look at this test that you fail : .. . .. . https : github.com mtoader google-go-lang-idea-plugin blob master src ro redeul google go sdk GoSdkUtil.java L84 .. . .. . I can only see linux amd64 barely under your popup which indicates a GOPATH to me .", "Could not find a killing feature in golang-idea-plugin that exists in Goclipse - each GO project automatically adds itself as a GOPATH item for Eclipse session so I don t have to put it to global GOPATH manually .", "But I did not found any kind of this feature in golang IDEA plugin so my builds keep failing with follows : .. . .. . Are there any cures for this within IDEA", "@dave-c will turn to this approach if did not find a way to provide env codebase to session-narrowed GOPATH with IDEA plugin .", "I d recommend to place go in usr local go and your GOPATH into gopath .", "See go help gopath .", "@cirpo you can use either PHPStorm 9 EAP or IntelliJ IDEA Community 14.1+ which is free .", "Then point IntelliJ to usr local go", "Failing that does anyone know what this plugin is actually looking for that would make a directory look like the SDK directory", "The selected directory is not a valid home for Go Sdk http : i.stack.imgur.com fUi9m.png .. . .. . I have tried adding the following directories as the Go SDK root .. . .. . usr share go .. . usr share src .. . usr lib go .. . usr lib go src .. . usr lib go pkg .. . usr lib go pkg linux amd64 .. . .. . Does anyone know how to get this working", "But who knows I haven t worked with go for a bit so I might have removed it .", "Install the most current Go version currently for me 1.6.3 .", "In general the trend nowadays is to install packages tools especially when they re so young like GO as non-root users and in your home-directory and adjust PATH and GOPATH in your environment instead of installing it globally .", "The v1.0.0 is still in alpha and I can t install it with PhpStorm version 8 what do you suggest then", "This is not required anymore since the v1.0.0 of the plugin as such please don t mess around with the system paths and report any issues to the bug tracker in order to improve it .", "Now i checked and suddenly I m sure I didn t remove it GO 1.5 was gone from my system .", "Set the SDK in IntelliJ for the project : File - Project Structure - Project - under Project SDK add a New SDK and navigate to your go installation .", "I have a sql select statement like this example : .. . .. . I have several questions here .", "So What print method can I used to have it append those values in the slice to there corresponding number in the original string", "I m trying to migrate from Goclipse dev environment to IDEA .", "What print function can I run to mimic dbConnection.Query query queryValues.. . so that I can see it before it is passed up", "What is the .. . after queryValues", "How come when I look at the query being passed up to the db none of the 1 are actually being converted into there real values", "Thanks in advance .", "Josh", ".. . is passing a slice as varargs .", "You should always append to your queryValues slice not to Name and Age .", "I guess your code doesn t even compile .", "Even if it does queryValue will not be what you think it is .", "@icza I had to use Pseudo code because my actual code is company propriety .", "The answer to your first question is that Query is what s referred to as a variadic function https : golang.org ref spec Function types .", "It takes any number of parameters of the last type and is handed to the function as a slice .", "queryValues.. . is the reverse of that .", "It is taking your slice and passing them as individual arguments to query .", "It s doing the same thing as-if you had done : .. . .. . https : golang.org ref spec Passing arguments to .. . parameters .. . .. . In this particular case you don t need the interface .. . .. . The reason your 1 2 placeholders are not being converted is likely because you re using the wrong placeholders for the particular driver you re using .", "It s dependent on the driver itself .", "For instance the MySQL driver uses", "as it s placeholder .", "I really don t need my code in a global GOPATH for now - it s ugly and even sometimes self-repeating I ve started learning Golang a while ago so had a bit of mess of little educational projects around", "I ve commented on the various issues in the bugtracker however the maintainer claimed that this was fixed 10 months ago .", "You seem to have selected the GOPATH but the tool wants the GOROOT", "This will make it much easier to upgrade and change versions .", "In general the trend nowadays is to install packages tools .. . in your home-directory .. . instead of installing it globally .", "That trend is frankly ridiculous .", "Do you ever install python ruby gcc ghc locally in your homedir", "no", "This is 100 off topic but here it goes : Python is at a size that people have started using python distributions .", "In their home directory.. . Ruby has rvm for ages and is heavily used .", "Gcc obviously is compiled and is barely used in your home-directory but yes people who do need different version they do compile it in their home dir .", "To fix it :", "Thank you .", "thanks", "Anyway after a bit of debugging the following steps helped me : .. . .. . 1 .", "Follow the instructions on https : golang.org doc install .. . 2 .", "3 .", "4 .", "Click Apply and then Ok", "This is extremely useful as I don t want to mix my local code with globally grabbed ones I don t plan to share my code in any ways plus several projects are distinguished from each other in their envs .", "IMO you are misusing GOPATH https : golang.org doc code.html GOPATH .", "If you just want to separate fetched stuff from your stuff then a single GOPATH path to fetched stuff : path to your own stuff https : golang.org doc articles go command.html h GOPATH tmp 3 is all you need .", "You can chose to have global entries which are persisted for all your projects or per project entries which are project specific entries .", "You can really be creative with the options .", "Indeed .", "Works as I expect since 0.9.371 .", "Thanks" ] }
{ "confidence": [ 56.85772705078125, 47.36347198486328, 46.40611267089844, 42.453922271728516, 22.622652053833008 ], "content": [ "Question : I m using IntelliJ Idea and the google-go-lang-idea-plugin from : .. . .. . https : github.com mtoader google-go-lang-idea-plugin issues 173 .. . .. . When I try to add my APT provided Go installation to the Go SDK list I get the following error .. . .. . The selected directory is not a valid home for Go Sdk http : i.stack.imgur.com fUi9m.png .. . .. . I have tried adding the following directories as the Go SDK root .. . .. . usr share go .. . usr share src .. . usr lib go .. . usr lib go src .. . usr lib go pkg .. . usr lib go pkg linux amd64 .. . .. . Does anyone know how to get this working I ve commented on the various issues in the bugtracker however the maintainer claimed that this was fixed 10 months ago . Failing that does anyone know what this plugin is actually looking for that would make a directory look like the SDK directory .. . Answer : It turns out that google-go-lang-idea-plugin requires a slightly different folder structure than the default apt install produces . To fix it : Comment : This is not required anymore since the v1.0.0 of the plugin as such please don t mess around with the system paths and report any issues to the bug tracker in order to improve it . Thank you . Comment : The v1.0.0 is still in alpha and I can t install it with PhpStorm version 8 what do you suggest then thanks Comment : @cirpo you can use either PHPStorm 9 EAP or IntelliJ IDEA Community 14.1+ which is free .", "Question : I m using IntelliJ Idea and the google-go-lang-idea-plugin from : .. . .. . https : github.com mtoader google-go-lang-idea-plugin issues 173 .. . .. . When I try to add my APT provided Go installation to the Go SDK list I get the following error .. . .. . The selected directory is not a valid home for Go Sdk http : i.stack.imgur.com fUi9m.png .. . .. . I have tried adding the following directories as the Go SDK root .. . .. . usr share go .. . usr share src .. . usr lib go .. . usr lib go src .. . usr lib go pkg .. . usr lib go pkg linux amd64 .. . .. . Does anyone know how to get this working I ve commented on the various issues in the bugtracker however the maintainer claimed that this was fixed 10 months ago . Failing that does anyone know what this plugin is actually looking for that would make a directory look like the SDK directory .. . Answer : So I just had this exact problem on IntelliJ 2016.1.3 with Go 1.5 . .. . .. . I had installed the IntelliJ Go Plugin a while ago and installed GO 1.5 a while back and it all worked fine . Now i checked and suddenly I m sure I didn t remove it GO 1.5 was gone from my system . But who knows I haven t worked with go for a bit so I might have removed it . Anyway after a bit of debugging the following steps helped me : .. . .. . 1 . Install the most current Go version currently for me 1.6.3 . Follow the instructions on https : golang.org doc install .. . 2 . Update the Plugin for Go in IntelliJ 3 . Set the SDK in IntelliJ for the project : File - Project Structure - Project - under Project SDK add a New SDK and navigate to your go installation . 4 . Click Apply and then Ok", "Question : I m using IntelliJ Idea and the google-go-lang-idea-plugin from : .. . .. . https : github.com mtoader google-go-lang-idea-plugin issues 173 .. . .. . When I try to add my APT provided Go installation to the Go SDK list I get the following error .. . .. . The selected directory is not a valid home for Go Sdk http : i.stack.imgur.com fUi9m.png .. . .. . I have tried adding the following directories as the Go SDK root .. . .. . usr share go .. . usr share src .. . usr lib go .. . usr lib go src .. . usr lib go pkg .. . usr lib go pkg linux amd64 .. . .. . Does anyone know how to get this working I ve commented on the various issues in the bugtracker however the maintainer claimed that this was fixed 10 months ago . Failing that does anyone know what this plugin is actually looking for that would make a directory look like the SDK directory .. . Answer : You seem to have selected the GOPATH but the tool wants the GOROOT Look at this test that you fail : .. . .. . https : github.com mtoader google-go-lang-idea-plugin blob master src ro redeul google go sdk GoSdkUtil.java L84 .. . .. . I can only see linux amd64 barely under your popup which indicates a GOPATH to me . In general the trend nowadays is to install packages tools especially when they re so young like GO as non-root users and in your home-directory and adjust PATH and GOPATH in your environment instead of installing it globally . This will make it much easier to upgrade and change versions . I d recommend to place go in usr local go and your GOPATH into gopath . Then point IntelliJ to usr local go Comment : In general the trend nowadays is to install packages tools .. . in your home-directory .. . instead of installing it globally . That trend is frankly ridiculous . Do you ever install python ruby gcc ghc locally in your homedir no Comment : This is 100 off topic but here it goes : Python is at a size that people have started using python distributions . In their home directory.. . Ruby has rvm for ages and is heavily used . Gcc obviously is compiled and is barely used in your home-directory but yes people who do need different version they do compile it in their home dir .", "Question : I m trying to migrate from Goclipse dev environment to IDEA . Could not find a killing feature in golang-idea-plugin that exists in Goclipse - each GO project automatically adds itself as a GOPATH item for Eclipse session so I don t have to put it to global GOPATH manually . This is extremely useful as I don t want to mix my local code with globally grabbed ones I don t plan to share my code in any ways plus several projects are distinguished from each other in their envs . But I did not found any kind of this feature in golang IDEA plugin so my builds keep failing with follows : .. . .. . Are there any cures for this within IDEA Comment : IMO you are misusing GOPATH https : golang.org doc code.html GOPATH . If you just want to separate fetched stuff from your stuff then a single GOPATH path to fetched stuff : path to your own stuff https : golang.org doc articles go command.html h GOPATH tmp 3 is all you need . See go help gopath . Comment : @dave-c will turn to this approach if did not find a way to provide env codebase to session-narrowed GOPATH with IDEA plugin . I really don t need my code in a global GOPATH for now - it s ugly and even sometimes self-repeating I ve started learning Golang a while ago so had a bit of mess of little educational projects around .. . Answer : If you are using the latest version of the plugin see the repository https : github.com go-lang-plugin-org go-lang-idea-plugin pre-release-builds then you are able to fully customize the GOPATH layout . You can chose to have global entries which are persisted for all your projects or per project entries which are project specific entries . You can really be creative with the options . Comment : Indeed . Works as I expect since 0.9.371 . Thanks", "Question : I have a sql select statement like this example : .. . .. . I have several questions here . What is the .. . after queryValues How come when I look at the query being passed up to the db none of the 1 are actually being converted into there real values What print function can I run to mimic dbConnection.Query query queryValues.. . so that I can see it before it is passed up Thanks in advance . Josh Comment : .. . is passing a slice as varargs . You should always append to your queryValues slice not to Name and Age . I guess your code doesn t even compile . Even if it does queryValue will not be what you think it is . Comment : @icza I had to use Pseudo code because my actual code is company propriety . So What print method can I used to have it append those values in the slice to there corresponding number in the original string .. . Answer : The answer to your first question is that Query is what s referred to as a variadic function https : golang.org ref spec Function types . It takes any number of parameters of the last type and is handed to the function as a slice . queryValues.. . is the reverse of that . It is taking your slice and passing them as individual arguments to query . It s doing the same thing as-if you had done : .. . .. . https : golang.org ref spec Passing arguments to .. . parameters .. . .. . In this particular case you don t need the interface .. . .. . The reason your 1 2 placeholders are not being converted is likely because you re using the wrong placeholders for the particular driver you re using . It s dependent on the driver itself . For instance the MySQL driver uses as it s placeholder ." ] }
[ "yes-answer-long", "yes-answer-short" ]
intellij-idea
UNK_RELATION
jfugue@java@70
jfugue -- jfugue is an open-source library for programming music for @placeholder and jvm-languages .
{ "confidence": [ 53.19296646118164, 53.05821990966797, 50.08768844604492, 48.655799865722656, 48.655799865722656, 48.655799865722656, 48.241722106933594, 48.147464752197266, 47.47273254394531, 47.13672637939453, 46.84784698486328, 46.84784698486328, 46.07414245605469, 46.07414245605469, 46.07414245605469, 45.741798400878906, 45.41358947753906, 45.182647705078125, 44.41975402832031, 44.41975402832031, 44.41975402832031, 44.41975402832031, 44.41975402832031, 44.41975402832031, 44.347206115722656, 44.347206115722656, 44.347206115722656, 44.26792907714844, 44.26618957519531, 44.26618957519531, 43.798240661621094, 43.18968200683594, 43.18968200683594, 42.89004135131836, 42.54793167114258, 42.53925323486328, 42.53925323486328, 42.53925323486328, 42.53925323486328, 41.838096618652344, 41.838096618652344, 41.46274948120117, 41.40419006347656, 41.216583251953125, 41.130760192871094, 41.130760192871094, 41.130760192871094, 41.130760192871094, 41.130760192871094, 41.130760192871094, 41.130760192871094, 41.130760192871094, 40.11116027832031, 40.11116027832031, 40.11116027832031, 40.11116027832031, 40.11116027832031, 40.11116027832031, 39.489646911621094, 39.161922454833984, 38.96550369262695, 38.957069396972656, 38.65877914428711, 38.581451416015625, 38.549102783203125, 38.549102783203125, 38.549102783203125, 38.27689743041992, 37.808372497558594, 36.82217025756836, 36.82217025756836, 36.82217025756836, 36.82217025756836, 36.82217025756836, 36.70050811767578, 36.70050811767578, 36.70050811767578, 36.70050811767578, 36.70050811767578, 35.676513671875, 35.08241271972656, 35.08241271972656, 35.08241271972656, 35.08241271972656, 34.11885070800781, 34.11885070800781, 34.11885070800781, 34.11885070800781, 34.11885070800781, 34.11885070800781, 34.11885070800781, 34.11885070800781, 34.11885070800781, 33.989097595214844, 33.989097595214844, 33.989097595214844, 32.39191436767578, 32.39191436767578, 32.39191436767578, 32.39191436767578 ], "content": [ "Yep I was right github.com avh4 jfugue blob master jfugue src org jfugue https : github.com avh4 jfugue blob master jfugue src org jfugue MusicXmlRenderer.java .", "I compose music in java with JFUGUE .", "Please keep in mind that this is not an official source for JFugue .", "Disclosure : I m the author of JFugue", "Are there examples of JFugue working with MusicXML", "This was a bug in JFugue v5.0.5 .", "I use JFugue for Android 4.0.3 from here github.com kshoji JFugue-for-Android https : github.com kshoji JFugue-for-Android .", "I recommend using JFugue 5 if you re not already doing so the management of timing in JFugue 5 is much improved over JFugue 4 .", "Although this error is reported by JFugue the problem is not with JFugue itself .", "Hi I ve also developed JFugue for Android library Its repository is here : github.com kshoji JFugue-for-Android https : github.com kshoji JFugue-for-Android", "I am using JFugue 5.0.3 .", "Your work in jfugue is truly awesome.. .", "Making the first steps with jfugue.. .", "I want to achieve that in jFugue .", "I m the author of JFugue", "UPDATE 1 jfugue pom.xml is this http : jfugue.googlecode.com svn-trunk jfugue pom.xml .", "I m trying to use jFugue + gervill to create music with Java 7 .", "I would really appreciate help from the open-source community on JFugue + Android .", "The duration you provide for notes in JFugue is measured in beats .", "My second question is about transposing Keys in JFugue .", "What is JFugue trying to download stuff over the network", "Please note that there is no implementation of MusicXmlParserListener for JFugue 5.0 at the moment .", "The MusicXML capabilities within JFugue are entirely community-contributed .", "I m very glad that you are enjoying JFugue .", "i tried jfugue 5", "Validated by the author of JFugue :", "ParserListener is an interface in JFugue .", "I want to use jFugue to play some MIDI music in an applet .", "Which version of JFugue are you using", "I tested with JFugue 5.0.5 and this is not an issue .", "Is there any way to get JFugue to output a music stream in a way thats compatible input to any audio casting system", "You will want to use JFugue 5 for this as it has improvements over earlier versions of JFugue for playing consecutive patterns .", "If you re using JFugue for Android unfortunately that is not an official JFugue project that I have any involvement in .", "The two different parsers you see are a result-of MusicXML capability in JFugue 5.0+ not being fully completed yet which is mentioned on the JFugue download page .", "Instead JFugue tries to parse scaleNotesC 0 itself as a music string which it is not so you hear no music .", "Things like JFugue for example OMG .", "A new MusicXMLParser will be coming in JFugue 5 .", "Which version of JFugue are you running", "I added mine and jfugue pom.xml .", "Looks like it s a bug in the JFugue code .", "I am not involved in the JFugue-for-Android project .", "There s now a Android JFugue https : github.com kshoji JFugue-for-Android port on GitHub .", "JFugue cannot drawing the stave lines the library only works with pattern .", "This combined with the fact that I haven t recently changed the music rendering code in JFugue leads me to think this is a compile issue .", "is it possible to make custom note and rest duration using JFugue", "In particular JFugue 5 measures the value given to @ in beats not milliseconds .", "I have a couple of questions concerning JFugue 5 the beta version .", "Numbers are just numbers and do not need brackets in JFugue 5 .", "It works half the time because JFugue assumes network IO and that breaks .", "Remember that JFugue produces MIDI output and MIDI is data not audio .", "Can you also tell me if Jfugue can work in android", "However I have not released an official version of JFugue for Android at this point .", "I m working on a project on Eclipse IDE that requires jfugue .", "I am using Netbeans java with JFugue .", "BTW I m currently using JFugue 4.0.3 .", "I ll give JFugue 5 Beta a try for that .", "JFugue uses the same instruments that are defined by the MIDI standard .", "So is there functionality in JFugue that can help me accomplish this", "I m working on a personal project in Java and I m using JFugue to simplify music generation and playback .", "I want to ask how to draw stave music and its component like key signature and others in Java Netbeans 8 with JFugue 4 Library", "Note : I just noticed the subject mentions jFugue .", "I want to run JFugue on an Amazon cloud instance to create a music stream from data on the cloud instance...and then listen to the music stream on my local laptop via some audio cast system .", "This is a known bug in JFugue : .. . .. . https : code.google.com p jfugue issues detail id 49 .. . .. . The most recent version is claimed to fix this : .. . .. . https : code.google.com p jfugue downloads detail name jfugue-4.1.0-20120125.jar can 2 q https : code.google.com p jfugue downloads detail name jfugue-4.1.0-20120125.jar can 2 q", "I added the repository : .. . .. . repository .. . id jfugue-repo id .. . url http : jfugue.googlecode.com svn-trunk jfugue url .. . repository .. . .. . .. . 4 .", "I have written this code after going through several jfugue codes .", "The author of JFugue is chiming in to say that @Archeg s answer should be accepted as the correct answer", "Thank you so much for your answer and for developing jFugue", "I already implemented Ksoji s jfugue-android library https : github.com kshoji JFugue-for-Android tree master jfugue-android in my project but I can t do anything with it for example initialize it by typing : .. . .. . since Eclipse doesn t seem to know what MidiSystem is at all and I can t fix the problem .", "Using JFugue-4.0.3-with-musicxml.jar Library I think this library is very useful due to MusicXmlParser MusicXmlRenderer and ParserListener class .", "Here is my code : .. . .. . I am using the JFugue API .", "There is a pom.xml file and I think that jfugue is a project based on maven .", "Is there any way or method to add or replace my needed instrument in Jfugue", "Is there any way to get jFugue to play a random note from a set in an array", "JFugue does not provide graphical capabilities or user-interface components .", "From The complete guide to JFugue it is mentioned that depending on the Key Signature in the pattern JFugue interprets the note value .", "The question is that if we are dealing with an F major key and write Bb how would JFugue interpret it", "I had read that JFugue supports MusicXML and I expected this to work without an issue .", "For the record Oops something went wrong is not a JFugue error message but attempting to build file was in MusicXmlParser J which is now out of the code .", "JFugue tries to perform a schema validation and downloads the DTD specification from a high-load site .", "I need jFugue to load the pattern from either ByteArray or InputStream .", "Invocation JFugue 4.0.3 : .. . .. . I have been using the musicxml parsing capability of JFugue before and everything worked then but now it is giving me this error : .. . .. . The link partwise.dtd file is still located at the link but downloading is denied .", "Check the following Code : .. . .. . At Command Prompt Output : .. . .. . C : Javapro javac -classpath gervill.jar jfugue-4.0.3.jar SF2Test2.java .. . .. . C : Javapro java -classpath gervill.jar jfugue-4.0.3.jar .", "Jfugue contains some Indian instruments like Sitar and Shanai etc . but I need to compose for Dholak or Tabla percussion instruments which are not enlisted in the list of 127 instruments in Jfugue .", "I am using JFugue for Android https : github.com kshoji JFugue-for-Android and I have been able to generate Midi files which subsequently reproduce using MediaPlayer .", "I am using jFugue 4.03 and attempting to read in a song using the MusicXML reader class .", "I am running the Jfugue test program here is the code : .. . .. . The code does work so far that is it compiles and the notes are played .", "There is nothing in JFugue itself that would create pops this is probably an issue with the MIDI synthesizer that your JRE is using .", "On the other hand I have two other questions regarding jfugue : 1- Is it possible to input different soundfonts for different instruments", "2- I want to implement my project as an Android App I am trying to setup kshoji s jFugue for Android .", "Using JFugue 5.0 how would one go about creating pitch bends and slides like those in guitar pro", "Can you fix it please or can you release JFugue 5 for android also", "I would encourage you to contact kshoji looking at the site it looks like the latest uses JFugue 5.01 .", "I hope Android M with MIDI support will make a JFugue 5 port to Android easier .", "You can change the duration with the T directive in JFugue like T120 or T60 - T60 will have the same effect as dividing the duration in half .", "JFugue 5 does away with brackets except in cases where the stuff inside the bracket is a string to look up in a dictionary e.g . T Allegro or I Piano .", "Based on your issue I have just updated the JFugue distribution : I moved one of the parsers out and renamed the other one simply MusicXmlParser .", "I m having a error when trying to parse musicxml files tried with both JFugue 4.0.3 and 5.0.5 .", "In JFugue 4.0.3 the link was hardcoded into the code in 5.0.5 I think it gets the dtd link address directly from the input file .", "I am using Tabla Soundfont along with JFugue to create the new composition and play it .", "I tried to specify the volume of the pattern in JFugue with java as follows .. . .. . Its playing the pattern successfully when I press the key ." ] }
{ "confidence": [ 64.06402587890625, 61.773643493652344, 61.470909118652344, 59.6710205078125, 59.223365783691406, 58.41094207763672, 56.797889709472656, 56.505859375, 55.14881134033203, 54.51142883300781, 54.48114776611328, 54.12944030761719, 53.247894287109375, 52.12058639526367, 52.0211181640625, 51.6043701171875, 51.352142333984375, 51.27098846435547, 50.355506896972656, 49.8541259765625 ], "content": [ "Question : I am trying to write a simple parser to read MusicXML and play it back . I am using JFugue 5.0.3 . The library simply hangs in the middle half the time . My code : - .. . .. . This code fails after attempting to build MusicXML file with a useless error message : - .. . .. . and it works sometimes and when it does it works like a charm and within milliseconds . What is JFugue trying to download stuff over the network A little debugging revealed it works by downloading .. . .. . Few questions to the people who work on this : - .. . .. . 1 . Why doesn t this code work with MusicXMLParserListener class This class fails with an arbitrary null-pointer exception because it expects Staccato parser to be defined . Why And what is the deal with two different listeners for MusicXML - MusicXMLParserListener J and MusicXMLParserListener R Don t expose broken stuff to consumers please . 2 . I had read that JFugue supports MusicXML and I expected this to work without an issue . Are there examples of JFugue working with MusicXML .. . Answer : The two different parsers you see are a result-of MusicXML capability in JFugue 5.0+ not being fully completed yet which is mentioned on the JFugue download page . These were two implementations contributed by two developers in the open-source community . Based on your issue I have just updated the JFugue distribution : I moved one of the parsers out and renamed the other one simply MusicXmlParser . It turns out that the other parser MusicXmlParser R is the better of the two . Of course no user would have had any idea about that . My apologies for exposing an incomplete capability . For the record Oops something went wrong is not a JFugue error message but attempting to build file was in MusicXmlParser J which is now out of the code . The following code which is from test org.jfugue.musicxml demonstrates the use of MusicXmlParser . Please note that there is no implementation of MusicXmlParserListener for JFugue 5.0 at the moment . I have updated the download page to make this clear . The MusicXML capabilities within JFugue are entirely community-contributed . Comment : I kind of figured whats going on . JFugue tries to perform a schema validation and downloads the DTD specification from a high-load site . It works half the time because JFugue assumes network IO and that breaks . I will try it out without an internet-connection to confirm this . Comment : Yep I was right github.com avh4 jfugue blob master jfugue src org jfugue https : github.com avh4 jfugue blob master jfugue src org jfugue MusicXmlRenderer.java . In here method getMusicXMLDom is present which tries to copy DTD info from musicxml.org dtds partwise.dtd quot http : www.musicxml.org dtds partwise.dtd quot . I am pretty certain this is done in quite a few places . Comment : Good finding this Please keep in mind that this is not an official source for JFugue . The current version and most up-to-date source code including an updated MusicXmlParser is available at JFugue.org", "Question : null .. . Answer : My code is as follows : player.play C It plays the note C but twice . I wasn t getting it at first . After running the code multiple times it started giving this glitch . Comment : This was a bug in JFugue v5.0.5 . Try downloading a newer version and let me know if you still have the problem . Comment : Thank you sir. . It worked . Can you also tell me if Jfugue can work in android Comment : As of Android Marshmallow Android now supports MIDI . However I have not released an official version of JFugue for Android at this point . I would really appreciate help from the open-source community on JFugue + Android . Comment : Thank you sir for your help . Your work in jfugue is truly awesome.. . Comment : Thank you I m very glad that you are enjoying JFugue . That s why I made it - so others can have fun and enjoy creating musical programs .", "Question : null .. . Answer : I want to run JFugue on an Amazon cloud instance to create a music stream from data on the cloud instance...and then listen to the music stream on my local laptop via some audio cast system . Is there any way to get JFugue to output a music stream in a way thats compatible input to any audio casting system Thanks . Comment : Remember that JFugue produces MIDI output and MIDI is data not audio . It takes a Synthesizer to convert MIDI to sound . A more general question might be Is there a way to take a MIDI stream and convert it to an audio stream e.g . streaming WAV Comment : See also stackoverflow.com questions 4354963 python-midi-to-audio-stream http : stackoverflow.com questions 4354963 python-midi-to-audio-stream", "Question : null .. . Answer : I want to ask how to draw stave music and its component like key signature and others in Java Netbeans 8 with JFugue 4 Library Really confused . Anyone can help me or anyone have the references Thank you so much . Comment : have you gone through their examples I m not really clear where you re stuck. . jfugue.org examples.html http : www.jfugue.org examples.html Comment : Sir thank you for answer . I already read the books and example . JFugue cannot drawing the stave lines the library only works with pattern . but i have to make it stave lines music as user-interface . if i draw with canvas is that okay or not sorry Sir im newbie in java programming . Comment : StackOverflow works best when you have a specific problem to ask . If you give us nothing to work with nothing is approximately what you will get back . You should try to look at the examples and write some code and then if you get stuck show us what you ve done so far . Comment : JFugue does not provide graphical capabilities or user-interface components .", "Question : I compose music in java with JFUGUE . Jfugue contains some Indian instruments like Sitar and Shanai etc . but I need to compose for Dholak or Tabla percussion instruments which are not enlisted in the list of 127 instruments in Jfugue . Is there any way or method to add or replace my needed instrument in Jfugue .. . Answer : JFugue uses the same instruments that are defined by the MIDI standard . You may be able to find a Dholak or Tabla instrument as a SoundFont which you can load into Java if you are using the Gervill synthesizer or versions of Java that include the Gervill implementation which are JDK 7 and later . See also : Can we create our own composition using Soundfont and JFugue http : stackoverflow.com questions 19161634 can-we-create-our-own-composition-using-soundfont-and-jfugue", "Question : I m trying to create algorithmic music in netBeans using jFugue and have an integer array with the notes from one octave of the c major scale : .. . .. . When I run the code below to try to get it to play C nothing happens . I have tried using an integer array but that didn t work either . Is there any way to get jFugue to play a random note from a set in an array EDIT : .. . I changed the player code above to this to try and play multiple notes from the array but it won t work Comment : Remove the quotes : playerOne.play scaleNotesC 0 Comment : Thanks @BackSlash also when i try and play it with multiple notes exemplified above in my edit it doesn t work yet if i have just one it still works .. . Answer : In your first example .. . .. . You are trying to pass a Java expression as a string . However the string itself is not evaluated as a Java expression . Instead JFugue tries to parse scaleNotesC 0 itself as a music string which it is not so you hear no music . If you remove the quotes Java will evaluate scaleNotesC 0 to 60 and JFugue will successfully parse 60 as a Middle-C and play it . The version of JFugue you are currently using does not have a play method that takes a list of strings as a parameter an upcoming release will have this capability . Might I suggest :", "Question : I tried various ways to do this . 1 . Using proxymusic-2.0.jar Library Marshalling and unmarshalling done between Java object and Xml file but I didn t find a way to draw it unmarshalled from Xml file on Android app Activity View etc . 2 . Using JFugue-4.0.3-with-musicxml.jar Library I think this library is very useful due to MusicXmlParser MusicXmlRenderer and ParserListener class . However The current state of Midi support on Android is depressing . They ripped out javax.sound.midi so all libraries that depend on this are not working . Things like JFugue for example OMG . I just want to show musicXml file to sheet music on android Please recommend me the reference site or let me know the simple sample code url for resolve this issue . thank you very much . Comment : any luck on creating this .. . Answer : There s now a Android JFugue https : github.com kshoji JFugue-for-Android port on GitHub . Also check the commercial SeeScore SDK for Android http : www.seescore.co.uk developers .", "Question : null .. . Answer : Quick question . I just downloaded JFugue 5.0.5 on OS X and I m playing around with some of the example code : .. . .. . The only problem I ve been having is that every time I play a music string it plays the first note twice and then plays the rest fine . Is this intentional or just some weird error Comment : This is something I m trying to track down . If you save your pattern as a MIDI file use MidiFileManager.savePatternToMidi you ll likely notice that the MIDI file is correct . This combined with the fact that I haven t recently changed the music rendering code in JFugue leads me to think this is a compile issue . I m looking into it .", "Question : null .. . Answer : When I set T40 it supposed to play in tempo 40 bpm but it plays in tempo 135 bpm When I set T41 it is in tempo 145 bpm and this continue until T57 . From T58 it is ok I mean is in tempo 58 bpm . The same error occur again when I set T Grave .It supposed to be in tempo 40 bpm but it is again in tempo 135 bpm Comment : Which version of JFugue are you using I tested with JFugue 5.0.5 and this is not an issue . If you re using JFugue for Android unfortunately that is not an official JFugue project that I have any involvement in . I m the author of JFugue Comment : Thank you . I use JFugue for Android 4.0.3 from here github.com kshoji JFugue-for-Android https : github.com kshoji JFugue-for-Android . Can you fix it please or can you release JFugue 5 for android also I am using Android Studio . Comment : I am not involved in the JFugue-for-Android project . I would encourage you to contact kshoji looking at the site it looks like the latest uses JFugue 5.01 . I hope Android M with MIDI support will make a JFugue 5 port to Android easier .", "Question : I am running the Jfugue test program here is the code : .. . .. . The code does work so far that is it compiles and the notes are played . However I can change the instrument around however much I wish I always get piano music . How can I change this .. . Answer : You should set the instrument at the beginning of the sequence not at the end of it . Sequence I MARIMBA C D E F G A B is played as a marimba instrument for me . Comment : The author of JFugue is chiming in to say that @Archeg s answer should be accepted as the correct answer", "Question : null .. . Answer : I m working on a personal project in Java and I m using JFugue to simplify music generation and playback . I m trying to output a MusicXML file for each of my saved MIDI files so They can be viewed in Finale NotePad but the MusicXML files that are output don t seem to be properly formatted . They end abruptly like so : .. . type 0.0 type note note . Here is the code I m using to write the files : Comment : A new MusicXMLParser will be coming in JFugue 5 . JFugue.org http : www.JFugue.org", "Question : is it possible to make custom note and rest duration using JFugue I have been trying to achieve this by using the symbol in MusicString for the note duration but with no success . The code used is : .. . .. . This makes the A note to be played for 6 seconds . In this case i can just divide by 2 and get the wanted result but i am not sure if this is the correct approach . The second problem is when using the symbol @milliseconds which indicates the time in milliseconds when the following tokens should be played . For some reason i can t make the next note to be played after the milliseconds i have declared . In the following example the B note is played at after 34sec instead of 2sec . player.play V0 I Flute A @2000 B .. . .. . Any help would be appreciated . .. . Answer : It seems that you re asking for a custom note duration measured in seconds . The duration you provide for notes in JFugue is measured in beats . To figure out how a long a note will last in seconds you need to multiply the beats by the tempo which is measured in beats per minute or bpm then do some unit conversions on minutes to seconds . The default tempo is 120 bpm . You can change the duration with the T directive in JFugue like T120 or T60 - T60 will have the same effect as dividing the duration in half . I recommend using JFugue 5 if you re not already doing so the management of timing in JFugue 5 is much improved over JFugue 4 . In particular JFugue 5 measures the value given to @ in beats not milliseconds . Disclosure : I m the author of JFugue", "Question : I have a couple of questions concerning JFugue 5 the beta version . From The complete guide to JFugue it is mentioned that depending on the Key Signature in the pattern JFugue interprets the note value . As an example in the case of an F-major key B would be automatically translated to B-flat unless we write Bn instead . The question is that if we are dealing with an F major key and write Bb how would JFugue interpret it As Bbb or as a Bb note My second question is about transposing Keys in JFugue . What is the fastest way of doing so Thank you for your help .. . Best Regards .. . Hussein Hammoud . Comment : These are both excellent questions thank you I ll do my best to answer them but unfortunately I can t do it today . Comment : Oh And I have another question JFugue 5 is giving me an error when I play a pattern containing a numerical value of a note example : C5 corresponds to 60 . That is not the case in JFugue4 . Any suggestions are appreciated . Comment : For that last one use 60 without the brackets . JFugue 5 does away with brackets except in cases where the stuff inside the bracket is a string to look up in a dictionary e.g . T Allegro or I Piano . Numbers are just numbers and do not need brackets in JFugue 5 . .. . Answer : Answer to the first part of your question : In the key of F-Major Bb is played like Bb the same as B itself when played in F-Major . Here s a program that tests this : .. . .. . And its output note that MIDI Note 70 is Bb and MIDI Note 71 is B : .. . .. . Answer to the second part of your question : I m not sure there s a decent answer right now . But you have inspired me to write a transpose method on the Pattern class . Thank you Comment : Thank you for your answers This was really helpful . I am currently trying to write the transpose method and I will send it to you if it ends up working without any bugs . I appreciate your response : D Best Regards Hussein .", "Question : Say I have a player who is currently playing a pattern and at a certain point I want to set the next pattern that it should play without producing a small pause when it switches between the two . It is similar to Android s mediaplayer class where you can have 2 mediaplayer which each is setNext to the other . With the use of setOnCompletion you can alternate between the two without hearing a small pause or gap . I want to achieve that in jFugue . Thanks .. . Answer : You will want to use JFugue 5 for this as it has improvements over earlier versions of JFugue for playing consecutive patterns . Specifically you ll want to use the new RealtimePlayer . You can send the RealtimePlayer new patterns or music strings whenever you wish like this : Comment : Thank you so much for your answer and for developing jFugue I tried the code that you suggested when I ran my program it didnt play anything . No exception was thrown too . What seems to be the problem On the other hand I have two other questions regarding jfugue : 1- Is it possible to input different soundfonts for different instruments i.e . I have a player that is playing multiple instruments I want to input a different soundfont for each instrument . 2- I want to implement my project as an Android App I am trying to setup kshoji s jFugue for Android . Have you ever tested that project Comment : You re welcome 2 . 0 Hard to diagnose the problem from a distance . Does it work with a regular Player object 1 Yes see also stackoverflow.com questions 15996711 http : stackoverflow.com questions 15996711 newer-version-of-jre-doesnt-load-soundbank-but-older-version-does 2 I plan to in the near future but have not yet . Feel free to email me offline with follow-ups . Comment : RealtimePlayer rt null try rt new RealtimePlayer catch MidiUnavailableException e e.printStackTrace Pattern pat new Pattern D5h E5h Player p new Player p.play pat rt.play pat p.play If I comment the last p.play I only hear pat . If I leave it I hear the pat and 1 millisecond of a chord . Comment : Please contact me directly for follow-up discussions . My email-address is in my profile .", "Question : I am trying to create a piano program where you click the key and using an actionlistener is plays the note from the jfugue library . For some reason after about 18 clicks without changing anything the buttons stop working . I cut down the code to analyze why this might happen thus only two notes . Thanks in advance for any advice Comment : This code works fine for me the buttons never stopped working . Comment : Does the cut-down version stop in the same fashion Do you have any output to look at e.g . a console for a stacktrace to appear if not get that arranged if so what does it say .. . Answer : This is a known bug in JFugue : .. . .. . https : code.google.com p jfugue issues detail id 49 .. . .. . The most recent version is claimed to fix this : .. . .. . https : code.google.com p jfugue downloads detail name jfugue-4.1.0-20120125.jar can 2 q https : code.google.com p jfugue downloads detail name jfugue-4.1.0-20120125.jar can 2 q", "Question : I m working on a project on Eclipse IDE that requires jfugue . How do I add this dependency to my project using Maven I tried to : .. . .. . 1 . Right click to the project name- Maven- Add Dependency .. . 2 . I added a dependency from pom.xml form : .. . .. . dependency .. . groupId org groupId .. . artifactId jfugue artifactId .. . version 4.1.0 version .. . type java-source type .. . dependency .. . .. . .. . 3 . I added the repository : .. . .. . repository .. . id jfugue-repo id .. . url http : jfugue.googlecode.com svn-trunk jfugue url .. . repository .. . .. . .. . 4 . It search files with a broken link but I can t see it because it not appear for more than one second in the Progress View . How can I fix this Thanks for your help . UPDATE 1 jfugue pom.xml is this http : jfugue.googlecode.com svn-trunk jfugue pom.xml . Mine pom.xml is this http : pastebin.com raw.php i i5HaV3GG . Comment : I don t think the url given is a maven repository Comment : Sorry for issue . Now the link points to the main project . There is a pom.xml file and I think that jfugue is a project based on maven . Comment : Could you post the pom.xml from that url or just repository Comment : I added mine and jfugue pom.xml . .. . Answer : It seems that the pom.xml doesn t have remote repositories . Use the following link http : maven.apache.org guides mini guide-3rd-party-jars-local.html to figure out how to install jar into the local repository . You have also remove repository tag from your project s pom.xml . Comment : Thanks Roman for you answer . How can I do the same thing with m2e Comment : After you have installed the jar to the local repository you can add dependency using m2e editor of pom.xml or by action wizard . Comment : Yes but I don t use maven in command-line . I have only m2e plugin for Eclipse . Is there a way to install the jar in the local repository Comment : Now the problem is solved . I used this http : stackoverflow.com a 4324057 1992780 to create a custom command-line run to import the jar in the local repository and this http : www.mkyong.com maven how-to-include-library-manully-into-maven-local-repository to include the jar in my project . Comment : @DavidePastore I like that you solved the problem . Note it seems you like to play with eclipse but be aware that eclipse itself if a good tool but not all the problems you could solve with it . If you are working with maven first thing you should do is install maven and configure it to run from the command-line it s my suggestions and always read original docs from the maven site . However it regards to all Apache projects . Happy that helped you .", "Question : I already implemented Ksoji s jfugue-android library https : github.com kshoji JFugue-for-Android tree master jfugue-android in my project but I can t do anything with it for example initialize it by typing : .. . .. . since Eclipse doesn t seem to know what MidiSystem is at all and I can t fix the problem . Should I import anything else to my project in order to be able to play some simple patterns on an Android device Comment : Have you tried importing kshoji s ADK-MIDI-Driver github.com kshoji ADK-MIDI-Driver https : github.com kshoji ADK-MIDI-Driver .. . Answer : Kshoji s Project doesn t provide the sound playback.To play MIDI notes on application The USB MIDI devices or BLE MIDI devices will be needed . In case you want to do that I recommend you build your project using Android Studio instead of Eclipse . I did a Library that is kind of a solution to have Music Strings played on Android check it out : https : github.com ziad-halabi9 AlgorithmicMusicPlayer .. . .. . It basically takes a musical strings such as A5s B5q E6h and converts it into a wav file of a certain instrument . It can also handle multiple instruments at the same time . Comment : This is what I am looking for . However AlgorithmicMusicPlayer project isn t working in AndroidStudio . When I run it it doesn t produce the song.wav file . Can you fix it please Comment : @inder saw your issue on github regarding missing music notes files . Will fix it today . Let me know if you need anything else . Thanks Comment : any updates so far Comment : @inder I updated the link you can download the files now . Im sorry for being late . If you find the project to be useful please upvote my answer . Thanks", "Question : I m trying to use jFugue + gervill to create music with Java 7 . I ve the following code .. . .. . The problem is that if I change the soundbank the instruments sound doesn t change and the instruments printed are always the same . What I wrong .. . Answer : I find the solution I think : - . I ve to invert the open and loadAllInstruments calls : .. . .. . synt.open synt.loadAllInstruments soundbank", "Question : I tried various ways to do this . 1 . Using proxymusic-2.0.jar Library Marshalling and unmarshalling done between Java object and Xml file but I didn t find a way to draw it unmarshalled from Xml file on Android app Activity View etc . 2 . Using JFugue-4.0.3-with-musicxml.jar Library I think this library is very useful due to MusicXmlParser MusicXmlRenderer and ParserListener class . However The current state of Midi support on Android is depressing . They ripped out javax.sound.midi so all libraries that depend on this are not working . Things like JFugue for example OMG . I just want to show musicXml file to sheet music on android Please recommend me the reference site or let me know the simple sample code url for resolve this issue . thank you very much . Comment : any luck on creating this .. . Answer : You may want to try this http : musicxml-viewer.com I have not tested on Android browser but it works on iOS browser and from that standpoint no support for Java or Flash they stand at same level - so hopefully it ll do the job .. . .. . regards", "Question : I want to use jFugue to play some MIDI music in an applet . There s a class for the MIDI pattern - Pattern - and the only method to load the pattern is from a File . Now I don t know how applets load files and what not but I am using a framework PulpCore that makes loading assets a simple task . If I need to grab an asset from a ZIP catalogue I can use the Assets class which provides get and getAsStream methods . get returns the given asset as a ByteArray the other as an InputStream . I need jFugue to load the pattern from either ByteArray or InputStream . In pseudo-code I would like to do this : .. . .. . However there is no File constructor that would take a ByteArray . Suggestions please .. . Answer : It s true that jFugue doesn t allow to load anything but a file which is a shame because nothing prevents from using any other kind of stream : .. . .. . UPDATE for loadMidi Comment : using this code the file is loaded without errors but won t play . I am completely losing my mind now . all i wanted was to load a midi and play it . Comment : I guess you should use loadMidi to load a midi file" ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
cqengine@java@137
cqengine -- cqengine collection query-engine is a nosql indexing and query-engine for retrieving objects matching sql-like queries from @placeholder collections .
{ "confidence": [ 62.264251708984375, 54.334564208984375, 53.17070770263672, 52.910980224609375, 50.63526153564453, 50.00847625732422, 49.06852722167969, 47.83583068847656, 46.48783874511719, 46.41865158081055, 46.313392639160156, 45.502235412597656, 44.55391311645508, 41.62546920776367, 41.62546920776367, 40.60722732543945, 39.48090362548828, 39.18182373046875, 39.18182373046875, 37.44224166870117, 37.08534240722656, 35.7942008972168, 32.63427734375, 28.864328384399414, 22.647130966186523, 22.061922073364258, 21.09555435180664, 21.09555435180664, 20.440893173217773, 20.228546142578125, 20.183055877685547, 19.556589126586914, 19.174047470092773, 17.978702545166016, 16.976341247558594, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.37483024597168, 15.13792610168457, 14.591487884521484, 14.591487884521484, 14.426410675048828, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 13.342901229858398, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707, 11.994908332824707 ], "content": [ "Does anyone know if CQEngine can query objects with in other objects", "So my question is what is the indexing penalty in CQEngine for a fast changing collection elements often added and removed from the collection", "I m the author of CQEngine .", "BTW I m the author of CQEngine and you can find the complete source for this example on the CQEngine site https : github.com npgall cqengine blob master code src test java com googlecode cqengine examples nestedobjects NestedObjectsExample.java .", "I m not an expert on lambdas so I ll just answer regarding the CQEngine part : You need to use rows.retrieve to make CQEngine execute a query .", "Can this be done with CQEngine or would I need to flatten the objects", "I have an issue in using CQEngine .", "FYI you can also ask questions in the CQEngine discussion forum https : groups.google.com forum forum cqengine-discuss .", "See : Grouping and Aggregation in CQEngine with Java 8 Lambda Expressions https : code.google.com p cqengine Java version 8 or later - lambda expressions .", "Yes you just need to define a CQEngine attribute which will return the values from the nested objects you want to search .", "I m considering CQEngine https : code.google.com p cqengine for a project where I need to handle lots of real-time events and execute some queries from time to time .", "Also if the values you are indexing uniquely identify an object that is primary key-type attributes then you can also try the UniqueIndex http : cqengine.googlecode.com svn cqengine javadoc apidocs com googlecode cqengine index unique UniqueIndex.html .", "Or cqengine behind the scenes actually makes use of it when RAM is not enough", "There s a bit of discussion on the CQEngine site about how to perform queries to get a ResultSet .", "If you expect to get a variety of queries on the same dataset consider caching the unfiltered dataset into the application tier and querying it with CQEngine .", "Your question mostly relates to how to group and sum objects with lambdas in general and not to CQEngine per-se .", "I am using cqengine with no particular setting and I have a 6MB maven-dependency on sqllite .", "I m investigating the use of cqengine https : code.google.com p cqengine as the cost of re querying the database would be too costly but I m really struggling to retrieve the data I need .", "I m the author of CQEngine I created issue 45 https : github.com npgall cqengine issues 45 to see if I can improve the API based on this answer in future .", "I use cqengine https : github.com npgall cqengine for collection indexation : .. . .. . This code isn t compiled because : .. . .. . Probably it s a lack of library design : LocalDate implements ChronoLocalDate that extends Comparable ChronoLocalDate it means that it s necessary to use wildcard bounds in generic method declaration .", "Above you re actually bypassing the query-engine and its indexes and accessing the collection directly .", "1-Let oracle take care of this with distinct keyword .. . .. . 2-Do this in java with cqengine https : code.google.com p cqengine wiki DeduplicationStrategies Logical Elimination Strategy : .. . .. . 3-Do this in java with a set .. . .. . From a performance point of view which one is better", "If you have a lot of unique values in attributes that you index you would probably benefit from IndexQuantization http : code.google.com p cqengine wiki IndexQuantization discussed on the site .", "I would like to be able to query users orders and products .", "It searches the collection for users who ordered a Snickers Bar .", "You could optionally add an index on this attribute to accelerate queries on it .", "It works well for returning the results but I noticed that the larger the collection gets the slower it becomes to add or remove elements to from it .", "I also get an OutOfMemoryError on large numbers of events from the indexes increasing along with the collection I think .", "I need to have sql-like function which is matchesRegex as well as equal function .", "Regarding the addition removal of elements to the collection I noticed that adding elements is slower if I have indexes on the collection than without indexes .", "Don t know if the IndexQuantization would help since the values I m indexing although unique they are not in sequence .", "Problem : if i Keep the Attribute Data Type as Attribute ClassDataType Comparable Generic purpose i cannot use it for Regex query as it needs something that extends CharSequence and if i make it Attribute ClassType", "So adding objects will either add new entries a new Set to the CHM if objects with the attribute value are already stored or to the existing Set if already stored .", "I have a few simple indexes added on the collection so I m assuming the delay is because on each event added removed the indexes are updated .", "In SQL I d like to .. . .. . Every example I come across shows me how to do this for one field .. . .. . Which returns .. . .. . Is it possible to do it for all fields or am I approaching this completely incorrectly .. . .. . Edit : .. . .. . Example output I d like would be", "I currently just use NavigableIndexes so I am not writing anything on my disk not explicitely that is however I m managing very big lists .", "My question is : can I remove this dependency", "You can safely remove that dependency if you are not using it .", "The situation of which dependencies can be safely be removed should indeed be documented better .", "I ll try to do that in future .", "Ok thanks", "And good job with your project it is really awesome", "For example this attribute will retrieve the names of each Product which is contained in the Orders which were placed by a particular User .", "Here s an example which sets up an IndexedCollection of Users where each user has a number of Orders and each order has a number of Products .", "The products are snacks you might find at a cinema .", "I have just added this as a new example", "That is actually amazing .", "It has cut my project dev time in half .", "Thanks", "No problem glad to help", "Can you give an example of the output you d like to see", "I think creating new classes like a wrapper is to much overhead for fixing a generic signature error .", "I d create a delegation method like .. . .. . Actually the problem lies in the declaration A extends Comparable A which should be A extends Comparable", "I have a table from which I extract 8 columns said columns will be properties of a pojo say MyPojo .", "This is a way to tune the tradeoff between memory usage and retrieval speed .", "But it s especially useful to reduce the size of indexes in memory if you have a large number of unique values .", "Hope that helps", "Thank you for taking the time to respond .", "Will give It a try though .", "Is that because on each add remove the index gets reorganized", "It might depend on which type of index you are talking about as you didn t mention .", "They all use different data-structures .", "But in general no indexes are not reorganized as each object is added .", "The HashIndex is basically a ConcurrentHashMap AttributeType Set ObjectType .", "If your values aren t in sequence you could write your own implementation of the Quantizer interface .", "For example a simple implementation would mod the attribute value to the number of entries in the index you want e.g .", "value desired index size .", "Using an UniqueIndex solved the memory usage I was using initially HasIndexes which were causing lots of memory usage .", "For the delays I m investigating further but will probably post on the forum .", "Thanks a lot", "My requirement is to create Attributes Dynamically .", "And use them while querying .", "extends Comparable can use it for regex by typecasting it to Attribute ClassType String then equal method doesn t accept Attribute .", "What would be the solution for this.. . Will appreciate any response .", "To group and sum the results you can then use JDK 8 StreamSupport to convert the ResultSet to a stream .", "I don t understand what you mean by do it for all fields .", "@StuartMarks example output added", "@Nick The one-arg overload of groupingBy will accumulate a list of values instead if summing them .", "Is that what you want", "I want to remove duplicates .", "I came up with two strategies .", "The one which runs faster on your machine for your dataset .", "The best way to find that out is to test it .", "Let the database do the work .", "In this case you don t send unnecessary data over the network which will - probably - have the biggest positive impact on performance .", "Also it is the most compact solution in terms of code-size .", "The best way to decide these things is to model it .", "What are the access patterns in your application", "If this is would be a one-off request : have the database do the filtering .", "If you expect to get many such identical requests : have the database do the filtering and consider caching results in the application .", "There is no rule of thumb such as always have the database do the work .", "If your application operates at any kind of scale you will not want every request to hit the database .", "You need to scale out your application tier .", "On the other hand you should not over-engineer .", "The answer depends on the traffic volume and data-access patterns that you expect .", "I guess creating of LocalDate wrapper that implements Comparable is a workaround in this case .", "Perhaps there are some other solutions of this problem", "super A however fixing it here wouldn t help as this pattern is spread throughout the API and allowing such a return-type here would just raise errors at the next API usage .", "But since as far as I understood Attribute only produces A s but doesn t consume them we can relax the signature here and accept an Attribute", "extends A following the PECS http : stackoverflow.com q 2723397 2711488 pattern ." ] }
{ "confidence": [ 84.4640884399414, 83.90339660644531, 77.65971374511719, 58.5915641784668, 56.89866638183594, 56.11924743652344, 54.59056091308594, 50.33344268798828 ], "content": [ "Question : Does anyone know if CQEngine can query objects with in other objects I would like to be able to query users orders and products . Can this be done with CQEngine or would I need to flatten the objects .. . Answer : Yes you just need to define a CQEngine attribute which will return the values from the nested objects you want to search . For example this attribute will retrieve the names of each Product which is contained in the Orders which were placed by a particular User . You could optionally add an index on this attribute to accelerate queries on it . Here s an example which sets up an IndexedCollection of Users where each user has a number of Orders and each order has a number of Products . The products are snacks you might find at a cinema . It searches the collection for users who ordered a Snickers Bar . BTW I m the author of CQEngine and you can find the complete source for this example on the CQEngine site https : github.com npgall cqengine blob master code src test java com googlecode cqengine examples nestedobjects NestedObjectsExample.java . I have just added this as a new example Comment : That is actually amazing . It has cut my project dev time in half . Thanks Comment : No problem glad to help", "Question : null .. . Answer : I m investigating the use of cqengine https : code.google.com p cqengine as the cost of re querying the database would be too costly but I m really struggling to retrieve the data I need . In SQL I d like to .. . .. . Every example I come across shows me how to do this for one field .. . .. . Which returns .. . .. . Is it possible to do it for all fields or am I approaching this completely incorrectly .. . .. . Edit : .. . .. . Example output I d like would be Comment : Your question mostly relates to how to group and sum objects with lambdas in general and not to CQEngine per-se . I m not an expert on lambdas so I ll just answer regarding the CQEngine part : You need to use rows.retrieve to make CQEngine execute a query . Above you re actually bypassing the query-engine and its indexes and accessing the collection directly . There s a bit of discussion on the CQEngine site about how to perform queries to get a ResultSet . To group and sum the results you can then use JDK 8 StreamSupport to convert the ResultSet to a stream . Comment : See : Grouping and Aggregation in CQEngine with Java 8 Lambda Expressions https : code.google.com p cqengine Java version 8 or later - lambda expressions . Comment : Can you give an example of the output you d like to see I don t understand what you mean by do it for all fields . Comment : @StuartMarks example output added Comment : @Nick The one-arg overload of groupingBy will accumulate a list of values instead if summing them . Is that what you want", "Question : I m considering CQEngine https : code.google.com p cqengine for a project where I need to handle lots of real-time events and execute some queries from time to time . It works well for returning the results but I noticed that the larger the collection gets the slower it becomes to add or remove elements to from it . I have a few simple indexes added on the collection so I m assuming the delay is because on each event added removed the indexes are updated . I also get an OutOfMemoryError on large numbers of events from the indexes increasing along with the collection I think . So my question is what is the indexing penalty in CQEngine for a fast changing collection elements often added and removed from the collection .. . Answer : If you have a lot of unique values in attributes that you index you would probably benefit from IndexQuantization http : code.google.com p cqengine wiki IndexQuantization discussed on the site . This is a way to tune the tradeoff between memory usage and retrieval speed . But it s especially useful to reduce the size of indexes in memory if you have a large number of unique values . FYI you can also ask questions in the CQEngine discussion forum https : groups.google.com forum forum cqengine-discuss . Hope that helps Comment : Thank you for taking the time to respond . Don t know if the IndexQuantization would help since the values I m indexing although unique they are not in sequence . Will give It a try though . Regarding the addition removal of elements to the collection I noticed that adding elements is slower if I have indexes on the collection than without indexes . Is that because on each add remove the index gets reorganized Comment : It might depend on which type of index you are talking about as you didn t mention . They all use different data-structures . But in general no indexes are not reorganized as each object is added . The HashIndex is basically a ConcurrentHashMap AttributeType Set ObjectType . So adding objects will either add new entries a new Set to the CHM if objects with the attribute value are already stored or to the existing Set if already stored . Comment : If your values aren t in sequence you could write your own implementation of the Quantizer interface . For example a simple implementation would mod the attribute value to the number of entries in the index you want e.g . value desired index size . Comment : Also if the values you are indexing uniquely identify an object that is primary key-type attributes then you can also try the UniqueIndex http : cqengine.googlecode.com svn cqengine javadoc apidocs com googlecode cqengine index unique UniqueIndex.html . Comment : Using an UniqueIndex solved the memory usage I was using initially HasIndexes which were causing lots of memory usage . For the delays I m investigating further but will probably post on the forum . Thanks a lot", "Question : I am using cqengine with no particular setting and I have a 6MB maven-dependency on sqllite . I currently just use NavigableIndexes so I am not writing anything on my disk not explicitely that is however I m managing very big lists . My question is : can I remove this dependency Or cqengine behind the scenes actually makes use of it when RAM is not enough .. . Answer : You can safely remove that dependency if you are not using it . I m the author of CQEngine . The situation of which dependencies can be safely be removed should indeed be documented better . I ll try to do that in future . Comment : Ok thanks And good job with your project it is really awesome", "Question : null .. . Answer : I have an issue in using CQEngine . My requirement is to create Attributes Dynamically . And use them while querying . I need to have sql-like function which is matchesRegex as well as equal function . Problem : if i Keep the Attribute Data Type as Attribute ClassDataType Comparable Generic purpose i cannot use it for Regex query as it needs something that extends CharSequence and if i make it Attribute ClassType extends Comparable can use it for regex by typecasting it to Attribute ClassType String then equal method doesn t accept Attribute . What would be the solution for this.. . Will appreciate any response .", "Question : I have a table from which I extract 8 columns said columns will be properties of a pojo say MyPojo . I want to remove duplicates . I came up with two strategies . 1-Let oracle take care of this with distinct keyword .. . .. . 2-Do this in java with cqengine https : code.google.com p cqengine wiki DeduplicationStrategies Logical Elimination Strategy : .. . .. . 3-Do this in java with a set .. . .. . From a performance point of view which one is better Comment : The one which runs faster on your machine for your dataset . The best way to find that out is to test it . .. . Answer : The best way to decide these things is to model it . What are the access patterns in your application If this is would be a one-off request : have the database do the filtering . If you expect to get many such identical requests : have the database do the filtering and consider caching results in the application . If you expect to get a variety of queries on the same dataset consider caching the unfiltered dataset into the application tier and querying it with CQEngine . There is no rule of thumb such as always have the database do the work . If your application operates at any kind of scale you will not want every request to hit the database . You need to scale out your application tier . On the other hand you should not over-engineer . The answer depends on the traffic volume and data-access patterns that you expect .", "Question : I use cqengine https : github.com npgall cqengine for collection indexation : .. . .. . This code isn t compiled because : .. . .. . Probably it s a lack of library design : LocalDate implements ChronoLocalDate that extends Comparable ChronoLocalDate it means that it s necessary to use wildcard bounds in generic method declaration . I guess creating of LocalDate wrapper that implements Comparable is a workaround in this case . Perhaps there are some other solutions of this problem .. . Answer : I think creating new classes like a wrapper is to much overhead for fixing a generic signature error . I d create a delegation method like .. . .. . Actually the problem lies in the declaration A extends Comparable A which should be A extends Comparable super A however fixing it here wouldn t help as this pattern is spread throughout the API and allowing such a return-type here would just raise errors at the next API usage . But since as far as I understood Attribute only produces A s but doesn t consume them we can relax the signature here and accept an Attribute extends A following the PECS http : stackoverflow.com q 2723397 2711488 pattern . With this helper your code should compile smoothly : Comment : Thanks for a reminder about supression of compiler types restriction -- it saved a lot of memory to me . Comment : Nice answer . I m the author of CQEngine I created issue 45 https : github.com npgall cqengine issues 45 to see if I can improve the API based on this answer in future .", "Question : I have a table from which I extract 8 columns said columns will be properties of a pojo say MyPojo . I want to remove duplicates . I came up with two strategies . 1-Let oracle take care of this with distinct keyword .. . .. . 2-Do this in java with cqengine https : code.google.com p cqengine wiki DeduplicationStrategies Logical Elimination Strategy : .. . .. . 3-Do this in java with a set .. . .. . From a performance point of view which one is better Comment : The one which runs faster on your machine for your dataset . The best way to find that out is to test it . .. . Answer : Let the database do the work . In this case you don t send unnecessary data over the network which will - probably - have the biggest positive impact on performance . Also it is the most compact solution in terms of code-size ." ] }
[ "yes-answer-long", "yes-answer-short" ]
java
UNK_RELATION
grafika@graphics@95
grafika -- grafika is an open-source sdk app which provides a collection of hacks for testing @placeholder features .
{ "confidence": [ 48.902950286865234, 42.82872772216797, 37.651615142822266, 37.24980163574219, 34.415855407714844, 34.415855407714844, 34.28871154785156, 34.28871154785156, 32.74378967285156, 30.157970428466797, 30.157970428466797, 29.709875106811523, 27.552051544189453, 17.09406852722168, 15.931829452514648, 14.6859769821167, 14.484955787658691, 13.784700393676758, 13.14105224609375, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.759162902832031, 12.581954956054688, 12.581954956054688, 12.572542190551758, 12.239774703979492, 12.239774703979492, 11.856521606445312, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 11.47014331817627, 9.92521858215332, 9.92521858215332, 9.92521858215332, 9.92521858215332, 9.92521858215332, 9.92521858215332, 9.92521858215332 ], "content": [ "I am using Google s Open Source Example : Grafika https : github.com google grafika .", "I managed to write a video recording demo which is similar to ContinuousCaptureActivity of grafika Source code of ContinuousCaptureActivity.java https : github.com google grafika blob master src com android grafika ContinuousCaptureActivity.java .", "By following Grafika s MoviePlayer https : github.com google grafika blob master src com android grafika MoviePlayer.java I ve managed to implement the forward seeking .", "I launch the grafika a dialog turned out and said Failed to generate cotent .", "The difference is that grafika used hardware encoding but I used software encoding .", "I am taking help from the Grafika android demo code", "This is related code snippet based on google grafika https : github.com google grafika s MoviePlayer : .. . .. . As you can imagine usually I m queuing large amount of frames but for now I m fine with memory consumption or eventual lag .", "I am using it s ContinuousCaptureActivity.java https : github.com google grafika blob master src com android grafika ContinuousCaptureActivity.java The CircularBuffer s Implementation is demonstrated in this Activity but there is no audio included in the resultant Video file .", "Regurgitating a bit from the Grafika issue tracker https : github.com google grafika issues 46 : .. . .. . The bouncing ball is software-rendered so anything that soaks up CPU time is going to make it slow down .", "I am currently using the TextureFromCameraActivity from Grafika to record a video in square 1 : 1 resolution .", "I just run Grafika sample application Show + capture camera on Samsung Note4 .", "Some features may be unavailable .", "android.permission.WRITE EXTERNAL STORAGE android.permission.CAMERA android.permission.RECORD VIDEO android.permission.RECORD AUDIO android.permission.STORAGE android.permission.READ EXTERNAL STORAGE .. . .. . Here the modified code : .. . .. . https : github.com google grafika .. . .. . Thanks for your help : D", "It s failing to open a hardware codec so it s opening a software one instead .", "Can t use input surface with software codec : OMX.google.h264.encoder .. . .. . Then I click OK button and entered the continuous caputure activity the app crashed .", "For achieving this i have explored the MediaCodec Library which was introduced in 4.3+ versions .", "After a struggle I finally found out the exact reason it is the API Camera.Parameters.setRecordingHint true .. . .. . When I removed this clause in my source code the field of preview became normal .", "The problem is that the dequeueInputBuffer method works only for some time in the loop eventualy stucks at returning -1 which accordingly to documentation means that the buffer is unavailiable .", "FWIW prefer System.nanoTime as it uses the monotonic clock which is not subject to resets .", "My device infomation is as follows : .. . .. . I am sure this is the key log : .. . .. . How to fix this issue", "The software codec implementation in 4.3 wasn t compatible with Surface input so it fails to generate the videos .", "One way this can happen is if something else on the device has opened the hardware video-codecs and didn t release them when paused .", "@fadden I did not run anything else .", "I am sure that nothing has opened the hardware video-codecs .", "@fadden According to this stackoverflow.com questions 30505875 http : stackoverflow.com questions 30505875 how-to-use-software-codec-in-android-using-mediacodec OMX.google.h264.encoder is a software encoder is it a software encoder on any android devices", "I believe OMX.google.h264.encoder is always the software implementation .", "Later versions of Android have improved implementations .", "I don t know why mediacodec would be picking that if a hardware codec is available .", "Several of the Activities rely on Surface input to a video encoder so I d expect them to fail in similar ways .", "@fadden I use MediaCodecList to enumerate all avc encoders on the device and find this codec OMX.qcom.video.encoder.avc So I use MediaCodec.createByCodecName OMX.qcom.video.encoder.avc to get this encoder but this encoder turn out a decoder from logcat .", "The key difference is the time spent in postFrameBuffer which is around 16ms for good and around 30ms for bad .", "The problem was with debugfs permission which prevented the other processes to get logged in systrace dump", "It s primarily meant for SurfaceTexture where producer and consumer are in the same app potentially on the same thread so having the producer stall waiting for the consumer could cause the program to hang .", "It eventually wakes up and the CPU row suggests it was waiting on activity from a galcore daemon which I m not familiar with seems particular to Vivante GPU .", "For software encoding I get every video frame from GPU with PBO which is very fast and copy the image data to ffmpeg then do the h264 encoding .", "The video gets stuck and lags a lot when we start playing with Notification bar .. . .. . Can anyone explain what has change from Kitkat to Lollipop which can cause this issue VSync Triple Buffering", "I m trying to implement precise seeking for video using MediaCodec and MediaExtractor .", "However I m still having problem with backward seeking .", "The relevant bit of code is here : .. . .. . Basically it s the same as MoviePlayer s doExtract method .", "I just add a slight modification to seek back to the previous keyframe than decode forward to the position I want .", "I ve also follow fadden s suggestion here http : stackoverflow.com a 31322473 1602807 with little success .", "Another side question to my understanding ExoPlayer is built upon MediaCodec then how come it can play videos recorded by iOS just fine while MoviePlayer s pure implementation of MediaCodec can t", "Ok so this is how I solve my problem basically I misunderstood fadden s comment on the render flag .", "The problem is not with the decoding but instead only displaying the last buffer that is closest to the seeking position .", "Here is how I do it : .. . .. . This is quite a hackish way to go about this .", "The elegant way should be saving the last output buffer and display it outside the while-loop but I don t really know how to access the output buffer so that I can save it to a temporary one .", "EDIT : .. . .. . This is a bit less hackish way to do this .", "Basically we only need to calculate the total frames in between the keyframe and the seeking position and then we just need to display 1 or 2 frames closest to the seeking position .", "Something like this :", "We know that we will get a lager field of preview at the same distance when camera preview ratio set to 4 : 3 instead of 16 : 9 the detail is as follows : .. . .. . Android Camera API - Weird zoom effect http : stackoverflow.com questions 20664628 android-camera-api-weird-zoom-effect .. . .. . But I encountered a problem when I worked with android-camera preview with opengl that is the second way mentioned below .", "There are 2 ways of implementing camera preview : .. . .. . 1 .", "Traditional way without opengl just use Camera.setPreviewTexture SurfaceTexture texture or Camera.setPreviewDisplay SurfaceHolder holder .. . 2 .", "The way of ContinuousCaptureActivity using opengl we render the preview image with API swapBuffers .", "The first way is OK I will find that preview field become larger if preview ratio changed from 16 : 9 to 4 : 3 .", "However The second way is not OK in some android phones the preview field stay the same when preview ratio changed and the preview field is smaller than the first way at the ratio 4 : 3 .", "I insist that this is an error I want to resolve this problem very much Who can give me some advices", "@fadden Dear please take a look at this I expect your comments .", "No there can be no guarantee that the FOV of wide picture will be a crop of 4 : 3 picture even if this is common behavior on many devices .", "This is handled by HAL so Camera2 API may be different from Camera API on the same device .", "Continuous capture is just calling setPreviewTexture as in 1 .", "The method of rendering the preview shouldn t have any effect on the output from the camera -- Camera is just sending each frame to a Surface .", "Whether the Surface is attached to a SurfaceView or SurfaceTexture doesn t matter .", "It ll look different if the Surface is displayed differently i.e .", "the aspect-ratio is off or the layout puts the Surface partly off-screen but the resolution and aspect-ratio are chosen by Camera and shouldn t be affected by how the Surface is used .", "@fadden But 2 works OK on some devices such as nexus 6 this is true .", "So I assume there may be some other reasons .", "@fadden Take a look at the answer I have found the reason", "In one word the API Camera.Parameters.setRecordingHint true is a bug in some android devices .", ".. . .. . For some devices if preview ratio is set to 4 : 3 use API Camera.Parameters.setPreviewSize int int calling API setRecordingHint true will cause the field of camera preview to be smaller .", "Please clarify .", "Does setRecordingHint cause the frame size to change", "Or the the aspect-ratio to change", "Or zoom", "@AlexCohn For some devices if preview ratio set to 4 : 3 calling API setRecordingHint true will cause the field of camera preview to become smaller .", "Thanks nice to know .", "But seriously this is not a bug by any definition I can imagine .", "There is no requirement that camera focus distance be constant when changing the parameters : setRecordingHint autoFocus scene or other .", "I m struggling with precise seeking using MediaExtractor s seekTo .", "While I can seek to sync frames without problems I would like to seek to specific time .", "This http : stackoverflow.com questions 21103347 problems-with-mediaextractor question led me to some ideas how to do this but I m not sure if they are valid .", "Basicly I would have to seek to closest previous sync frame and then advance the extractor until target time is reached .", "Every frame in the process would be fed to the decoder i.e the first I-frame and the rest P-frames .", "If I would change the TIMEOUT USEC to -1 I get infinite-loop .", "Can someone please tell me if this approach is correct or why at some point I can t get access to inputBuffer", "You don t appear to be pulling buffers from the output side .", "The MediaCodec decoder doesn t drop frames so when its internal buffers fill up it will stop handing you input buffers .", "You need to drain the decoder by requesting output buffers .", "When you release the buffer set the render flag to false so it doesn t appear on screen .", "I want to add the Audio Recording functionality within this Activity and add the recorded Audio into the Video in the same CircularBuffered Fashion .", "I have also used MediaMuxer to capture Video and Audio Streams and Muxed them into a single Video .", "But I am not sure about how to implement the Audio Recording functionality into the ContinuousCaptureActivity.java class .", "Any Help is highly appreciated .", "Any luck with that", "I am using MediaCodec to play 1080p@60fps video .", "This is on freescale SabreSD platform with Android Lollipop 5.1 .", "Initially because of BufferQueue Synchronous Mode the FPS was way below 60.I could now manage to play at 70FPS by changing the BufferQueue to Asynchronous as in JB .", "Now the next challenge I am facing is the video lags and FPS drops drastically to 40 when I start interacting with the screen pulling down notification bar pressing volume button etc .", "So I ran rafika MultiSurfaceActivity and Record GL I can see all the test play smoothly when no screen is touched or disturbed but as soon as I start scrolling the notification bar from top and continue that for long time the fps gets reduced to 35-40FPS .", "I have confirmed the same test on Kitkat 4.4.2 and JB 4.2.2 and they seems to work fine .", "Same behaviour when playing MP4 from Gallery ." ] }
{ "confidence": [ 52.81915283203125, 43.28323745727539, 39.67082595825195, 39.182952880859375, 35.76459884643555, 35.049644470214844, 34.39835739135742, 29.83010482788086, 22.918109893798828, 13.220695495605469 ], "content": [ "Question : null .. . Answer : I am using Google s Open Source Example : Grafika https : github.com google grafika . I am using it s ContinuousCaptureActivity.java https : github.com google grafika blob master src com android grafika ContinuousCaptureActivity.java The CircularBuffer s Implementation is demonstrated in this Activity but there is no audio included in the resultant Video file . I want to add the Audio Recording functionality within this Activity and add the recorded Audio into the Video in the same CircularBuffered Fashion . For achieving this i have explored the MediaCodec Library which was introduced in 4.3+ versions . I have also used MediaMuxer to capture Video and Audio Streams and Muxed them into a single Video . But I am not sure about how to implement the Audio Recording functionality into the ContinuousCaptureActivity.java class . Any Help is highly appreciated . Comment : Any luck with that", "Question : null .. . Answer : I managed to write a video recording demo which is similar to ContinuousCaptureActivity of grafika Source code of ContinuousCaptureActivity.java https : github.com google grafika blob master src com android grafika ContinuousCaptureActivity.java . The difference is that grafika used hardware encoding but I used software encoding . For software encoding I get every video frame from GPU with PBO which is very fast and copy the image data to ffmpeg then do the h264 encoding . The performance is acceptable for most devices glMapBufferRange took less than 5ms and memcpy took less than 10ms . But the performance is low on the phone of huawei mate7 . glMapBufferRange took 15 30ms memcpy took between 25 35ms . .. . .. . I have tested normal memcpy on mate7 it s much faster when copy normal memory . It is really strange who can give me some help Device info : .. . .. . See detail here : huawei mate 7 http : www.gsmarena.com huawei ascend mate7-6543.php .. . .. . The pbo code is as follows : Comment : If you have a rooted-device you can use systrace with tags like --freq to monitor the clock frequencies on CPU and memory and see if the device is slowing down due to perceived inactivity or thermal throttling . Is the memcpy speed unique to the GLES buffer memory or is it that slow just copying memory around in general Is it any faster if you drag your finger across the screen constantly while the test runs FWIW prefer System.nanoTime as it uses the monotonic clock which is not subject to resets . Comment : I have tested normal memcpy it s much faster . And I am sure the performance is low all the time on that phone . Thanks", "Question : null .. . Answer : I launch the grafika a dialog turned out and said Failed to generate cotent . Some features may be unavailable . Can t use input surface with software codec : OMX.google.h264.encoder .. . .. . Then I click OK button and entered the continuous caputure activity the app crashed . My device infomation is as follows : .. . .. . I am sure this is the key log : .. . .. . How to fix this issue Comment : It s failing to open a hardware codec so it s opening a software one instead . The software codec implementation in 4.3 wasn t compatible with Surface input so it fails to generate the videos . One way this can happen is if something else on the device has opened the hardware video-codecs and didn t release them when paused . Comment : @fadden I did not run anything else . I am sure that nothing has opened the hardware video-codecs . Comment : @fadden According to this stackoverflow.com questions 30505875 http : stackoverflow.com questions 30505875 how-to-use-software-codec-in-android-using-mediacodec OMX.google.h264.encoder is a software encoder is it a software encoder on any android devices Comment : I believe OMX.google.h264.encoder is always the software implementation . Later versions of Android have improved implementations . I don t know why mediacodec would be picking that if a hardware codec is available . Several of the Activities rely on Surface input to a video encoder so I d expect them to fail in similar ways . Comment : @fadden I use MediaCodecList to enumerate all avc encoders on the device and find this codec OMX.qcom.video.encoder.avc So I use MediaCodec.createByCodecName OMX.qcom.video.encoder.avc to get this encoder but this encoder turn out a decoder from logcat .", "Question : null .. . Answer : I am currently using the TextureFromCameraActivity from Grafika to record a video in square 1 : 1 resolution . Therefor I the GLES20.glViewport so that the video gets moved to the top and it appears to be squared . Now I would like to record this square view using the MediaRecorder or at least record the camera with normal resolutiona and then crop it using FFmpeg . However I get the same error over and over again and I cant figure out why . The error I get : .. . .. . start called in an invalid state : 4 .. . .. . And yes I added all the necessary permissions . android.permission.WRITE EXTERNAL STORAGE android.permission.CAMERA android.permission.RECORD VIDEO android.permission.RECORD AUDIO android.permission.STORAGE android.permission.READ EXTERNAL STORAGE .. . .. . Here the modified code : .. . .. . https : github.com google grafika .. . .. . Thanks for your help : D", "Question : I m struggling with precise seeking using MediaExtractor s seekTo . While I can seek to sync frames without problems I would like to seek to specific time . This http : stackoverflow.com questions 21103347 problems-with-mediaextractor question led me to some ideas how to do this but I m not sure if they are valid . Basicly I would have to seek to closest previous sync frame and then advance the extractor until target time is reached . Every frame in the process would be fed to the decoder i.e the first I-frame and the rest P-frames . This is related code snippet based on google grafika https : github.com google grafika s MoviePlayer : .. . .. . As you can imagine usually I m queuing large amount of frames but for now I m fine with memory consumption or eventual lag . The problem is that the dequeueInputBuffer method works only for some time in the loop eventualy stucks at returning -1 which accordingly to documentation means that the buffer is unavailiable . If I would change the TIMEOUT USEC to -1 I get infinite-loop . Can someone please tell me if this approach is correct or why at some point I can t get access to inputBuffer .. . Answer : You don t appear to be pulling buffers from the output side . The MediaCodec decoder doesn t drop frames so when its internal buffers fill up it will stop handing you input buffers . You need to drain the decoder by requesting output buffers . When you release the buffer set the render flag to false so it doesn t appear on screen .", "Question : I m trying to implement precise seeking for video using MediaCodec and MediaExtractor . By following Grafika s MoviePlayer https : github.com google grafika blob master src com android grafika MoviePlayer.java I ve managed to implement the forward seeking . However I m still having problem with backward seeking . The relevant bit of code is here : .. . .. . Basically it s the same as MoviePlayer s doExtract method . I just add a slight modification to seek back to the previous keyframe than decode forward to the position I want . I ve also follow fadden s suggestion here http : stackoverflow.com a 31322473 1602807 with little success . Another side question to my understanding ExoPlayer is built upon MediaCodec then how come it can play videos recorded by iOS just fine while MoviePlayer s pure implementation of MediaCodec can t .. . Answer : Ok so this is how I solve my problem basically I misunderstood fadden s comment on the render flag . The problem is not with the decoding but instead only displaying the last buffer that is closest to the seeking position . Here is how I do it : .. . .. . This is quite a hackish way to go about this . The elegant way should be saving the last output buffer and display it outside the while-loop but I don t really know how to access the output buffer so that I can save it to a temporary one . EDIT : .. . .. . This is a bit less hackish way to do this . Basically we only need to calculate the total frames in between the keyframe and the seeking position and then we just need to display 1 or 2 frames closest to the seeking position . Something like this :", "Question : null .. . Answer : I ve got the same issue with this post : Android MediaCodec SIGSEGV error when Encoding from Surface http : stackoverflow.com questions 33103946 android-mediacodec-sigsegv-error-when-encoding-from-surface 38785892 noredirect 1 comment64942096 38785892 .. . .. . But not found the solution . Sorry for post again because I have not earn enough reputation to comment . I just run Grafika sample application Show + capture camera on Samsung Note4 . It will crash after a while maybe 2-3 minutes . I also tried to change attribList as Endre B rcs k mentioned but not work . Hope someone can help . My stack-trace show below :", "Question : I am trying to record the video using GLSurfaceView and audio from the AudioRecord . In MediaMuxer I am sending both audio and video data when onFrameAvailable called . I set the camera preview size of 1280 720 and preview on the full screen . I am having problem to crop the frame to 600 600 . Can anybody help me to crop the video frame before encoding to MediaCodec and MediaMuxer . I am taking help from the Grafika android demo code .. . Answer : You need to solve to problems : .. . .. . 1 . Record video with 600 600 : Use video codec with specified width height . This is easy to do but it could be that not all phones have hardware codecs that will supports you custom resolution . 2 . Scale video in the way it will look not stretched because you have changed w h ratio . Use view matrix passed to OpenGL shader with needed scale . Comment : Can you please elloborate the second point . Give an example for the Use view matrix passed to OpenGL shader", "Question : I am using MediaCodec to play 1080p@60fps video . This is on freescale SabreSD platform with Android Lollipop 5.1 . Initially because of BufferQueue Synchronous Mode the FPS was way below 60.I could now manage to play at 70FPS by changing the BufferQueue to Asynchronous as in JB . Now the next challenge I am facing is the video lags and FPS drops drastically to 40 when I start interacting with the screen pulling down notification bar pressing volume button etc . So I ran rafika MultiSurfaceActivity and Record GL I can see all the test play smoothly when no screen is touched or disturbed but as soon as I start scrolling the notification bar from top and continue that for long time the fps gets reduced to 35-40FPS . I have confirmed the same test on Kitkat 4.4.2 and JB 4.2.2 and they seems to work fine . Same behaviour when playing MP4 from Gallery . The video gets stuck and lags a lot when we start playing with Notification bar .. . .. . Can anyone explain what has change from Kitkat to Lollipop which can cause this issue VSync Triple Buffering . .. . Answer : Regurgitating a bit from the Grafika issue tracker https : github.com google grafika issues 46 : .. . .. . The bouncing ball is software-rendered so anything that soaks up CPU time is going to make it slow down . On devices with medium-grade CPUs and big displays e.g . Nexus 10 it never gets close to 60fps . So a slowdown while you are playing with the nav bar doesn t surprise me but if it continues to be slow even after you stop playing with the nav bar then that s a little weird . Video playback should be less affected as that does less with the CPU . Investigation into such problems usually begins by using systrace http : developer.android.com tools debugging systrace.html to capture traces in good and bad states and comparing the two . The key point of BufferQueue async mode is to allow frames to drop if the consumer can t keep up with the producer . It s primarily meant for SurfaceTexture where producer and consumer are in the same app potentially on the same thread so having the producer stall waiting for the consumer could cause the program to hang . I m not sure what you mean by needing it to exceed 60fps but I would guess you re throwing frames at the display faster than it can render them.. . so you re not really increasing the frame-rate you re just using the BufferQueue to drop the frames instead of using Choreographer to decide when you need to drop them yourself . In any event I left Google back in June 2014 well before Lollipop was completed . If something works correctly on KitKat but weirdly on Lollipop I m afraid I can t provide much insight . If you can reproduce the behavior easily it might be worth capturing a video that demonstrates the problem point a second smart phone at the device exhibiting the problem so they can see how you manipulate the device and filing a bug on http : b.android.com . .. . .. . Some traces uploaded by the OP : .. . .. . https : www.dropbox.com s luwovq7ohozccdy Lollipop bad.zip .. . https : www.dropbox.com s zkv0aqw0shecpw2 lollipop good.zip .. . https : www.dropbox.com s g7qe01xvmfyvpak kitkat.zip .. . .. . Looking at the kitkat trace something weird is going on in SurfaceFlinger . The main thread is sitting in postFrameBuffer for a very long time 23-32ms . It eventually wakes up and the CPU row suggests it was waiting on activity from a galcore daemon which I m not familiar with seems particular to Vivante GPU . The lollipop traces only show the CPU rows as-if the capture were done without the necessary tags . I don t believe the systrace capture command changed significantly between kitkat and lollipop so I m puzzled as to why the user-space-initiated logging would vanish but the kernel thread scheduling stuff would remain . Make sure you have sched gfx view specified . .. . .. . The newer lollipop traces only have about a second of good data . When you see Did Not Finish it means a start record had no matching end record . You can increase the systrace logging buffer size with the -b flag . I think there s enough there though . Looking at the system bin surfaceflinger row you can see that in the good trace postFrameBuffer usually finishes in about 16ms but it s still waiting on galcore . Zoom in on 388ms use WASD keys . At 388.196ms on the CPU 2 row you can see galcore do something . Right after it completes the thin line at the top of the surfaceflinger row changes from light grey sleeping to green running . At 388.548ms again on CPU 2 galcore runs again and right after that on the surfaceflinger row you see queueBuffer start to execute . The bad trace looks identical . For example you can see two galcore executions at 101.146ms and 101.666ms with what appear to be similar effects on the surfaceflinger row . The key difference is the time spent in postFrameBuffer which is around 16ms for good and around 30ms for bad . So this doesn t appear to be a behavioral shift rather things are taking longer and deadlines are being missed . As far as I can tell SurfaceFlinger is being held up by galcore daemon . This is true in both good and bad cases . To see what the timing should look like you can run systrace on a Nexus device or compare to traces from other devices e.g . the one in this case study http : www.curious-creature.com docs android-performance-case-study-1.html or this SO question http : stackoverflow.com questions 18704702 . If you zoom in you can see doComposition executing in a few milliseconds and postFrameBuffer finishing in a few tenths of a millisecond . Summing up : you don t have good and bad you have bad and worse . : - I don t know what galcore is but you ll likely need to have a conversation with the GPU OEM . Comment : Yes I used all the above tags while capturing in kitkat and lollipop and I followed community.freescale.com thread 380812 https : community.freescale.com thread 380812 to enable all the tracing in kernel but missed CONFIG SCHED TRACER I will enable that and let you know if the systrace output changes Comment : If it were a kernel config issue I d expect sched to be missing and all the user-space stuff to be there . Your trace is the other way around like the ftrace code is working but ignoring the user-space stuff . Comment : Hi @fadden Updated systrace dumps are dropbox.com s hnebmkkghp534iy lp bad.zip dl 0 https : www.dropbox.com s hnebmkkghp534iy lp bad.zip dl 0 and dropbox.com s zr3dwibj4yb89h7 lp good.zip dl 0 https : www.dropbox.com s zr3dwibj4yb89h7 lp good.zip dl 0 . The problem was with debugfs permission which prevented the other processes to get logged in systrace dump Comment : Answer updated . Comment : Yes I see galcore daemon is taking more time compared to the kitkat 4.4.2 version on same hardware . Galcore is Vivanta s GPU Module I will pursue this with freescale team and update you asap . Thanks for you quick response really appreciate your help :", "Question : We know that we will get a lager field of preview at the same distance when camera preview ratio set to 4 : 3 instead of 16 : 9 the detail is as follows : .. . .. . Android Camera API - Weird zoom effect http : stackoverflow.com questions 20664628 android-camera-api-weird-zoom-effect .. . .. . But I encountered a problem when I worked with android-camera preview with opengl that is the second way mentioned below . There are 2 ways of implementing camera preview : .. . .. . 1 . Traditional way without opengl just use Camera.setPreviewTexture SurfaceTexture texture or Camera.setPreviewDisplay SurfaceHolder holder .. . 2 . The way of ContinuousCaptureActivity using opengl we render the preview image with API swapBuffers . The first way is OK I will find that preview field become larger if preview ratio changed from 16 : 9 to 4 : 3 . However The second way is not OK in some android phones the preview field stay the same when preview ratio changed and the preview field is smaller than the first way at the ratio 4 : 3 . I insist that this is an error I want to resolve this problem very much Who can give me some advices Comment : @fadden Dear please take a look at this I expect your comments . Comment : No there can be no guarantee that the FOV of wide picture will be a crop of 4 : 3 picture even if this is common behavior on many devices . This is handled by HAL so Camera2 API may be different from Camera API on the same device . Comment : Continuous capture is just calling setPreviewTexture as in 1 . The method of rendering the preview shouldn t have any effect on the output from the camera -- Camera is just sending each frame to a Surface . Whether the Surface is attached to a SurfaceView or SurfaceTexture doesn t matter . It ll look different if the Surface is displayed differently i.e . the aspect-ratio is off or the layout puts the Surface partly off-screen but the resolution and aspect-ratio are chosen by Camera and shouldn t be affected by how the Surface is used . Comment : @fadden But 2 works OK on some devices such as nexus 6 this is true . So I assume there may be some other reasons . Comment : @fadden Take a look at the answer I have found the reason .. . Answer : After a struggle I finally found out the exact reason it is the API Camera.Parameters.setRecordingHint true .. . .. . When I removed this clause in my source code the field of preview became normal . In one word the API Camera.Parameters.setRecordingHint true is a bug in some android devices . .. . .. . For some devices if preview ratio is set to 4 : 3 use API Camera.Parameters.setPreviewSize int int calling API setRecordingHint true will cause the field of camera preview to be smaller . Comment : Please clarify . Does setRecordingHint cause the frame size to change Or the the aspect-ratio to change Or zoom Comment : @AlexCohn For some devices if preview ratio set to 4 : 3 calling API setRecordingHint true will cause the field of camera preview to become smaller . Comment : Thanks nice to know . But seriously this is not a bug by any definition I can imagine . There is no requirement that camera focus distance be constant when changing the parameters : setRecordingHint autoFocus scene or other ." ] }
[ "yes-answer-long", "yes-answer-short" ]
graphics
UNK_RELATION
excel-2002@spreadsheet@81
excel-2002 -- the excel-2002 tag is used for referencing the excel version 2002 @placeholder application from microsoft .
{ "confidence": [ 83.57345581054688, 74.95873260498047, 74.95873260498047, 71.89143371582031, 71.30548095703125, 64.61676025390625, 63.00507354736328, 61.8038330078125, 61.691829681396484, 59.26032638549805, 59.26032638549805, 59.26032638549805, 57.59864807128906, 45.3365364074707, 44.398075103759766, 43.834083557128906, 43.834083557128906, 43.834083557128906, 43.367835998535156, 42.41776657104492, 40.86187744140625, 39.912994384765625, 38.251312255859375, 36.25974655151367, 36.25974655151367, 35.568878173828125, 35.568878173828125, 35.134891510009766, 33.61732864379883, 33.61732864379883, 33.52428436279297, 31.241107940673828, 29.964080810546875, 29.964080810546875, 28.929134368896484, 28.929134368896484, 27.816246032714844, 24.347515106201172, 23.066755294799805, 20.851730346679688, 20.79315757751465, 19.77096176147461, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.952651977539062, 18.87938117980957, 16.553770065307617, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766, 16.447879791259766 ], "content": [ "Is this possible with Excel 2002", "So is it possible at all to use ADO.net in Excel 2002", "I am working with EXCEL 2002 in Windows 7 .", "Good afternoon .. . .. . I created an Excel .xla addin for Excel 2002 .", "Excel 2007 counts shapes differently to 2002 .", "Using Excel 2002 and have a VBA app that has some UserForms .", "This line works well in Excel 2007 but gives a Object doesn t support this property or method . error in Excel 2002 .", "What is the easiest way to call a web service from Excel I am using version 2002", "I want to extract special data from an Excel 2002 client requirement cannot change workbook and worksheets contained therein .", "What are my alternatives to Make Excel 2002 use the 2.0 runtime instead of 1.1", "I was assuming the Excel 2002 API would expose something like this : .. . .. . or something similar .", "I have some stability issue with using ADO and latest sybase driver in Excel 2002 .", "I am using excel-2002 i want to be able to move the marker on a line chart so that it changes the data .", "Are they in Excel VBA", "activecell.offset will help to navigate cells in excel... .", "What is the difference between working with shapes in 2002 vs 2007", "The shape I was trying to reference in 2007 2 was now 1 in 2002 .", "The problem you are facing is that the ListCount property is read only in 2002 .", "RANDOM is not a function in Excel .", "I want to create a log file in excel .", "cpearson.com excel rounding.htm http : www.cpearson.com excel rounding.htm", "Such a comparison behaves as expected for VBA in Excel 2007 .", "I have a shared and protected worsheet in excel 2012 .", "My Add-in is set to open when Excel opens .", "However if I open Excel and then the spreadsheet it works fine .", "http : www.excelbanter.com showthread.php t 138369 .. . .. . Excel built-in help is no help .", "Try the edit if not i ll get to a machine with full excel and try some examples", "You can find all the 2002 help files here http : www.microsoft.com downloads details.aspx FamilyID 34B793A2-934E-44E5-8C4A-5E06F683FF63 displaylang EN .", "One solution is to put an EXCEL.EXE.config file next to excel that looks like this : .. . .. . However I do not have admninistrative priviledges on the machine .", "See stackoverflow.com questions 4630412 http : stackoverflow.com questions 4630412 question-mark-in-spreadsheet-causes-problems-in-excel-vba", "Good morning .. . .. . I have a .Net 2.0 runtime DLL that I am trying to load from Excel it s correct regasm d .", "I have a pivot-table in Excel and the sum of the items should equal zero .", "If I double-click on an .XLS that references the add-in Excel fails to load the VBA project and I get NAME .", "Is there some means within Excel VBA to track all the events that fire and their sequence without writing code in every event procedure", "See http : office.microsoft.com en-us excel-help vlookup-HP005209335.aspx : .. . .. . If range lookup is FALSE and lookup value is text then you can use the wildcard characters question mark", "I can open and close Excel files without problems but when I want to quit the program by clicking x in the top-right corner or by menu File- Exit nothing happens .", "In excel-2007 I have used : .. . .. . If Chart2.Shapes 2 .ControlFormat.ListCount 16 Then .. . .. . To check the size of the list so that it doesnt get entered in again resulting in an extremely long list that repeats itself .", "For a fix you basically have to install the KB908002 http : support.microsoft.com kb 908002 update from Microsoft .", "Or you could look at the Microsoft Help to see if it is a known fault .", "The only way to end the program is by going to the Task manager and killing the application .", "Have you tried https : support.microsoft.com en-us kb 923505 There is some compability issues between office xp and windows-7 which you can see by the discussion going on here http : answers.microsoft.com en-us windows forum windows 7-windows programs is-office-xp-compatible-with-windows-7 abbe2f98-569e-4123-b0c7-2eb785f13315 .. . .. . one person acctually has the same problem as you and can only close it by closing excel by the task manager .. . .. . Also you can try to run the program in compability mode for win xp ny right-clicking on the excel.exe file or your shortcut and take properties and then go the tab compability and choose Run this program in compability mode for And choose windows-xp Service Pack 3 .. . .. . I had similar problems when I turned to windows-7 and these steps solved most of them .", "FOX123+- as you would expect from a symetrical substitution .", "I have created a macro that will insert in-time into active cell on ButtonInTime click .", "Similarly out time in the active cell on ButtonOutTime click.. . .. . .. . Now i want to insert todays date on ButtonInTime click in previous cell of active cell .. . .. . and calculate Total Log hours insert it into next active cell of OutTime .", "How i can achive this", "Can any one help me out", "I tried to find out the solution but didnt get the proper one.. .", "Thanks in advance... .", "i found the solution", "I achieved it. .", "There are some hard codes in this... .", "Please see stackoverflow.com help accepted-answer http : stackoverflow.com help accepted-answer", "It is possible if you wrap up your logic into COM object and reference it from the VBA code .", "well what I need is to sort by colomn D4 and the users wont have permission to write anything outside the table that is from B4 to K38.please help me", "I ve verified with the Fusion Log Viewer that it is trying to load with the 1.1 runtime instead o 2.0 which explains why it s failing .", "Regards Alan .", "The behavior you encounter is a bug in both Office XP and 2003 .", "See my answers to the following questions : .. . .. . http : stackoverflow.com questions 553794 can-a-net-word-2003-add-in-be-installed-outside-of-the-gac 553839 .. . http : stackoverflow.com questions 436958 -net-app-config-question", "Thanks a lot for this .", "I m getting some generic Office install warning message but soon enough I m hoping to give the patch a try .", "Voted you up in the meantime but will not forget to check the accepted answer icon if it works .", ":", "An alternative solution is to rename remove this registry entry : Reference http : social.msdn.microsoft.com Forums en-US vsto thread 2ca664bc-c280-492c-b240-ae06f776803d", "Note that with .NET framework 4.0 you ll need to find the registry key for V4.0 as well .", "I have classified ranges in this special data category .", "I would like to acquire a list of all ranges in ideally all worksheets in a workbook .", "The attributes I m interested in are the range name and the range address .", "I have been googling for a while now and have not found anything relevant .", "However I am sadly mistaken .", "If you are looking for all the ranges that are Named you should look at the Workbook.Names collection .", "Each Name in the Names collection has a RefersTo property that gives the Formula or Range Reference that is referenced by the Name .", "But be aware that a Name can be a Formula rather than a Range Reference .. . Dim oNM as Name .. . .. . for each oNM in ActiveWorkbook.Names .. . debug.print oNM.Refersto .. . next oNM", "thanks charles", "I am trying to use a formula to get a letter of the alphabet .", "Formula : .. . .. . Function : .. . .. . Result : .. . .. . When I step through the function it never gets to the second stop .", "What is wrong", "I would think it is the Stop word on the 3rd line.. .", "Is this code trying to return a random letter of the alphabet", "Yeah.......... .", "RAND is and it returns a float between 0 and 1 .", "You need an integer to do modulus calculations .", "To get a random integer use : .. . .. . Then once seed Mod 27 - i becomes 0 or less the function dies because arrays can t be indexed with 0 or less in VBA or most languages .", ".. . .. . But really all you need to do for a random letter is this :", "Excellent thanks", "It should be noted that you need the Analysis Toolpak for that RandBetween .", "+1 : nice RANDBETWEEN formula for random letter.. .", "This code will return random letter of alphabet :", "What is the 26 - 1 + 1 all about", "The general formula for a random number between two numbers is : Int High - Low + 1 Rnd + Low .", "We want a random number bewteen 1 and 26 for the alphabet so just plug into the equation .", "NB - the Int is there to make sure number is a whole number .", "If I type in this formula : .. . .. . With A1 set to", "without the quotes and LetterTable contains this : .. . .. . It always gives me a no quotes .", "Why is this", "Also if I copy that into an array in vba and loop through it comparing it to the spreadsheet value it won t find it either .", "why the close votes", "Not a programming question .", "Should be moved to superuser .", "and asterisk in lookup value .", "A question mark matches any single character an asterisk matches any sequence of characters ." ] }
{ "confidence": [ 78.46279907226562, 76.66168975830078, 75.68357849121094, 73.76435089111328, 67.2198486328125, 66.2218017578125, 65.99108123779297, 62.7274055480957, 61.002071380615234, 56.491676330566406, 45.54911422729492, 40.36981964111328, 37.45974349975586, 35.124874114990234, 34.933311462402344, 33.590003967285156, 32.855445861816406, 31.868040084838867, 16.38825035095215, 14.05962085723877 ], "content": [ "Question : I have just tried to send a workbook to a friend that has a chart with a drop-down box on it . In excel-2007 I have used : .. . .. . If Chart2.Shapes 2 .ControlFormat.ListCount 16 Then .. . .. . To check the size of the list so that it doesnt get entered in again resulting in an extremely long list that repeats itself . This line works well in Excel 2007 but gives a Object doesn t support this property or method . error in Excel 2002 . What is the difference between working with shapes in 2002 vs 2007 .. . Answer : Ok it ended up being something simple that took me ages to pick up on . Excel 2007 counts shapes differently to 2002 . The shape I was trying to reference in 2007 2 was now 1 in 2002 . So the final result was of course .. . .. . If Chart2.Shapes 1 .ControlFormat.ListCount 16 Then Comment : btw what does checking if listcount 16 do Sorry if this is a bit of noob question .", "Question : I have some stability issue with using ADO and latest sybase driver in Excel 2002 . I just want to find out if there is any alternative . So is it possible at all to use ADO.net in Excel 2002 Is there any good resources out there .. . Answer : It is possible if you wrap up your logic into COM object and reference it from the VBA code .", "Question : I have just tried to send a workbook to a friend that has a chart with a drop-down box on it . In excel-2007 I have used : .. . .. . If Chart2.Shapes 2 .ControlFormat.ListCount 16 Then .. . .. . To check the size of the list so that it doesnt get entered in again resulting in an extremely long list that repeats itself . This line works well in Excel 2007 but gives a Object doesn t support this property or method . error in Excel 2002 . What is the difference between working with shapes in 2002 vs 2007 .. . Answer : The difference is you don t get to use the shiny new methods and collections introduced over the years . Unfortunately MSDN http : msdn.microsoft.com en-us library bb726438 28v office.12 29.aspx isn t going to be much help to you in this area . Your best bet is to somehow pick up the appropriate help file http : support.microsoft.com kb 222101 and read the documentation for the version you want . You can find all the 2002 help files here http : www.microsoft.com downloads details.aspx FamilyID 34B793A2-934E-44E5-8C4A-5E06F683FF63 displaylang EN . The problem you are facing is that the ListCount property is read only in 2002 .", "Question : I want to extract special data from an Excel 2002 client requirement cannot change workbook and worksheets contained therein . I have classified ranges in this special data category . I would like to acquire a list of all ranges in ideally all worksheets in a workbook . The attributes I m interested in are the range name and the range address . I have been googling for a while now and have not found anything relevant . I was assuming the Excel 2002 API would expose something like this : .. . .. . or something similar . However I am sadly mistaken . Is this possible with Excel 2002 .. . Answer : If you are looking for all the ranges that are Named you should look at the Workbook.Names collection . Each Name in the Names collection has a RefersTo property that gives the Formula or Range Reference that is referenced by the Name . But be aware that a Name can be a Formula rather than a Range Reference .. . Dim oNM as Name .. . .. . for each oNM in ActiveWorkbook.Names .. . debug.print oNM.Refersto .. . next oNM Comment : thanks charles", "Question : I am using excel-2002 i want to be able to move the marker on a line chart so that it changes the data . I could only find one post that refers to this functionality . http : www.excelbanter.com showthread.php t 138369 .. . .. . Excel built-in help is no help . Thanks .. . Answer : My bad it seems like you can do it automatically . Straightforward if they re just values you ve entered if its a formula it brings up a goal seek box .", "Question : Good morning .. . .. . I have a .Net 2.0 runtime DLL that I am trying to load from Excel it s correct regasm d . I ve verified with the Fusion Log Viewer that it is trying to load with the 1.1 runtime instead o 2.0 which explains why it s failing . One solution is to put an EXCEL.EXE.config file next to excel that looks like this : .. . .. . However I do not have admninistrative priviledges on the machine . What are my alternatives to Make Excel 2002 use the 2.0 runtime instead of 1.1 Regards Alan . .. . Answer : An alternative solution is to rename remove this registry entry : Reference http : social.msdn.microsoft.com Forums en-US vsto thread 2ca664bc-c280-492c-b240-ae06f776803d Comment : Note that with .NET framework 4.0 you ll need to find the registry key for V4.0 as well .", "Question : Good morning .. . .. . I have a .Net 2.0 runtime DLL that I am trying to load from Excel it s correct regasm d . I ve verified with the Fusion Log Viewer that it is trying to load with the 1.1 runtime instead o 2.0 which explains why it s failing . One solution is to put an EXCEL.EXE.config file next to excel that looks like this : .. . .. . However I do not have admninistrative priviledges on the machine . What are my alternatives to Make Excel 2002 use the 2.0 runtime instead of 1.1 Regards Alan . .. . Answer : The behavior you encounter is a bug in both Office XP and 2003 . For a fix you basically have to install the KB908002 http : support.microsoft.com kb 908002 update from Microsoft . See my answers to the following questions : .. . .. . http : stackoverflow.com questions 553794 can-a-net-word-2003-add-in-be-installed-outside-of-the-gac 553839 .. . http : stackoverflow.com questions 436958 -net-app-config-question Comment : Thanks a lot for this . I m getting some generic Office install warning message but soon enough I m hoping to give the patch a try . Voted you up in the meantime but will not forget to check the accepted answer icon if it works . :", "Question : Using Excel 2002 and have a VBA app that has some UserForms . The main UserForm contains a number of textboxes that fire various Enter Exit events . I am now running into a issue where one of the textbox exit events fires 2x in a row I know because a messagebox appears each time . Is there some means within Excel VBA to track all the events that fire and their sequence without writing code in every event procedure .. . Answer : Don t know the answer to your question but inserting this code will help prevent firing unwanted events : Comment : Thanks - that should do quit nicely .", "Question : Good afternoon .. . .. . I created an Excel .xla addin for Excel 2002 . This weird behavior I am seeing from it happens only on my machine but not on my coworkers . I would like to understand why . The add-in has a UDF function that gets called from many many spreadsheets . My Add-in is set to open when Excel opens . When I open a blank spreadsheet it works fine . If I double-click on an .XLS that references the add-in Excel fails to load the VBA project and I get NAME . However if I open Excel and then the spreadsheet it works fine . I ve checked the blacklist disabled items under the help menu . There s nothing there . This has been working for a long time now I can t find out what changed . I ve tried nuking all Registry entries with my add-in s name and trying again . Still doesn t work . Any ideas Thanks . -Alan . .. . Answer : Eventually I figured out that all the problematic spreadsheets had RTD DDE links in them and it turns out that the data source process is never really running on my machine . As soon as I went to Edit-Links and removed those links everything worked fine .", "Question : I am working with EXCEL 2002 in Windows 7 . I can open and close Excel files without problems but when I want to quit the program by clicking x in the top-right corner or by menu File- Exit nothing happens . The only way to end the program is by going to the Task manager and killing the application . What can be the reason of this behaviour and how can I fix it Thanks for advice . Comment : Voting to close . This isn t a programming question . Comment : Ok sorry . If so the admin shall remove it . .. . Answer : Have you tried https : support.microsoft.com en-us kb 923505 There is some compability issues between office xp and windows-7 which you can see by the discussion going on here http : answers.microsoft.com en-us windows forum windows 7-windows programs is-office-xp-compatible-with-windows-7 abbe2f98-569e-4123-b0c7-2eb785f13315 .. . .. . one person acctually has the same problem as you and can only close it by closing excel by the task manager .. . .. . Also you can try to run the program in compability mode for win xp ny right-clicking on the excel.exe file or your shortcut and take properties and then go the tab compability and choose Run this program in compability mode for And choose windows-xp Service Pack 3 .. . .. . I had similar problems when I turned to windows-7 and these steps solved most of them . Hope it can help you . Comment : Hi Rycket I don t know who downgraded your answer and why because it solves my problem Chosing Run this program in compability mode for windows-xp Service Pack 3 was the solution . Thank You Comment : Just glad I could help : I know how annoying those things can be :", "Question : What is the easiest way to call a web service from Excel I am using version 2002 Please no third party tools or libraries . This has to be easy with some VBA that I can paste there use it and ever touch . Comment : Here you go : msdn.microsoft.com en-us library aa140260.aspx http : msdn.microsoft.com en-us library aa140260.aspx Comment : yea thanks . I was planning to answer this one myself after spending 20 minutes before landing on the website you put down : . Comment : : Ain t that always the way it goes There ought to be a way to have SO alert you when someone answers your question because I think I posted this link pretty soon after you posted the question which might have saved you some time . : .. . Answer : I don t think there is any especially easy way to talk to SOAP directly from VBA but a web service with a RESTful interface i.e . the whole thing can be done via a URL is easier : I was looking at this article http : www.onlamp.com pub wlg 5619 just today . Another article I just found is here http : www.automateexcel.com 2005 03 17 excel rest and winhttp thoughts . If you re stuck with SOAP however you could start by reading this http : www.webcontinuum.net ws 4.aspx and this http : www.automateexcel.com 2004 11 14 excel-vba consume web-services . Frankly it all looks a bit nasty .", "Question : I want to create a log file in excel . I have created a macro that will insert in-time into active cell on ButtonInTime click . Similarly out time in the active cell on ButtonOutTime click.. . .. . .. . Now i want to insert todays date on ButtonInTime click in previous cell of active cell .. . .. . and calculate Total Log hours insert it into next active cell of OutTime . How i can achive this Can any one help me out I tried to find out the solution but didnt get the proper one.. . Thanks in advance... . Comment : i found the solution Comment : activecell.offset will help to navigate cells in excel... . .. . Answer : I achieved it. . There are some hard codes in this... . Comment : Please see stackoverflow.com help accepted-answer http : stackoverflow.com help accepted-answer", "Question : When I compare the value of a cell that contains to a variable it always returns true . Is there any way I can prevent this Here is my current code : .. . .. . alpha by the way looks like this : .. . .. . This always returns A which is in alpha 1 1 . Come to think of it since they each go to seven I don t know why it don t come back with . How can I get around this and make it return true only when it actually matches Comment : Such a comparison behaves as expected for VBA in Excel 2007 . If you provide a bit more of your code definitions of letters and rng for example I can test the whole thing to see if it was a bug that they have fixed . Or you could look at the Microsoft Help to see if it is a known fault . .. . Answer : As far as I understand you want to create a substitution algorithm . If there is no specific reason to use a two dimensional cipher table I would rather use a one dimensional approach like the following : .. . .. . calling this function with .. . .. . results in THEQUICKBROWN FOX123+- because we don t allow blanks in Model or Subst .. . .. . Now change Subst to .. . .. . result is 4 73.+ 6910GBF 9ZWVUCD .. . .. . if you feed the above into the cipher function you end up again with THEQUICKBROWN FOX123+- as you would expect from a symetrical substitution . Comment : Thanks this helps a lot . Comment : By the way I did it 2D because substitution is not hard to break using brute-force . Comment : Fine it has helped and thanks for accepting .. . well - any plain substitution - even Vigen re - is rather easy to crack if you have enough crypted text using a statistical approach . I can share functions for Caesar Vigen re and Fence with you - I developed them for educational purpose . Comment : Sure that would be interesting though I don t know how we would . Are they in Excel VBA I also work with C but I sometimes reference the VB.NET libraries because they are so extensive . Nothing like good ol vb in all it s forms .", "Question : I have a shared and protected worsheet in excel 2012 . protected but without password I wrote this macro : .. . .. . But everytime I use this macro I have a message that shows me that there s an error with the method protect . What am I doing wrong Comment : What does the error message say Comment : You don t need to unprotect to run vba on a sheet if it is protected using userinterfaceonly that setting is designed so you do not need to unprotect . Comment : well what I need is to sort by colomn D4 and the users wont have permission to write anything outside the table that is from B4 to K38.please help me .. . Answer : Try this not tested since on mobile .. . .. . rather than using protect userinterfaceonly : true .. . .. . Also using UserInterfaceOnly you shouldn t need to unprotect the sheet to edit it with vba . Comment : doesn t work . 1004 run time error . how would you do it think that you have a shared workbook and you want users that share it only can edit some cells . I don t know why is too hard to do it may be I have vba knowledge lack . Comment : Try the edit if not i ll get to a machine with full excel and try some examples", "Question : When I compare the value of a cell that contains to a variable it always returns true . Is there any way I can prevent this Here is my current code : .. . .. . alpha by the way looks like this : .. . .. . This always returns A which is in alpha 1 1 . Come to think of it since they each go to seven I don t know why it don t come back with . How can I get around this and make it return true only when it actually matches Comment : Such a comparison behaves as expected for VBA in Excel 2007 . If you provide a bit more of your code definitions of letters and rng for example I can test the whole thing to see if it was a bug that they have fixed . Or you could look at the Microsoft Help to see if it is a known fault . .. . Answer : I tried the following and got the expected result it was able to find the question mark : .. . .. . 1 Created CipherTable range in worksheet as above .. . .. . 2 Created a function QM similar to code above .. . .. . 3 Entered a formula in the style of QM cell-ref . It worked fine . Function QM : .. . .. . .. . .. . I also tried something more direct and got the response expected :", "Question : If I type in this formula : .. . .. . With A1 set to without the quotes and LetterTable contains this : .. . .. . It always gives me a no quotes . Why is this Also if I copy that into an array in vba and loop through it comparing it to the spreadsheet value it won t find it either . Comment : why the close votes Comment : Not a programming question . Should be moved to superuser . .. . Answer : See http : office.microsoft.com en-us excel-help vlookup-HP005209335.aspx : .. . .. . If range lookup is FALSE and lookup value is text then you can use the wildcard characters question mark and asterisk in lookup value . A question mark matches any single character an asterisk matches any sequence of characters . If you want to find an actual question mark or asterisk type a tilde preceding the character . Comment : Welcome to Stackoverflow thanks . Comment : What about in vba Comment : VBA : I guess I ll need to see some example code . Question mark by itself may be a synonym for the Print method Debug . becomes Debug.Print . In the context of the LIKE operator it matches any one character . Beyond that I can t think of anything . Comment : See stackoverflow.com questions 4630412 http : stackoverflow.com questions 4630412 question-mark-in-spreadsheet-causes-problems-in-excel-vba Comment : I tried the following and got the expected result : 1 Created CipherTable range in worksheet as in 4630412 2 Created a function QM similar to code in 4630412 3 Entered a formula in the style of QM cell-ref . It worked fine . See 4630412 for details .", "Question : I am trying to use a formula to get a letter of the alphabet . Formula : .. . .. . Function : .. . .. . Result : .. . .. . When I step through the function it never gets to the second stop . What is wrong Comment : I would think it is the Stop word on the 3rd line.. . Comment : Is this code trying to return a random letter of the alphabet Comment : Yeah.......... . .. . Answer : RANDOM is not a function in Excel . RAND is and it returns a float between 0 and 1 . You need an integer to do modulus calculations . To get a random integer use : .. . .. . Then once seed Mod 27 - i becomes 0 or less the function dies because arrays can t be indexed with 0 or less in VBA or most languages . .. . .. . But really all you need to do for a random letter is this : Comment : Excellent thanks It should be noted that you need the Analysis Toolpak for that RandBetween . Comment : +1 : nice RANDBETWEEN formula for random letter.. .", "Question : I have a pivot-table in Excel and the sum of the items should equal zero . Instead I am getting a number very very close to zero -3.63797880709171E-12 . As @Tim Williams pointed out in his comment this is a known artifact of decimal -- binary floating-point conversions . My main concern here is really in the formatting of the result . I am trying to apply an accounting format where a 0 shows as - as opposed to 0.00 . The - format is important because it allows you to look at a glance and see which columns tie out when comparing sets of numbers . When some zeroes display as 0.00 and others display as - this is much more difficult . For example .. . .. . I would like the result for all three formulas to show as - . Is there a way to force that to happen Perhaps there is a way to force sums in a pivot-table to round to the nearest penny i.e . hundredth Comment : cpearson.com excel rounding.htm http : www.cpearson.com excel rounding.htm .. . Answer : Try changing your formula to this so that it rounds to the nearest 10th change the last 1 to something bigger if you need more precision . Edit : If you are unable to change the formula you can also use a custom display format For the result along the lines of : .. . .. . I have not tested this but you should get the idea . Comment : Those three formulas I showed were just to illustrate one half of the problem . The other part of the problem is that this is specifically an issue for me in a pivot-table . If you know of a way to round the sum in a pivot-table that would likely solve my problem . Comment : Can you round the results before they are fed into the pivot-table Comment : Your Edit did it for me . I had to adjust it a bit to get it to work but I was finally able to do that . Here s the final number format I used : .005 0.00 -.005 0.00 - @", "Question : I am trying to use a formula to get a letter of the alphabet . Formula : .. . .. . Function : .. . .. . Result : .. . .. . When I step through the function it never gets to the second stop . What is wrong Comment : I would think it is the Stop word on the 3rd line.. . Comment : Is this code trying to return a random letter of the alphabet Comment : Yeah.......... . .. . Answer : This code will return random letter of alphabet : Comment : What is the 26 - 1 + 1 all about Comment : The general formula for a random number between two numbers is : Int High - Low + 1 Rnd + Low . We want a random number bewteen 1 and 26 for the alphabet so just plug into the equation . NB - the Int is there to make sure number is a whole number .", "Question : null .. . Answer : I have no experience with VBA and I need to get this done . I appreciate any help . My goal is to read EXIF metadata of a jpg picture . There are some tutorials on the internet but I have some difficulties with them . 1 I found this code on a msdn man page its about the use of GDI+ library and functions of a Bitmap class. . But is this possible to use in VBA I added System Drawing resource it knew Bitmap class but I couldnt use PropertyItem for example. . what am I doing wrong please 2 Second tutorial I found was about Windows Imaging Component its not VB but I couldnt get it work in C also . First code on that page is : .. . .. . and I just dont know what reference to add i tried windowscodecs.dll - wrong move or what Declaration to add to get the VBA module to know this IWICImagingFactory for example can you help me Thanks a lot . I know its probably lame question but i wasnt able to find an answer at least if you told me where to find answers it would be great : Comment : sourceforge.net projects exifclass http : sourceforge.net projects exifclass . This is for vb6 but should also work in VBA Comment : im also looking into some vba graphics stuff. . just by looking at it using WIC might be fairly complicated - many type and function declarations aliasing . It seems that with the right declarations GDI + can also be used in vba http : www.xtremevbtalk.com archive index.php t-144075.html and this might be a simpler route . If you are still interested in this question let me know ." ] }
[ "yes-answer-long", "yes-answer-short" ]
spreadsheet
UNK_RELATION
x-cart@open-source@33
x-cart -- x-cart is a web based @placeholder shopping cart written in php .
{ "confidence": [ 60.531097412109375, 58.913475036621094, 58.913475036621094, 58.709625244140625, 58.709625244140625, 57.25530242919922, 57.189239501953125, 57.189239501953125, 57.09593963623047, 56.93391418457031, 56.828826904296875, 56.72126770019531, 56.72126770019531, 56.72126770019531, 56.72126770019531, 55.61385726928711, 54.470863342285156, 54.074951171875, 54.074951171875, 54.074951171875, 54.074951171875, 54.074951171875, 53.523902893066406, 51.95047378540039, 51.88274383544922, 51.88274383544922, 51.88274383544922, 51.88274383544922, 51.88274383544922, 51.88274383544922, 51.47922897338867, 51.47922897338867, 51.27349853515625, 50.42842102050781, 48.68537902832031, 48.68537902832031, 48.46470260620117, 47.649436950683594, 47.55747985839844, 47.55747985839844, 47.555484771728516, 46.721656799316406, 45.81243896484375, 45.38174819946289, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.36527633666992, 45.28084945678711, 44.993309020996094, 43.910953521728516, 43.910953521728516, 43.910953521728516, 43.910953521728516, 43.910953521728516, 43.88936233520508, 43.730716705322266, 43.56865310668945, 43.56865310668945, 43.409400939941406, 43.409400939941406, 43.3463020324707, 42.518028259277344, 42.16790771484375, 42.16790771484375, 42.16790771484375, 42.044551849365234, 41.37644577026367, 41.37644577026367, 41.37644577026367, 41.37644577026367, 41.37644577026367, 41.219425201416016, 40.32830810546875, 40.12323760986328, 40.12323760986328, 40.12323760986328, 40.12323760986328, 40.12323760986328, 40.12323760986328, 39.99217224121094, 39.94300079345703, 39.78401184082031, 39.7106819152832, 39.10102081298828, 38.76482009887695, 38.665889739990234, 38.44703674316406, 38.44703674316406, 38.1790771484375, 36.9088134765625, 36.9088134765625, 36.9088134765625 ], "content": [ "I am using X-Cart for for creating my shopping cart when I add the discount code it doesn t update the cart simultaneously .", "Is there anyway to check is my X-Cart is exactly 4.5", "I am creating a module for x-cart .", "I have installed and configured WordPress in X-Cart module for an X-Cart 4.6.4 Gold site .", "The X-Cart back-end works ok and when I disable the module x-cart front-end works again .", "I m currently using X-Cart and have some employees each has an X-Cart administration account .", "So we have to migrate X-cart 4.4 database into X-cart 5 then make new skins according to X-cart 5 standard and all modules installation as well as customization .", "You can also migrate your store to X-Cart 5 using commercial service of X-Cart team : http : www.x-cart.com x-cart-migration.html", "My site was designed in x-cart .", "The general X-Cart 4 X-Cart 5 migration guide is here : http : kb.x-cart.com display XDD Migration+from+X-Cart+4+to+X-Cart+5 .. . .. . You can migrate your data using paid service of cart2cart : http : www.shopping-cart-migration.com migration-from-x-cart-4-to-x-cart-5 .. . .. . If you contact X-Cart sales team at sales@x-cart.com you will receive a discount voucher that will allow you to migrate some part of your data for free up to 5000 products 2000 users and 5000 orders .", "And naturally they need a shopping cart to support it .", "The WP site is located in the X-Cart root .", "How have you enabled https in x-cart", "I have problem with my x-cart website .", "@cmorrissey This is a file part of a plugin for X-Cart .", "I have a website based on X-Cart http : www.x-cart.com .", "When I enable the module from the X-Cart admin the x-cart front-end crashes with an Error establishing a database-connection .", "I updated my X-Cart from 4.4.2 to 4.5 .", "http : www.torrentsmafia.biz scripts 88485-x-cart-430.html .. . .. . Thanks Jaymin", "I have one problem with my x-cart website .", "I want to build a custom Settings page on the back-end of X-Cart .", "I am newbie in X Cart and working on XCart 5.2.5 .", "Which setting is required to run the X-cart Website .", "We use the e-commerce platform X-cart to host our shopping cart along with a built-in integration for Janrain which allows for social login through facebook etc .", "Can we use multiple currency type in a website using X-Cart .", "Is there a way to reliably find product data on the front-end of an X-Cart page", "Our website is currently using X-cart version 4.4 .", "I wonder how can i check my space in x-cart", "In X cart how can we put insert into command .", "How can I make X-Cart 5 to autoload library s classes", "However I am getting confused with X-Cart .", "I was surprised to see X-Cart was a SO tag .", "Also you seem to be looking into the manual for X-Cart Classic while the provided screenshot displays X-Cart 5 checkout form .", "I want my employees to use their existing X-Cart accounts to login .", "X-Cart will detect the absense of cache and will automatically launch the cache rebuild process .", "I would advise to check X-Cart logs for possible errors first .", "My question is : How can my PHP scripts check if users are already logged in to X-Cart", "Access your store using a link similar to the following : .. . .. . https : www.example.com x-cart admin.php drop cache access key XXXXXXXXXXXXXX https : www.example.com x-cart admin.php drop cache access key XXXXXXXXXXXXXX .. . .. . Replace the portion . . x-cart with the actual address of your store and use your actual Safe Mode access key instead of XXXXXXXXXXXXXX .", "You may also request the package of older versions contacting X-Cart support http : www.x-cart.com contact-us.html .", "Please check it out : http : blog.x-cart.com x-cart-5-downloadable-released.html", "Below are some session variable-related notes regarding x-cart 4.4.x branch .", "Since the site is in PHP I looked at a few like x-cart opencart magisto community edition and prestoshop .", "https : help.x-cart.com index.php title X-Cart : Discount Coupons .. . .. . There is no error on console as well is there something wrong with X-Cart", "I am following this tutorial .. . .. . http : kb.x-cart.com display XDD Step+1+-+creating+simplest+module .. . .. . The module is showing up in the modules list in admin panel but it says The module is not compatible with your X-Cart version . .. . .. . My x-cart version is 5.2.4 .", "If you use X-Cart GoldPlus or Platinum you may SHOW PRICES in several currencies .", "If you don t know where the folder belongs download the x-cart script package and check where the directory belongs .", "I am using x-cart 5 I am not able to past the .htaccess content", "X-Cart 5 uses Doctrine ORM http : www.doctrine-project.org projects orm.html to work with database records .", "It adds a few wrapper classes for easier programming but most of the documentation available for Doctrine applies to X-Cart 5 too .", "I wonder if there is an easy way to set up a product import for X-Cart 5 using linux console command", "Example of code only concept not solution for your case : .. . .. . Also you can use scheduled task in X-Cart 5 .", "I m going to create a module for X-Cart 5 that will use a third-party library .", "I see there are third-party modules bundled with X-Cart 5 but these are in the lib directory .", "There is a one-line change I want to make in the code in X-Cart 4 file payment offline.php .", "Unfortunately the integration was built within x-cart so we have no control over where it loads .", "Register globals should be disabled see system requirements for X-Cart v4.5.5 and later : http : help.x-cart.com index.php title X-Cart : Server Requirements 28X-Cart 4.5 29 PHP configuration .. . .. . To answer the other questions some more info is required in particular what x-cart version you use .", "For example is it possible to use both USD price and AUD price for a single product or different products in a single web-site using X-Cart .", "You need to use x-cart methods to get session variables and then assign them to Smarty", "I m attempting to use the jQuery UI Dialog box within a version of x-cart .", "For example whenever my employees access custom webpages if they re already logged in to X-Cart they should be fine .", "It does not come from x-Cart my guess is : your app tries to post but gets no response missing formid .", "I m the creator of CloudSearch https : www.x-cart.com extensions addons cloudsearch.html - product search-engine for X-Cart stores .", "I also develop some custom PHP webpages not X-Cart modules which require my employees to login before they can access those webpages .", "On the Xcart Shopping cart page when I try to process to paypal express it says failure to redirect to paypal .", "If you re upgrading the store of indeed you may want to consider X-Cart 5 - a new generation platform where the upgrades are done in a couple of clicks .", "If you want x-cart header and footer a classic admin page than you should include : .. . .. . and NOT .. . .. . Everything else looks quite correct .", "It works perfectly on the cart page but it breaks on every other page and it hides the checkout button regardless of what item is in the cart .", "There are several issues in your question : .. . .. . Array products that holds items in Cart is available only on Cart and Checkout page s .", "With paypal ruled out I have been looking at X-Cart for the shopping interface and couple of other payment companies akin to authorize.net for the payment integration .", "So what I need is to somehow save the x-cart cart and basically save this cart not in cookies but in server-side session but databases so that if a client has filled the checkout form in but never checkedout to then email the user saying something like Have you forgotten to pay", "When we move to X-cart website one server to another server than I have facing the problem .", "for X-Cart versions 5.1.8 and earlier the subject was New safe mode access key has been generated .", "X-Cart 5 knowledge base is available at http : kb.x-cart.com display XDD Home", "X-Cart 4.7.5 uses Smarty version 3.1 which does not allow php tag : http : www.smarty.net docs en language.function.php.tpl .. . .. . IMPORTANT NOTICE .. . .. . php tags are deprecated from Smarty and should not be used .", "I am working with x-cart website and I have one question about how can I add pagination to featured products on homepage", "I accidentally enabled https in X-Cart from localhost there after can not login in admin panel and therefor can not disable the same please help me .", "These fields can be found in the table xc config provided that during X-Cart installation you chose to use the MySQL table prefix xc .", "The full instruction is available in X-Cart 5 knowledge base : http : kb.x-cart.com display XDD Inaccessible+Admin+area+after+enabling+HTTPS", "Not sure if I can give a link-to X-Cart support here but I m sure you ll easily find it if only try to search", "We wish to limit the ability to login to shopping cart pages as the .js code causes our site to load slowly on product pages .", "The code you provided will print for example 5 links to Cart if you have 5 products in Cart which have no id 3065 .", "My Questions : .. . .. . If I use X-Cart do I need any additional payment integration system like Paypal", "Since X-Cart is a downloadable software what PSI implications does hosting it in our own server have", "How will I handle iOS and Android versions does X-Cart do anything for those platforms", "So I decided to reach out to anyone with prior X-Cart experience to help me get some directions .", "All the latest versions of X-Cart do not touch credit-card information at any point .", "X-Cart does not charge any transaction fees so the only fees you will be paying will be to the gateway itself .", "The Safe Mode access key can be copied from the file var data .safeModeAccessKey in your X-Cart installation folder or from any of the two reset links that were sent to your site administrator mailbox after X-Cart installation The message subject reads Soft and Hard reset links for your store", "It talks a lot about PCI compliance and stuff so I am wondering whether it is a full package not just shopping cart", "When I click on Buy Now button on one product and after that I click on My Cart which is the checkout section it returns that my cart is empty although I already click to buy product .", "You can read more about it in this blog post http : blog.x-cart.com pci-compliant-credit-card-saving-in-x-cart-and-x-payments.html .", "The reason X-Cart displays internal transaction ID is that if a transaction is not through and you provide a merchant with internal ID they can go to Orders Payment transactions section in admin area and will find the transaction details .", "Run in PHP not in Smarty var-dump SESSION to make sure there are any variables in it .. . .. . I looked at documentation and seems x-cart doesn t store session variables in the way you think so there won t be variables in SESSION .", "Thus the possible solution is : .. . .. . roll back the custom changes you implemented and use default functionality adding products to cart with a redirect to cart page or .. . check the minicart content.php script and find out why it doesn t want to properly process the data sent by JS script .. . .. . If you re not sure how to achieve this consider contacting X-Cart support team for further investigation .", "On the cart page if productid 3065 then it shows the space otherwise it shows the link .", "The way you check if specific item is in cart is wrong in first place .", "Delete the folder var run and the file var .rebuildStarted in your X-Cart installation folder and go the your store s Admin area .", "I ve just installed X-Cart 5.2.4 to a Nitrous.io box for a quick play around and after what appears to be a textbook installation any attempt to view the front or back end of the website results in an infinite-loop .", "It depends on your template but lets assume your Featured products are displayed this way : .. . .. . Than you can use jQuery which is probably old in x-Cart to paginate : .. . .. . Fiddle example http : jsfiddle.net zan09wr7", "Also you can find a great article on adding custom X-Cart 5 database entities here http : kb.x-cart.com display XDD Creating+new+entity+--+Introduction+of+editable+ItemsList+in+admin+area ." ] }
{ "confidence": [ 68.90988159179688, 65.65876770019531, 64.0884017944336, 63.66779327392578, 62.42935562133789, 61.860321044921875, 61.69285583496094, 61.56354522705078, 60.95577621459961, 60.913536071777344, 59.9022216796875, 59.13863754272461, 57.96851348876953, 57.885250091552734, 57.67991256713867, 57.49680709838867, 57.222293853759766, 56.60977554321289, 55.96617889404297, 55.844608306884766 ], "content": [ "Question : I am using X-Cart for for creating my shopping cart when I add the discount code it doesn t update the cart simultaneously . I need to reload the page . Image is attached https : i.stack.imgur.com XXdhx.gif .. . .. . I have used this coupon extension which comes with Xcart by default . Here is the link-to the Coupon site . https : help.x-cart.com index.php title X-Cart : Discount Coupons .. . .. . There is no error on console as well is there something wrong with X-Cart .. . Answer : I would advise to check X-Cart logs for possible errors first . Looking at php and xlite logs in the var log folder might help you . Let me know if you find anything there . Thanks . Also you seem to be looking into the manual for X-Cart Classic while the provided screenshot displays X-Cart 5 checkout form . X-Cart 5 knowledge base is available at http : kb.x-cart.com display XDD Home", "Question : We use the e-commerce platform X-cart to host our shopping cart along with a built-in integration for Janrain which allows for social login through facebook etc . We wish to limit the ability to login to shopping cart pages as the .js code causes our site to load slowly on product pages . How do we prevent the .js code from running on product pages Comment : Don t put your JavaScript on those pages Comment : Some javascript slows down the pages Wow. . trim that code down regardless Comment : It s hard to answer this question without knowing how your javascript is being loaded to begin with Comment : if your js code is running slowly then the first thing to do is use a tool such as YSlow to find out which scripts are running slow and why . Comment : Unfortunately the integration was built within x-cart so we have no control over where it loads . We used pingdom to determine that rpx.js Janrain is the javascript causing the slow loading times . .. . Answer : Just put the following at the start of the javascript file causing slowness :", "Question : Our website is currently using X-cart version 4.4 . We want to upgragde to version 5.0 . The coding standard file structures and database tables are completely different . So we have to migrate X-cart 4.4 database into X-cart 5 then make new skins according to X-cart 5 standard and all modules installation as well as customization . How do we upgrade without loosing the existing database Comment : I ve improved the grammar and spelling of the post . However it s still not 100 clear what question you re actually asking . I ve attempted to pull the question from your title and embed it in the post please confirm that my assumption was correct . Comment : yes you are correct Comment : Maybe just focus to xcart customers table usually you do not need anything else . Once I just merged orders counter for each user into new database but really you do not need anything else . .. . Answer : The general X-Cart 4 X-Cart 5 migration guide is here : http : kb.x-cart.com display XDD Migration+from+X-Cart+4+to+X-Cart+5 .. . .. . You can migrate your data using paid service of cart2cart : http : www.shopping-cart-migration.com migration-from-x-cart-4-to-x-cart-5 .. . .. . If you contact X-Cart sales team at sales@x-cart.com you will receive a discount voucher that will allow you to migrate some part of your data for free up to 5000 products 2000 users and 5000 orders . You can also migrate your store to X-Cart 5 using commercial service of X-Cart team : http : www.x-cart.com x-cart-migration.html", "Question : So I need to recommend an eCommerce platform to my client . The requirement is that they need to ship items all over Europe and North America . So it needs to be multi-currency multi-language . Also there is a subscription model so the credit-card needs to be stored and periodically charged . Further they need it to integrate with QuickBooks which is they accounting software . Also the software will have web iOS and Android versions . So for the storing credit-card part I do not want to store it within our infrastructure because of PCI DSS issues . Instead I would prefer having something like paypal vault . However I cannot use paypal because their mobile SDK does not support recurring payments subscription model . With paypal ruled out I have been looking at X-Cart for the shopping interface and couple of other payment companies akin to authorize.net for the payment integration . However I am getting confused with X-Cart . It talks a lot about PCI compliance and stuff so I am wondering whether it is a full package not just shopping cart I read tons of documentation but I still cannot wrap my head around it . My Questions : .. . .. . If I use X-Cart do I need any additional payment integration system like Paypal Since X-Cart is a downloadable software what PSI implications does hosting it in our own server have How will I handle iOS and Android versions does X-Cart do anything for those platforms I was surprised to see X-Cart was a SO tag . So I decided to reach out to anyone with prior X-Cart experience to help me get some directions . Thank you Comment : Off topic for S.O .. . Answer : All the latest versions of X-Cart do not touch credit-card information at any point . So it is out of PCI-DSS scope and can be hosted on any server you like as long as it meets the system requirements . And to process credit cards you can use any of the integrated payment gateways . X-Cart does not charge any transaction fees so the only fees you will be paying will be to the gateway itself . And if the gateway you would like to use is not integrated yet you can add it yourself since the platform is fully open code . As for subscriptions X-Cart offers a stand-alone PA-DSS certified X-Payments software that utilizes tokenization technology supported by certain payment methods including PayPal Pro to save credit-card information for further use in a PCI-compliant manner . The actual credit-card number is saved by the payment-gateway itself . And X-Payments uses the token to perform additional charges . The token cannot be used with any other gateway or X-Payments installation so even if it gets stolen there won t be any harm . You can read more about it in this blog post http : blog.x-cart.com pci-compliant-credit-card-saving-in-x-cart-and-x-payments.html . And dedicated iOS Android applications can be added with Shopgate service http : www.x-cart.com extensions addons field tags tid 5B0 5D 99 that is integrated with X-Cart . Comment : Thank you for your answer I will check the links you posted :", "Question : Can we use multiple currency type in a website using X-Cart . For example is it possible to use both USD price and AUD price for a single product or different products in a single web-site using X-Cart . .. . Answer : If you use X-Cart GoldPlus or Platinum you may SHOW PRICES in several currencies . It s possible due to multicurrency module which is built-in to the versions above and is a separate paid add-on for X-Cart Gold : http : www.x-cart.com extensions modules multicurrency.html It s actually for customer s convenience - he will no longer need to recalculate the cost into his local currency . However as I understand you want not only to SHOW but also to PROCESS orders in different currencies . By default it s not possible but you may want to consider such a custom modification from 549 : http : mods.x-cart.com Advanced-Multi-Currency-Support.html", "Question : I m currently using X-Cart and have some employees each has an X-Cart administration account . I also develop some custom PHP webpages not X-Cart modules which require my employees to login before they can access those webpages . I want my employees to use their existing X-Cart accounts to login . For example whenever my employees access custom webpages if they re already logged in to X-Cart they should be fine . If not they should be redirected to X-Cart s admin login page . My question is : How can my PHP scripts check if users are already logged in to X-Cart I tried to include auth.php but I got the error message Can not initiate application Please check configuration . .. . .. . Thanks a lot .. . Answer : Creating secure admin pages is pretty simple : .. . .. . 1 . create new page in ROOT admin my new app.php .. . 2 . start your code with : .. . .. . My new App is secure .. . require . auth.php .. . require xcart dir . include security.php .. . .. . Put your App code in here.. . .. . .. . .. . You may and you should end with assigning main template as : .. . my main my new app .. . location array New App admin my new app.php .. . .. . .. . But then you need to go and edit YOUR SKIN single home.tpl and add this : .. . .. . elseif main eq my new app .. . include file admin my new app.tpl .. . .. . and you need to create your template file : admin my new app.tpl .. . .. . .. . .. . And that s it . If you are not an admin you will get redirected to Login page administration area . There is one important note here : You can not use post variables in your app without a real form on page . You have to create a form than xcart will create a hidden input field formid and it will have some hashed value such as : 20b8e92504d1908bb1e3a264b9169f1e . Once you have it you can use AJAX and post variables each time including formid and its value . The reason I am telling you this is strange message you get : Can not initiate application Please check configuration . It does not come from x-Cart my guess is : your app tries to post but gets no response missing formid .", "Question : I updated my X-Cart from 4.4.2 to 4.5 . But after updated it version number is not showing on Admin panel . Is there anyway to check is my X-Cart is exactly 4.5 .. . Answer : You can find out the version of your X-Cart installation using one of the following links : .. . .. . X-Cart s files version : http : your site URL xcart dir VERSION .. . .. . X-Cart s database version : http : your site URL xcart dir include version.php .. . .. . for example : .. . .. . http : demo.x-cart.com demo goldplus VERSION .. . .. . http : demo.x-cart.com demo goldplus include version.php", "Question : I have problem with my x-cart website . When I click on Buy Now button on one product and after that I click on My Cart which is the checkout section it returns that my cart is empty although I already click to buy product . Here is my website : http : www.farlin-cambodia.com home.php cat 591 .. . .. . How can I fix it .. . Answer : The store you re referring to is of version 4.1.6 that s an old version where there were no adding to cart without redirect with ajax . The behaviour in question is still there thus the feature is added as a custom mode . If JS is enabled in the browser and if the store considers that it s enabled the JS script is supposed to send some data to script minicart content.php and the php script is to process the received data further . However it doesn t happen and there are no JS errors which makes me believe that the problem is in the code of minicart content.php with this file is very likely being modified too . If JS is disabled in the browser and if you click the corresponding button in the store in the pink side menu block - If Javascript is disabled in your browser click here this custom scenario is not applied so the store uses the default functionality which allows to add the products to cart with out problems . Thus the possible solution is : .. . .. . roll back the custom changes you implemented and use default functionality adding products to cart with a redirect to cart page or .. . check the minicart content.php script and find out why it doesn t want to properly process the data sent by JS script .. . .. . If you re not sure how to achieve this consider contacting X-Cart support team for further investigation . Not sure if I can give a link-to X-Cart support here but I m sure you ll easily find it if only try to search Comment : I am not sure about your first solution and I don t know how to edit my minicart content.php . : Comment : It posts correct data to minicart content.php maybe the xcart version does not support it . In any case developer should open and debug posting on buy-now-click .", "Question : In X cart how can we put insert into command . And also in which specific file .. . Answer : X-Cart 5 uses Doctrine ORM http : www.doctrine-project.org projects orm.html to work with database records . It adds a few wrapper classes for easier programming but most of the documentation available for Doctrine applies to X-Cart 5 too . Also you can find a great article on adding custom X-Cart 5 database entities here http : kb.x-cart.com display XDD Creating+new+entity+--+Introduction+of+editable+ItemsList+in+admin+area .", "Question : I am creating a module for x-cart . I am following this tutorial .. . .. . http : kb.x-cart.com display XDD Step+1+-+creating+simplest+module .. . .. . The module is showing up in the modules list in admin panel but it says The module is not compatible with your X-Cart version . .. . .. . My x-cart version is 5.2.4 . Please advice . .. . Answer : Sorry this was a problem with the article . You need to define the getMajorVersion method of your module as : .. . .. . not as defined in the article : .. . .. . I have corrected the doc and it should not be a problem for future references . Thank you Tony Comment : It Worked Thanks Tony :", "Question : null .. . Answer : I m going to create a module for X-Cart 5 that will use a third-party library . How should I bundle it with my module I see there are third-party modules bundled with X-Cart 5 but these are in the lib directory . I can t place module files into that directory . Also the third-party library may have a different namespace structure . How can I make X-Cart 5 to autoload library s classes Where should I put the library files", "Question : i am facing problem in x-cart i am trying to create session and store value in x-cart for that i used .. . .. . and the simple variable in it .. . .. . after that used some code in tpl file like .. . .. . but nothing happen i also tried .. . .. . but cant help me i cant understand whats going wrong with that there is different file and template also file path is different try to create session in login.php and want this in head.tpl file please help me on that . thanks in advance Comment : I hope that you realize that if you want to set a variable you need to use subscription 1 not subscription 1 which just compares the value of the variable to 1 but does nothing beyond that . .. . Answer : You should first check if there are any variables in SESSION . Run in PHP not in Smarty var-dump SESSION to make sure there are any variables in it .. . .. . I looked at documentation and seems x-cart doesn t store session variables in the way you think so there won t be variables in SESSION . It doesn t store sessions in SESSION but in some custom ways . You can look at http : kb.x-cart.com display XDD Sessions+management .. . .. . As no data is in SESSION when you try to use SESSION in Smarty it won t work . You need to use x-cart methods to get session variables and then assign them to Smarty", "Question : Is there a way to reliably find product data on the front-end of an X-Cart page Templates tend to differ greatly in how they present products or carts so HTML scraping is not an option . Is there no global Javascript variable that contains that info like there is on other web shop platforms .. . Answer : The short answer is that there s no such a global JS variable .. . .. . The long answer is that it s possible to find a workaround but here in X-Cart team we need more details to help with the exact solution so let s move the further discussion to the forum where you have already posted your question too .", "Question : I accidentally enabled https in X-Cart from localhost there after can not login in admin panel and therefor can not disable the same please help me . Thanks in advance Comment : How have you enabled https in x-cart Can you post here your .htaccess content Comment : From admin panel System Settings Https Settings enable https Comment : Try to open .htaccess file in text-editor on root than copy its content in your question . I do not see that option in admin what version do you use Comment : I am using x-cart 5 I am not able to past the .htaccess content .. . Answer : In short you need the following : .. . .. . 1 Reset the values of the fields admin security and customer security in your store s database . These fields can be found in the table xc config provided that during X-Cart installation you chose to use the MySQL table prefix xc . The following MySQL statement will select the fields in question from the database-table xc config : .. . .. . SELECT FROM xc config WHERE name LIKE security The following statement will reset the field values : UPDATE xc config SET value 0 WHERE name admin security OR name customer security .. . .. . 2 Remove the folder var datacache in your X-Cart insallation directory . The full instruction is available in X-Cart 5 knowledge base : http : kb.x-cart.com display XDD Inaccessible+Admin+area+after+enabling+HTTPS Comment : Thank you its working . fine. .", "Question : I want to set up a cron job and do scheduled imports from a particular .csv file that I will upload update via ftp . I wonder if there is an easy way to set up a product import for X-Cart 5 using linux console command Comment : Different distributions use different registers to call cron jobs . Missing quite some important data in this question . .. . Answer : There is not default way to do import via linux console . But you can create simple console script and run it via cron . Example of code only concept not solution for your case : .. . .. . Also you can use scheduled task in X-Cart 5 . To use it you should create your own module with class witch will extends abstract-class classes XLite Core Task Base Periodic.php .. . .. . You can find example of code in file classes XLite Module CDev XMLSitemap Core Task GenerateSitemap.php .. . .. . Run tasks registered in X-Cart 5 : php console.php --target cron", "Question : The current site I am supporting is going to become eCommerce . And naturally they need a shopping cart to support it . There will be some sophistication in the sense that they would need to support multiple currencies multiple-languages delivery methods subscription models et al . However they are not a market place so they do not really care about multiple vendors or multiple store fronts . Since the site is in PHP I looked at a few like x-cart opencart magisto community edition and prestoshop . The dilemma I have is that the current site management is very particular about design and most of these shopping cart implementations seem tough to me to customize to the level they would want . The alternative is to write a custom cart which is a waste of time effort since we are reinventing the wheel which has already been reinvented a gazillion times . I want to leverage what the open-source community has to give . I feel that the middle path is there is a good package available ONLY as a class module backend - without the front end UI so that I can start using it and building it how I want . How does the PHP community approach this problem . From a solution implementation perspective is it better to build one from scratch I am not sure if anything like that exists though . I would appreciate anyone who can point me to any online resources that will help me in my quest . Thank you . Comment : Question in-between opinion based and a quest for an off-site resource . I fear once again you would not find a solution here . There is really too less chances that you would find someone having experience in all the e-commerce framework you throw in the tags so everyone is as usual going to call for his her favourite or most worked with framework even when they are not the one that should do the work afterwards . So my best advise is : install some of them play with them do yourself your own mind on them and choose based on your own opinion . Comment : I ve been developing open cart modules since over 1 year and I don t recommend it to you the next few sentences are opinion based once you hack the core manually or through extensions every thing will go wrong and you will feel that you are opening the HELL GATE there is no code documentation there is no DB schema documentation you will suffer to understand how things work there so my advice to you is to check it s features if you like it then use it as is if you think that there is a minor possibility that you will edit the core then search for sth else Comment : @AbdoAdel : a very genuinely frank and honest opinion . Thanks .. . Answer : If you cannot find any resources to build from you will need to create this from scratch but this is sometimes the best solution as it will be to the project specification . But my best advice is to look how other cart systems are built and expand and implement functionality like you said don t reinvent the wheel . When completed its always a good idea to upload the project on platforms such as github.com so other people in the same situation can use your code .", "Question : I want to build a custom Settings page on the back-end of X-Cart . I ve been scanning the files and so far I was only able to learn how to add my link-to the admin menu page and I was also able to build the page and assign contents using smarty . The only thing that is missing now in my custom page is the X-Cart s admin header and footer sections all I see is the text outputted using smarty with plain white background only . Here is what I did to create the admin menu link and the page : .. . .. . 1 I created a sample settings.php on the folder : root admin with the following contents : .. . .. . 2 Then I created the sample settings.tpl on the folder : root skin customs skin admin main with the following contents : .. . .. . 3 Then I assigned my new file in the root skin customs skin singe home.tpl just before the else : .. . .. . 4 Then to add the menu item to the Content tab in the X-Cart admin menu I added the following code to the file : root skin customs skin singe menu box.tpl .. . .. . So what did I miss Thank you guys in advance .. . Answer : If you want x-cart header and footer a classic admin page than you should include : .. . .. . and NOT .. . .. . Everything else looks quite correct .", "Question : can anybody send XCART 4.3.0 download link I cant find it on its website .. . .. . https : www.google.co.in search q xcart+4.3.0+download oq xcart aqs chrome.5.69i59j0j69i60l3j69i59.4898j0j4 sourceid chrome espv 210 es sm 122 ie UTF-8 https : www.google.co.in search q xcart+4.3.0+download oq xcart aqs chrome.5.69i59j0j69i60l3j69i59.4898j0j4 sourceid chrome espv 210 es sm 122 ie UTF-8 .. . .. . but none of it works .. . Answer : If you own a license the distributional package can be downloaded in the File Area of the corresponding HelpDesk account https : secure.x-cart.com . You may also request the package of older versions contacting X-Cart support http : www.x-cart.com contact-us.html . PS : Normally the packages of older versions are requested when the store is being upgraded . If you re upgrading the store of indeed you may want to consider X-Cart 5 - a new generation platform where the upgrades are done in a couple of clicks . Please check it out : http : blog.x-cart.com x-cart-5-downloadable-released.html", "Question : null .. . Answer : I have installed and configured WordPress in X-Cart module for an X-Cart 4.6.4 Gold site . When I enable the module from the X-Cart admin the x-cart front-end crashes with an Error establishing a database-connection . Cannot use object of type W3 Config as array in home username public html include func func.db.php on line 517 message in a blank page . The X-Cart back-end works ok and when I disable the module x-cart front-end works again . Also both WordPress front-end and admin work ok when I enter directly in the WordPress site . The WP site is located in the X-Cart root . I found a solution which I am not sure if it is the perfect but temporarily it works . I tried to trace the code with a debugger in my local dev . server and I found out that in wp-includes ms-settings.php WP script file close to line 57 the code searches for the current blog by querying the WP database via the input path in the browser . This is stored in the current blog variable via the snippet : .. . .. . The current blog variable was set to false thus leading to further empty object regarding the found current WP site and exiting the procedure displaying the Error establishing a database-connection message . From what I noticed the path variable was set to the x-cart root dir relative-path eg if xcart is installed in xcart root dir and the WP blog in xcart blog dir then the path variable was set to xcart leaving out the blog path part thus not finding the blog . On the other hand the current site- path value contains the path to the blog xcart blog so I replaced the above line comment : REPLACED LINE with the one below : .. . .. . Also I did the following things : - I removed any mod-rewrite rules in the .htaccess file of the WordPress root directory because they broke the initial redirection - I tried to remove my code tweak posted in this thread but then the site displayed the database-connection error so I retrieved it back . - I deactivated the W3 Total Cache plugin in WordPress because it kept breaking the site . The strange thing is that I needed to keep my code tweak as well . Anyway the integration worked fine . My question is if my above approach regarding the code modification is correct since I actually modified the original WordPress code which is hardly possible to have a bug in this spot . Comment : What does line 517 say Comment : @Aibrean : line 517 is in bold snippet : if stristr query select false isset config General use old products lng config General use old products lng Y query func transform lng query ext query xcart products lng query func transform lng query base query xcart products sql tbl products lng current Comment : Please put this in your original question and format within code . See the help for how to format code . Comment : Sorry for the delayed replay but I found a questionable solution related to code modification to another part of the code . I have edited my initial question adding this solution .", "Question : So what I need is to somehow save the x-cart cart and basically save this cart not in cookies but in server-side session but databases so that if a client has filled the checkout form in but never checkedout to then email the user saying something like Have you forgotten to pay or something . I hope you get what I mean . .. . Answer : Take a look at this . abandoned cart reminder module for xcart http : www.x-cart.com extensions modules abandoned-cart-reminder.html .. . .. . Its not free but like any other xcart module you wont find them for free xD" ] }
[ "yes-answer-long", "yes-answer-short" ]
open-source
UNK_RELATION
loopbackjs@web@105
loopbackjs -- loopback is an open-source node.js framework built on top of express optimized for mobile @placeholder and other devices .
{ "confidence": [ 31.483373641967773, 31.299072265625, 30.68146324157715, 29.779172897338867, 29.497028350830078, 29.437847137451172, 28.35748863220215, 26.952207565307617, 26.795513153076172, 26.509918212890625, 26.194372177124023, 26.194372177124023, 26.074811935424805, 25.943897247314453, 25.92074203491211, 25.92074203491211, 25.18606185913086, 24.912431716918945, 24.912431716918945, 24.912431716918945, 24.912431716918945, 24.911296844482422, 24.498733520507812, 24.482410430908203, 24.482410430908203, 24.267303466796875, 24.13636016845703, 24.13636016845703, 23.929367065429688, 23.900413513183594, 23.900413513183594, 23.900413513183594, 23.900413513183594, 23.802654266357422, 23.802654266357422, 23.545551300048828, 23.378177642822266, 23.378177642822266, 23.306739807128906, 23.149425506591797, 23.149425506591797, 23.098098754882812, 22.995649337768555, 22.845232009887695, 22.845232009887695, 22.845232009887695, 22.845232009887695, 22.833393096923828, 22.79520606994629, 22.537240982055664, 22.428783416748047, 22.428783416748047, 22.38051414489746, 22.38051414489746, 22.38051414489746, 22.367172241210938, 22.282752990722656, 22.282752990722656, 22.265613555908203, 22.24247932434082, 22.073610305786133, 22.073610305786133, 22.073610305786133, 22.073610305786133, 22.042530059814453, 21.98733901977539, 21.98733901977539, 21.8582763671875, 21.8582763671875, 21.8582763671875, 21.8582763671875, 21.8582763671875, 21.8582763671875, 21.8582763671875, 21.786895751953125, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.54834747314453, 21.47822380065918, 21.450763702392578, 21.420475006103516, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562, 21.325332641601562 ], "content": [ "I see that LoopBack has the Express 3.x middleware built-in .", "For instance the Loopback framework is a set of Node.js modules that you can use independently or together .", "This code is copied directly from Loopback thumbnail view https : groups.google.com forum topic loopbackjs uYyN8ttj9iY .. . .. . common models container.js", "I am trying to migrate my model class to mysql db with strongloop tool in node.js loopback framework .", "This website is build in Angular loopback framework .", "In loopback framework we have a module LoopBack Storage Component .", "even loopbackjs docs needs to be updated", "You click only Google Sign-in button and then loopback server will able to do above things as web .. . .. . Is there a built-in way in loopback for this", "Can you open an issue at https : github.com strongloop loopback-datasource-juggler", "Possible duplicate of LoopbackJS : HasAndBelongsToMany how to query filter by property of relation", "I have a backend built using Strongloop Loopback NodeJS .", "A complete check would be like this : .. . .. . Here is a pattern that loopback uses for their built-in models .", "Current Loopback modules : .. . .. . Thanks Jason", "It seems that this feature has not been built by loopback https : github.com strongloop loopback-sdk-android issues community .", "I m using the loopback framework to create a RESTful API for my application .", "I am working with the Loopback Framework doing a web project .", "I m using the built-in user model of loopback for my application .", "We are using Strongloop s Loopback framework to expose some REST APIs .", "We are using the LoopBack REST framework to expose our database and business logic .", "I m using Loopback from Strongloop as a REST framework and ORM .", "However Loopback requires JavaScript with a specific shape to support their framework .", "2.You loopback project is under google-drive is node.js npm and strongloop also under google-drive or somewhere else", "You could look through their issues on GitHub here and open one about this : github.com strongloop loopback issues https : github.com strongloop loopback issues", "Since LoopBack applications are regular Express applications you can mount them on a path of the master app .", "I created an empty server with loopback added express-session and body-parser middlewares .. . .. . Then I added a pair of methods to root.js . .", "Meanwhile please open an issue at https : github.com strongloop loopback issues .", "In principle LoopBack can be changed to support your use-case please open a GitHub issue to discuss a possible implementation .", "Please open a github issue https : github.com strongloop loopback issues new to track this as a feature request .", "When you logged in from your web site or mobile app loopback creates an access token each time .", "I m trying to use Wallaby with LoopbackJS and last couple of hours brought only failures .", "BTW I recommend you post questions to https : groups.google.com forum forum loopbackjs for prompt responses .", "http : stackoverflow.com questions 32903293 loopbackjs-hasandbelongstomany-how-to-query-filter-by-property-of-relation", "More details and syntax for query is here : https : groups.google.com d msg loopbackjs 8c8kw8EMiPU yev3lsmrTFUJ", "Does this construct exist within Loopback", "How to create an external API on Loopback", "Loopback api is based on swagger and scopes is a new concept in loopback .", "There is a fork of the loopback-connector by @DiogoDoreto https : github.com DiogoDoreto loopback-connector wiki that does attempt to provide it .", "Here is a more direct link : github.com DiogoDoreto loopback-connector wiki https : github.com DiogoDoreto loopback-connector wiki", "There has been a couple conversations 1 https : groups.google.com forum topic loopbackjs KvKfoiLTzYo 2 https : github.com strongloop loopback-component-storage issues 49 about this topic and neither seemed to lead to a solution so I thought this might be a good place to find one once and for all .", "I developed an API using Loopback framework in that i have to insert or update to a table .", "I want to integrate the famous-angular framework in my website but famous run on different server and loopback is run on different server .", "I am attempting to deploy some changes to a loopback app running on a remote Ubuntu box on top of strong-pm .", "Loopback is very flexible .", "Loopback and Arc have sort of different functions .", "Loopback does not support such a function OOTB however .", ".. . .. . Sounds simple yet I struggle to do that in LoopBack .", "How does Loopback handle HasAndBelongsToMany relationships", "There s a good discussion of this here : Why is node.js asynchronous", "Looks like someone wrote a mechanism for using json-schema within LoopBack : github.com backstage loopback-jsonschema https : github.com backstage loopback-jsonschema .", "i have generated loopback API model using loopback arc generator .", "Is there any way I can make changes to the LoopBack source code and deploy to Heroku", "As @superkhau pointed above each LoopBack Model can be attached to a single data-source only .", "I have added this https : groups.google.com d msg loopbackjs FUoYZLKgaTc q0 S1zLPpyoJ to my PATH and it still doesn t work .", "However I think this is a pretty big limitation of the LoopbackJS ORM and I m reconsidering using it for bigger projects .", "stackoverflow.com questions 34078370 http : stackoverflow.com questions 34078370 loopbackjs-angularjs-find-with-relation-hasone-include-separated-attribute", "The interface i m looking at using is loopback s built-in synchronisation soon to become loopback-component-sync .", "I m making a games backend in loopback .", "I m developing an API with loopback and passport .", "Since loopback is based on express you could start with something like morgan https : github.com expressjs morgan :", "This is a known bug in the framework see https : github.com strongloop loopback issues 614 .. . .. . I am working on a new hook implementation that will not have issues like the one you have experienced see loopback-datasource-juggler 367 https : github.com strongloop loopback-datasource-juggler issues 367 and the pull request loopback-datasource-juggler 403 https : github.com strongloop loopback-datasource-juggler pull 403", "When calling User.generateVerificationToken . . http : apidocs.strongloop.com loopback user-generateverificationtoken is the generated token actually persisted in the database", "In Loopback User hasMany AccessToken so it is possible to do .. . .. . Using this method I found that User.generateVerificationToken does not persist a model in the database .", "Instead the instance method user.createAccessToken http : apidocs.strongloop.com loopback user-prototype-createaccesstoken does persist one .", "I m not a Loopback expert but from what i can gather it seems to be an issue with the validateUpsert model definition option .", "You can use express routes as shown in Loopback s Getting Started example https : github.com strongloop loopback-getting-started blob master server boot routes.js .", "How can this be done with Loopback .", "I m using LoopBack ver .", "This is for web loopback-example-passport https : github.com strongloop loopback-example-passport .. . .. . So assume that above scenario for android .", "Disclaimer : I am one of the developers of LoopBack loopback-sdk-android is one of my specialisations .", "github.com strongloop loopback-sdk-android issues new https : github.com strongloop loopback-sdk-android issues new", "See github.com strongloop loopback issues https : github.com strongloop loopback issues 843 issuecomment-112950822", "LoopBack redirects the browser to Facebook s authorization endpoint so the user can log into Facebook and grant permissions to LoopBack .. . 3 .", "Use Loopback-Passport example https : github.com strongloop loopback-example-passport .. . 2 .", "I also opened a loopback issue https : github.com strongloop loopback issues 1164 .", "Loopback-sdk-builder https : www.npmjs.com package loopback-sdk-builder comment https : github.com strongloop loopback-sdk-angular issues 188 issuecomment-227147043", "This is because you re using a exiting model name User which belongs-to loopback .", "I am using a memory datasource node v0.10.24 and loopback v1.8.6 .", "How would I go about using aggregate-functions in Loopback models", "AFAIK loopback does not support aggregate-functions properties at the moment .", "How would I override getters and setters for a model property in Loopback", "Here s the full solution for storing meta data with files in loopback .", "From the docs : .. . .. . LoopBack supports a number of connectors to backend systems beyond databases .", "You gonna need https module for calling external module inside loopback .", "Let the model name be Customer .. . .. . Inside your loopback folder .", "Loopback Remote Methods https : docs.strongloop.com display LB Remote+methods", "I am going to take over an existing project developed in node.js with looback framework .", "The loopback documentation for running Loopback in the browser https : docs.strongloop.com display public LB Running+LoopBack+in+the+browser seems to suggest that to get this running create a file called browswer-app.js with the following code : .. . .. . Then run browser on that file .. .", "If you can narrow down the source of the issue can you post on the LoopBack repo on GitHub", "I m having a blocking issue with StrongLoop Loopback .", "MONGODB is accessed using loopback-connector-mongodb .", "If not how can I integrate this scenario in loopback properly", "I am starting to gain grounds with loopback api .", "I am using loopback for storing Image to the server .", "Suppose my datasource for loopback-component-storage is presImage .", "I m struggling with a Loopback issue using ajax .", "I m trying out Loopback for an API that will talk to Ember .", "which module component in Loopback can support this", "I m making an angular application with strongloop loopback backend .", "It is not true anymore that Loopback doesn t support calculated properties .", "Groups id Sessions .. . .. . which is the API generated by Loopback ." ] }
{ "confidence": [ 38.38288116455078, 36.971832275390625, 36.51721954345703, 35.54376983642578, 35.54376983642578, 34.89625549316406, 34.76287841796875, 34.58129119873047, 34.42238235473633, 34.13531494140625, 33.956695556640625, 33.22932815551758, 32.51091766357422, 32.183773040771484, 31.75721549987793, 31.584592819213867, 31.237384796142578, 31.237384796142578, 31.031776428222656, 30.90297508239746 ], "content": [ "Question : i have a problem with Node JS loop-back include filter when i make a query .Every time its giving all records in response.but i want only those records that holds the sportid which i am passing in query filter . if sportid exists then it should return object otherwise it should not but in this case its returns all UserPersonalinfos records and adding UserRegistration object to UserPersonalinfos object Comment : simply i want only those records in response those have sport id otherwise they should not be in response if record don t have sportid Comment : Possible duplicate of LoopbackJS : HasAndBelongsToMany how to query filter by property of relation http : stackoverflow.com questions 32903293 loopbackjs-hasandbelongstomany-how-to-query-filter-by-property-of-relation .. . Answer : As per http : stackoverflow.com a 32933383 344022 there s nothing officially available yet . There is a fork of the loopback-connector by @DiogoDoreto https : github.com DiogoDoreto loopback-connector wiki that does attempt to provide it . I haven t tried it but if you were to use it you would do the following in a filter : .. . .. . The answer linked above also suggests some other ways of achieving what you want . Comment : its not working Comment : Am guessing you didn t get the fork code from the link Comment : the link says that first i have to make a query in UserRegistration for those records who have data 0 .id .then i have to make a query to UserPersonalinfos for these ids but i don t won t to do additional work.because i am using limit in query and i made query for client-side then if i sends limit 10 i want 10 records.and i want to do this task by a query . it is possible Comment : Unfortunately AFAIK the only way you can really achieve what you want is by following the link-to the pull request from that answer and trying that . Here is a more direct link : github.com DiogoDoreto loopback-connector wiki https : github.com DiogoDoreto loopback-connector wiki Comment : It mentions about creation of sql queries is it also for MongoDB", "Question : I m currently working on my first Loopbackjs project and am facing a seemingly simple issue : Let s say I have a model Post and a model Tag . A Post has-and-belongs-to-many tags . Now I need to list all posts with specific tags . I just can t figure out how to create a query with Loopback that achieves this . I thought it would work something like this but it doesn t : Posts.find where : tag.id : inq : 1 4 .. . .. . I would greatly appreciate any help . .. . Answer : It s not as easy as it should be to carry out a filter on some related properties . There is a pull request outstanding but it s been open for a long time now . https : github.com strongloop loopback issues 517 As far as I can see the only way of filtering is on the main model so you could do : .. . .. . Unfortunately you would need to do additional work to get a nice list of Posts from the results you get back . EDIT You can alternatively get all Posts and only bring back the tags that match your query using scope with the following : .. . .. . In the callback of the query you can tidy up the result with the following code before returning it : .. . .. . The benefit is that the results returned are formatted as you would expect . However the performance of my second example may be extremely poor as it will always return all of your Posts unless you specify a filter or paging at the Post level . It s basically a Left Join where as you want an Inner Join which Loopback just can t do at the moment . Comment : Thanks a lot I m now doing it like this and then filtering out the duplicates . However I think this is a pretty big limitation of the LoopbackJS ORM and I m reconsidering using it for bigger projects . Comment : @Nanunana I couldn t believe it when I found out so...I did a bit more digging and found another way . Still not great but perhaps a little better . See my edit . Comment : Hy i have a hasOne relation and doing like that it works. . but it includes the relation fields together with main object. . is it possible to make it separated ex . lets say that tag has field tagname. . so it comes Post.tagname. . instead of Post.tag.tagname Comment : @mariomol not sure if I understand - can you create a separate question with your code Comment : stackoverflow.com questions 34078370 http : stackoverflow.com questions 34078370 loopbackjs-angularjs-find-with-relation-hasone-include-separated-attribute", "Question : I have two Models defined Location and Address defined as follows : .. . .. . When I Create an object based on the address Model via the API Explorer the required constraint on address1 behaves as expected and I must supply a value to create the object . When I Create an object based on the location Model via the API Explorer the required constraint on the address works as expected but the required constraint on the address1 of the address Model does not . I am able to create an address without an address1 which is not what I would expect . Am I doing something wrong or is validation only performed on the root object I am using a memory datasource node v0.10.24 and loopback v1.8.6 . .. . Answer : At this moment validations only happen at root level . Can you open an issue at https : github.com strongloop loopback-datasource-juggler BTW I recommend you post questions to https : groups.google.com forum forum loopbackjs for prompt responses . Comment : Is this still the case in the newer version Comment : using versions 2.x Comment : I would also be interested to hear the status of this .", "Question : What I want to do : Have an html-form with a file input inside . When a file is chosen the file input should upload the file and get a file id so when the form is submitted the file id is posted with the form and written in the database . Shorter version : I want to store meta data id for example with my files . .. . .. . Sounds simple yet I struggle to do that in LoopBack . There has been a couple conversations 1 https : groups.google.com forum topic loopbackjs KvKfoiLTzYo 2 https : github.com strongloop loopback-component-storage issues 49 about this topic and neither seemed to lead to a solution so I thought this might be a good place to find one once and for all . The simplest solution would be to use model relations but LoopBack doesn t support relations with the file storage service . Bump . So we have to go with a persistedmodel named File for example and override default create delete so it saves and deletes from the file store model I have - named Storage . My setup so far : .. . .. . I have a model api Storage which is connected to a loopback storage service http : docs.strongloop.com display public LB Storage+service and is saving file successfully to the local filesystem . I have a PersistedModel connected to Mongo with file meta data : name size url and objectId .. . I have a remote hook set up before create so the file can be saved first and then it s url can be injected into File.create .. . .. . I m there and according to this LoopBack page http : docs.strongloop.com display public LB Remote+hook I have the ctx which should have the file inside : .. . .. . What s ctx ctx.req : Express Request object . ctx.result : Express Response object . Ok so now I m at the Express page pretty lost and it sais something about a body-parsing middleware which I have no idea what it might be . I feel like I m close to the solution any help would be appreciated . Is this approach right Comment : I can get data for File.beforeRemote upload function ctx modelInstance next console.log ctx.req next however I can t see any file related information in the ctx object and the modelInstance is undefined too.. . Worth noting that my File here is the model with the storage service datasource . Comment : Thanks RYFN for taking a look into this . For the sake of consistency I ll stick with my naming File for the file meta data and storageId and Storage for the file model bound to storage service . Comment : I can easily do a remote hook to Storage.upload and get file meta data like name size etc . and call File.create from the hook but this is not the best solution . File being a persistentModel can be set to be related to User.profileimage for example and if a user posts a form with the image inside it would be handled well by Loopback . So I m still looking for a solution with a hook to File and not Storage models . Comment : how do you get the file meta data out of the .upload hook would you be able to show an example Comment : Storage.afterRemote upload function ctx modelInstance next console.log create file modelInstance.result.files.file next .. . Answer : For those who are looking for an answer to the question how to check file-format before uploading a file . Actual in this case we can use optional param allowedContentTypes . In directory boot use example code : .. . .. . I hope it will help someone .", "Question : What I want to do : Have an html-form with a file input inside . When a file is chosen the file input should upload the file and get a file id so when the form is submitted the file id is posted with the form and written in the database . Shorter version : I want to store meta data id for example with my files . .. . .. . Sounds simple yet I struggle to do that in LoopBack . There has been a couple conversations 1 https : groups.google.com forum topic loopbackjs KvKfoiLTzYo 2 https : github.com strongloop loopback-component-storage issues 49 about this topic and neither seemed to lead to a solution so I thought this might be a good place to find one once and for all . The simplest solution would be to use model relations but LoopBack doesn t support relations with the file storage service . Bump . So we have to go with a persistedmodel named File for example and override default create delete so it saves and deletes from the file store model I have - named Storage . My setup so far : .. . .. . I have a model api Storage which is connected to a loopback storage service http : docs.strongloop.com display public LB Storage+service and is saving file successfully to the local filesystem . I have a PersistedModel connected to Mongo with file meta data : name size url and objectId .. . I have a remote hook set up before create so the file can be saved first and then it s url can be injected into File.create .. . .. . I m there and according to this LoopBack page http : docs.strongloop.com display public LB Remote+hook I have the ctx which should have the file inside : .. . .. . What s ctx ctx.req : Express Request object . ctx.result : Express Response object . Ok so now I m at the Express page pretty lost and it sais something about a body-parsing middleware which I have no idea what it might be . I feel like I m close to the solution any help would be appreciated . Is this approach right Comment : I can get data for File.beforeRemote upload function ctx modelInstance next console.log ctx.req next however I can t see any file related information in the ctx object and the modelInstance is undefined too.. . Worth noting that my File here is the model with the storage service datasource . Comment : Thanks RYFN for taking a look into this . For the sake of consistency I ll stick with my naming File for the file meta data and storageId and Storage for the file model bound to storage service . Comment : I can easily do a remote hook to Storage.upload and get file meta data like name size etc . and call File.create from the hook but this is not the best solution . File being a persistentModel can be set to be related to User.profileimage for example and if a user posts a form with the image inside it would be handled well by Loopback . So I m still looking for a solution with a hook to File and not Storage models . Comment : how do you get the file meta data out of the .upload hook would you be able to show an example Comment : Storage.afterRemote upload function ctx modelInstance next console.log create file modelInstance.result.files.file next .. . Answer : Just pass the data as params object and at server you can get it as ctx.req.query .. . .. . For example .. . .. . At client-side .. . .. . At Server side .. . .. . Suppose your storage model name is container Comment : Thanks Robins for taking the time to reply . Good point but the solution you proposed doesn t address the main problem : How will you store and return this data with the file url from the same api in your case api containers container name file . Harshil s solution was closer to what I was looking for . Thanks for your contribution .", "Question : What I want to do : Have an html-form with a file input inside . When a file is chosen the file input should upload the file and get a file id so when the form is submitted the file id is posted with the form and written in the database . Shorter version : I want to store meta data id for example with my files . .. . .. . Sounds simple yet I struggle to do that in LoopBack . There has been a couple conversations 1 https : groups.google.com forum topic loopbackjs KvKfoiLTzYo 2 https : github.com strongloop loopback-component-storage issues 49 about this topic and neither seemed to lead to a solution so I thought this might be a good place to find one once and for all . The simplest solution would be to use model relations but LoopBack doesn t support relations with the file storage service . Bump . So we have to go with a persistedmodel named File for example and override default create delete so it saves and deletes from the file store model I have - named Storage . My setup so far : .. . .. . I have a model api Storage which is connected to a loopback storage service http : docs.strongloop.com display public LB Storage+service and is saving file successfully to the local filesystem . I have a PersistedModel connected to Mongo with file meta data : name size url and objectId .. . I have a remote hook set up before create so the file can be saved first and then it s url can be injected into File.create .. . .. . I m there and according to this LoopBack page http : docs.strongloop.com display public LB Remote+hook I have the ctx which should have the file inside : .. . .. . What s ctx ctx.req : Express Request object . ctx.result : Express Response object . Ok so now I m at the Express page pretty lost and it sais something about a body-parsing middleware which I have no idea what it might be . I feel like I m close to the solution any help would be appreciated . Is this approach right Comment : I can get data for File.beforeRemote upload function ctx modelInstance next console.log ctx.req next however I can t see any file related information in the ctx object and the modelInstance is undefined too.. . Worth noting that my File here is the model with the storage service datasource . Comment : Thanks RYFN for taking a look into this . For the sake of consistency I ll stick with my naming File for the file meta data and storageId and Storage for the file model bound to storage service . Comment : I can easily do a remote hook to Storage.upload and get file meta data like name size etc . and call File.create from the hook but this is not the best solution . File being a persistentModel can be set to be related to User.profileimage for example and if a user posts a form with the image inside it would be handled well by Loopback . So I m still looking for a solution with a hook to File and not Storage models . Comment : how do you get the file meta data out of the .upload hook would you be able to show an example Comment : Storage.afterRemote upload function ctx modelInstance next console.log create file modelInstance.result.files.file next .. . Answer : Here s the full solution for storing meta data with files in loopback . You need a container model .. . .. . common models container.json .. . .. . Create the data source for your container in server datasources.json . For example : .. . .. . You ll need to set the data source of this model in server model-config.json to the loopback-component-storage you have : .. . .. . You ll also need a file model to store the meta data and handle container calls : .. . .. . common models file.json .. . .. . And now connect file with container : .. . .. . common models file.js .. . .. . Done You can now call POST api file-upload with a file binary-data in file form field . You ll get back id name type and url in return . Comment : File.app is not defined : Comment : make sure you take File as the attribute for your hook module.exports function File .. . Comment : Hey I get a response saying Error : Request aborted . I have done exactly what u have done . Any leads would be awsm . thanks . Comment : I wonder if CouchDB would be a solution here - you can save attachments with documents in couch just nicely Comment : @Vaibhav I get the same error as you . Did you ever figure it out", "Question : In this loopback tutorial we can see how own can create model relationships http : docs.strongloop.com display public LB Tutorial 3A+model+relations Tutorial : modelrelations-Createmodelrelations .. . .. . Is the same possible in StrongLoop Arc Thanks .. . Answer : Loopback and Arc have sort of different functions . For instance the Loopback framework is a set of Node.js modules that you can use independently or together . While Arc is a visual tool suite for creating packaging deploying profiling managing and monitoring Node applications and APIs . It is not possible to create models in Arc since it is primarily being used to monitor your node application . Comment : that makes sense Arc is for ease of app managing and Loopback to be used for modeling relationships - thanks", "Question : I am using loopback for storing Image to the server . I want to modify the file name of the file before getting saved to the server . Also I want to convert it to another thumbnail form before getting saved . Here is how I am doing . At client-side .. . .. . At Server Side I am receiving the query params but not getting the File Name .. . .. . My Storage model name is container .. . .. . How to change the File name of the File getting saved at the server .. . Answer : I figured it out . We have to define a custom function getFileName in boot configure-storage.js . Suppose my datasource for loopback-component-storage is presImage . server boot configure-storage.js .. . .. . common models container.js .. . .. . Now suppose my container model is container . Now for converting it images to Thumbnail size .. . .. . Download the quickthumb https : www.npmjs.com package quickthumb .. . .. . Here is how to use it with loopback . This code is copied directly from Loopback thumbnail view https : groups.google.com forum topic loopbackjs uYyN8ttj9iY .. . .. . common models container.js Comment : Nice response but i think that the orderId customerId should be set in server-side and not set in the form so it can not be changed by the final user .", "Question : What I want to do : Have an html-form with a file input inside . When a file is chosen the file input should upload the file and get a file id so when the form is submitted the file id is posted with the form and written in the database . Shorter version : I want to store meta data id for example with my files . .. . .. . Sounds simple yet I struggle to do that in LoopBack . There has been a couple conversations 1 https : groups.google.com forum topic loopbackjs KvKfoiLTzYo 2 https : github.com strongloop loopback-component-storage issues 49 about this topic and neither seemed to lead to a solution so I thought this might be a good place to find one once and for all . The simplest solution would be to use model relations but LoopBack doesn t support relations with the file storage service . Bump . So we have to go with a persistedmodel named File for example and override default create delete so it saves and deletes from the file store model I have - named Storage . My setup so far : .. . .. . I have a model api Storage which is connected to a loopback storage service http : docs.strongloop.com display public LB Storage+service and is saving file successfully to the local filesystem . I have a PersistedModel connected to Mongo with file meta data : name size url and objectId .. . I have a remote hook set up before create so the file can be saved first and then it s url can be injected into File.create .. . .. . I m there and according to this LoopBack page http : docs.strongloop.com display public LB Remote+hook I have the ctx which should have the file inside : .. . .. . What s ctx ctx.req : Express Request object . ctx.result : Express Response object . Ok so now I m at the Express page pretty lost and it sais something about a body-parsing middleware which I have no idea what it might be . I feel like I m close to the solution any help would be appreciated . Is this approach right Comment : I can get data for File.beforeRemote upload function ctx modelInstance next console.log ctx.req next however I can t see any file related information in the ctx object and the modelInstance is undefined too.. . Worth noting that my File here is the model with the storage service datasource . Comment : Thanks RYFN for taking a look into this . For the sake of consistency I ll stick with my naming File for the file meta data and storageId and Storage for the file model bound to storage service . Comment : I can easily do a remote hook to Storage.upload and get file meta data like name size etc . and call File.create from the hook but this is not the best solution . File being a persistentModel can be set to be related to User.profileimage for example and if a user posts a form with the image inside it would be handled well by Loopback . So I m still looking for a solution with a hook to File and not Storage models . Comment : how do you get the file meta data out of the .upload hook would you be able to show an example Comment : Storage.afterRemote upload function ctx modelInstance next console.log create file modelInstance.result.files.file next .. . Answer : I had the same problem . I solved it by creating my own models to store meta data and my own upload methods . 1 . I created a model File which will store info like name type url userId same as yours .. . .. . 2 . I created my own upload remote method because I was unable to do it with the hooks . Container model is the model which is created by loopback-component-storage http : docs.strongloop.com display public LB Storage+component . 3 . var fileInfo fileObj.files.myFile 0 Here myFile is the fieldname for file-upload so you will have to change it accordingly . If you don t specify any field then it will come as fileObj.file.null 0 . This code lacks proper error checking do it before deploying it in production . File.uploadFile function ctx options cb .. . File.app.models.container.upload ctx.req ctx.result options function err fileObj .. . if err cb err .. . else .. . Here myFile is the field name associated with upload . You should change it to something else if you .. . var fileInfo fileObj.files.myFile 0 .. . File.create .. . name : fileInfo.name .. . type : fileInfo.type .. . container : fileInfo.container .. . userId : ctx.req.accessToken.userId .. . url : CONTAINERS URL+fileInfo.container+ download +fileInfo.name This is a hack for creating links .. . function err obj .. . if err .. . console.log Error in uploading + err .. . cb err .. . .. . else .. . cb null obj .. . .. . .. . .. . .. . .. . .. . File.remoteMethod .. . uploadFile .. . .. . description : Uploads a file .. . accepts : .. . arg : ctx type : object http : source : context .. . arg : options type object http : source : query .. . .. . returns : .. . arg : fileObject type : object root : true .. . .. . http : verb : post .. . .. . .. . Comment : Awsome your answer guided me to the solutions I was looking for . I ll accept yours and will upload the full solution with model defs for the record . Comment : great for any one like me who got can t find upload of undefined make sure your container model is named container small case or change it", "Question : null .. . Answer : I am trying to migrate my model class to mysql db with strongloop tool in node.js loopback framework . When I click the migrate button it is showing the error .. . .. . My model class example .. . .. . db source file .. . .. . Please help to resolve this issue . Comment : Man you got to at least provide soem code or something it s saying Unexpected String how is anybody supposed to know what the string that s wrong is supposed to be if you don t show us........... . Comment : Added my model class and database source file Please check now .", "Question : I see that LoopBack has the Express 3.x middleware built-in . Indeed body-parser is in loopback node-modules . But I cannot figure out how to use it as middleware . I have never worked with Express 3.x so maybe it s just that . require does not work obviously unless I install body-parser as a dependency in my project . What should I do in server.js to use body-parser so that web forms are parsed into req.params That s what it does right .. . Answer : I m using loopback 2.14.0 : .. . .. . To make use of the body-parser in your custom bootscript routes you should only need to : .. . .. . 1 install body-parser npm-install body-parser --save .. . .. . 2 Register the the module in middleware.json .. . .. . There is no need to require the parser setup in server.js loopback does this for you when you register the middleware . Please note body parser is now installed in your source node-modules directory as well as in the loopback modules directory . If at all possible try register custom remote methods as described in the loopback documentation https : docs.strongloop.com display public LB Remote+methods . Registering routes this way gives you access to loopback s body-parser out of the box and is the cleanest implementation .", "Question : I m following loopback framework tutorial specifically this page https : docs.strongloop.com display public LB Extend+your+API there is an example code that finds an instance by ID I modified it a bit to handle non-existent instances .. . .. . It all works fine when I call it with existing ID however when I enter an invalid ID instead of calling the err handler it s omitted entirely the else statement is called and the whole app crashes with the following console error .. . .. . I m new to node.js and I m pretty sure I m missing something here but shouldn t the error be passed into the callback function rather than being thrown to the top level This doesn t seem to be mysql backend specific I switched to mongo connector and got a similar problem . How to handle an error like this properly .. . Answer : You ll need to check shop parameter also . A complete check would be like this : .. . .. . Here is a pattern that loopback uses for their built-in models . Code is from the file node-modules loopback common models user.js at around 281 line number . Comment : thanks that approach worked . I was confused by mysql exception I expected it to be passed as err parameter to my callback . do you by any chance know when this parameter will be used if there will be a query error or somehing like this Comment : Server disconnected will through this error for sure . Don t know for findById but for methods like create validations errors and for User.login login failed error will be reported through this .", "Question : What I want to do : Have an html-form with a file input inside . When a file is chosen the file input should upload the file and get a file id so when the form is submitted the file id is posted with the form and written in the database . Shorter version : I want to store meta data id for example with my files . .. . .. . Sounds simple yet I struggle to do that in LoopBack . There has been a couple conversations 1 https : groups.google.com forum topic loopbackjs KvKfoiLTzYo 2 https : github.com strongloop loopback-component-storage issues 49 about this topic and neither seemed to lead to a solution so I thought this might be a good place to find one once and for all . The simplest solution would be to use model relations but LoopBack doesn t support relations with the file storage service . Bump . So we have to go with a persistedmodel named File for example and override default create delete so it saves and deletes from the file store model I have - named Storage . My setup so far : .. . .. . I have a model api Storage which is connected to a loopback storage service http : docs.strongloop.com display public LB Storage+service and is saving file successfully to the local filesystem . I have a PersistedModel connected to Mongo with file meta data : name size url and objectId .. . I have a remote hook set up before create so the file can be saved first and then it s url can be injected into File.create .. . .. . I m there and according to this LoopBack page http : docs.strongloop.com display public LB Remote+hook I have the ctx which should have the file inside : .. . .. . What s ctx ctx.req : Express Request object . ctx.result : Express Response object . Ok so now I m at the Express page pretty lost and it sais something about a body-parsing middleware which I have no idea what it might be . I feel like I m close to the solution any help would be appreciated . Is this approach right Comment : I can get data for File.beforeRemote upload function ctx modelInstance next console.log ctx.req next however I can t see any file related information in the ctx object and the modelInstance is undefined too.. . Worth noting that my File here is the model with the storage service datasource . Comment : Thanks RYFN for taking a look into this . For the sake of consistency I ll stick with my naming File for the file meta data and storageId and Storage for the file model bound to storage service . Comment : I can easily do a remote hook to Storage.upload and get file meta data like name size etc . and call File.create from the hook but this is not the best solution . File being a persistentModel can be set to be related to User.profileimage for example and if a user posts a form with the image inside it would be handled well by Loopback . So I m still looking for a solution with a hook to File and not Storage models . Comment : how do you get the file meta data out of the .upload hook would you be able to show an example Comment : Storage.afterRemote upload function ctx modelInstance next console.log create file modelInstance.result.files.file next .. . Answer : Depending on your scenario it may be worth looking at utilising signatures or similar allowing direct uploads to Amazon S3 TransloadIT for image-processing or similar services . Our first decision with this concept was that as we are using GraphQL we wanted to avoid multipart form uploads via GraphQL which in turn would need to transfer to our Loopback services behind it . Additionally we wanted to keep these servers efficient without potentially tying up resources with large uploads and associated file validation and processing . Your workflow might look something like this : .. . .. . 1 . Create database record .. . 2 . Return record ID and file-upload signature data includes S3 bucket or TransloadIT endpoint plus any auth tokens .. . 3 . Client uploads to endpoint .. . .. . For cases where doing things like banner or avatar uploads step 1 already exists so we skip that step . Additionally you can then add SNS or SQS notifications to your S3 buckets to confirm in your database that the relevant object now has a file attached - effectively Step 4 . This is a multi-step process but can work well removing the need to handle file uploads within your core API . So far this is working well from our initial implementation early days in this project for things like user avatars and attaching PDFs to a record . Example references : .. . .. . http : docs.aws.amazon.com AmazonS3 latest dev UsingHTTPPOST.html .. . .. . https : transloadit.com docs authentication", "Question : I have User model over relational DB . Each User can hasMany users where chiefId is FK . I can query related users for each chief-user like this : .. . .. . But it returns full user objects . How should I query only name properties of related users Also is it possible to count related instances in one request to server Comment : not supported it seems see stackoverflow.com questions 25903985 http : stackoverflow.com questions 25903985 how-to-include-related-entities-in-rest-with-loopback-io .. . Answer : As far as I understood this question is about adding a nested filter on an include level which seems to be not yet supported : https : groups.google.com forum msg loopbackjs T6onsYMJFOI V4ILc3Obf3MJ .. . .. . May be it s not the best way to approach this problem but what you can do is a manual response transformation in .afterRemote find .. . hook .", "Question : I understand we can create remote methods on models which will expose an endpoint . However is there a way to expose an endpoint without a model For example if I want to create an endpoint checks the version of a native app . I don t need a model to back this endpoint . The endpoint would simply check the passed in version and respond . Does this construct exist within Loopback Or does it need to be done within the context of Express .. . Answer : You can use express routes as shown in Loopback s Getting Started example https : github.com strongloop loopback-getting-started blob master server boot routes.js . Comment : Right so you have to dip into Express . Thanks .", "Question : I m looking for a way to customize the validation for the built-in User Model . The objective is to be allow users to register an account with the same e-mail but different username . I ve tried to override the Setup Method for the User Model to prevent the validation of the uniqueness of the email property but unfortunately that was a no go . As for hooks I ve couldn t find any to fulfill my needs . For reference the validation occurs in loopback common models user.js : 556 : .. . .. . Is there any way that I can use to disable this e-mail validation Thanks in advance . .. . Answer : Disclaimer : I am a LoopBack team member . .. . .. . At the moment it is not possible to allow non-unique user emails . One of the reasons is that User.login supports both email and username i.e . you can login by entering an email and a password . In principle LoopBack can be changed to support your use-case please open a GitHub issue to discuss a possible implementation . Comment : Thank you very much Miroslav for your answer and support . Also let me congratulate you for the excellent work . I will open a GitHub issue and hope that I can contribute to this and other features . Comment : You are welcome . Would you mind marking my answer as accepted", "Question : I have installed Strongloop using npm-install -g strongloop on my Ubuntu 14.04 server . The slc command does not work . It says .. . .. . The program slc is currently not installed . You can install it by typing : sudo apt-get install heimdal-multidev .. . .. . How can I get it to run the Strongloop CLI instead of looking for this package I have added this https : groups.google.com d msg loopbackjs FUoYZLKgaTc q0 S1zLPpyoJ to my PATH and it still doesn t work . Any ideas Other Strongloop commands like sl-build work and strongloop is listed in npm list -g . .. . Answer : Ubuntu 14 with node.js 4.1.2 .. . .. . By default somehow slc is not created or not added to PATH . I solved this problem by adding symlink :", "Question : I have installed Strongloop using npm-install -g strongloop on my Ubuntu 14.04 server . The slc command does not work . It says .. . .. . The program slc is currently not installed . You can install it by typing : sudo apt-get install heimdal-multidev .. . .. . How can I get it to run the Strongloop CLI instead of looking for this package I have added this https : groups.google.com d msg loopbackjs FUoYZLKgaTc q0 S1zLPpyoJ to my PATH and it still doesn t work . Any ideas Other Strongloop commands like sl-build work and strongloop is listed in npm list -g . .. . Answer : Ubuntu 14.04 with node.js 4.4.2 LTS : .. . .. . The installation of strongloop was done without any errors but slc was not added to the PATH . I solved this problem by adding the symlink :", "Question : null .. . Answer : I m currently working with the loopback-component-passport system for third party enterprise authentication . I ve been using the loopback-example-passport project on github as my template . I m having a hard time seeing where passport is being invoked to actually do the work of authenticating with the data that I ve provided in providers.json . We are building out our application in the Ionic framework so this will be commonly used from the android ios platforms . We do not want to manage their email and password for authentication we simply want to forward them to the enterprise login page to authenticate we receive a token request additional data about the user and create that user in our Mongodb . .. . .. . I setup up a basic express server in node for testing passport and I verified the openIDC strategy I m using is working . In this testing process passport is clearly called in app.get login passport.authenticate as a callback function . How is this process handled when using strongloop and passport What callback function would be used in the routing for app.get login i.e . When is the passport component not passportConfigurator being called initialized to authenticate or where is that happening if not in server.js I am quite certain this is a user error as I m new to all of this but any additional help or resources on how to use loopback-component-passport for third party enterprises openidc authentication would be helpful . Here s the git project where I ve pulled the passport-oidc strategy and example https : github.com benkroeger passport-oidc . Here s the other resource I ve referenced in search of an answer http : stackoverflow.com questions 30788998 loopback-passport-mobile-login I would post more but I m limited to two URL s because I don t have 10 rep . Thanks to all those who have taken the time to read this any feedback is welcome . Comment : I m guessing you ve already read-the-docs on this component https : docs.strongloop.com pages releaseview.action pageId 3836277 but essentially the component is initialized by requiring and configuring it . The built-in User auth system handles all the redirection and callbacks for you . The real question is : what is your question Is something not working If it s working and you just want to know how then StackOverflow isn t really the place for it .", "Question : I have installed Strongloop using npm-install -g strongloop on my Ubuntu 14.04 server . The slc command does not work . It says .. . .. . The program slc is currently not installed . You can install it by typing : sudo apt-get install heimdal-multidev .. . .. . How can I get it to run the Strongloop CLI instead of looking for this package I have added this https : groups.google.com d msg loopbackjs FUoYZLKgaTc q0 S1zLPpyoJ to my PATH and it still doesn t work . Any ideas Other Strongloop commands like sl-build work and strongloop is listed in npm list -g . .. . Answer : Looks like the Node installation that optionally comes with a Digital Ocean Droplet installs to a different location that s not in PATH . I m pretty sure that was the issue . Anyways I fixed it by spinning up a server without Node pre-installed and followed this guide https : strongloop.com strongblog install-node-js-loopback-and-strongops-on-digital-ocean . Just use npm-install -g strongloop instead of strong-cli because the latter has been deprecated ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
jacoco-maven-plugin@automated-tests@75
jacoco-maven-plugin -- a maven plug-in which provides the jacoco agent to @placeholder and allows basic report creation .
{ "confidence": [ 67.03740692138672, 62.609806060791016, 61.76129150390625, 59.432682037353516, 59.16619873046875, 57.1228141784668, 55.245513916015625, 55.0203971862793, 54.15657043457031, 53.243167877197266, 52.482845306396484, 51.28516387939453, 51.28516387939453, 51.265567779541016, 50.17155838012695, 50.01704788208008, 49.70234680175781, 48.72694778442383, 48.553916931152344, 48.31774139404297, 48.163475036621094, 47.92508316040039, 47.910980224609375, 47.910980224609375, 47.721858978271484, 47.721858978271484, 47.70545196533203, 47.04967498779297, 46.7293586730957, 46.60826873779297, 46.100154876708984, 45.91002655029297, 45.907493591308594, 45.81962966918945, 45.66634750366211, 45.656349182128906, 45.19319152832031, 45.19319152832031, 45.19319152832031, 44.99275207519531, 44.744285583496094, 44.310394287109375, 44.06951904296875, 44.06951904296875, 43.85589599609375, 43.711997985839844, 43.57148742675781, 43.57148742675781, 43.57148742675781, 43.57148742675781, 43.57148742675781, 43.459075927734375, 43.459075927734375, 42.775169372558594, 42.66082763671875, 42.372318267822266, 42.22694778442383, 42.22694778442383, 42.22694778442383, 42.22694778442383, 41.9597053527832, 41.706146240234375, 41.46477127075195, 41.46477127075195, 41.24437713623047, 41.238426208496094, 40.50740051269531, 40.50740051269531, 40.50740051269531, 40.377586364746094, 40.377586364746094, 39.817474365234375, 39.58873748779297, 39.43103790283203, 39.43103790283203, 39.43103790283203, 39.13566589355469, 38.820594787597656, 38.820594787597656, 38.820594787597656, 38.80584716796875, 38.63634490966797, 38.63634490966797, 38.620750427246094, 38.59837341308594, 38.49852752685547, 38.44161605834961, 38.43677520751953, 38.405418395996094, 38.296478271484375, 38.27218246459961, 38.13669204711914, 37.983428955078125, 37.921241760253906, 37.828426361083984, 37.828426361083984, 37.73384094238281, 37.73384094238281, 37.73384094238281, 37.73384094238281 ], "content": [ "I am new to using the Jacoco maven-plugin .", "You could try out this patch to the jacoco-maven-plugin : github.com jacoco jacoco issues 271 https : github.com jacoco jacoco issues 271", "I am using JaCoCo maven-plugin for the test-coverage reports .", "Is there a good reason for using jacoco-maven-plugin v0.5.5", "@drgn I ve updated the question with the complete plugin section for the jacoco-maven-plugin", "The exclusion should be for jacoco-maven-plugin but you don t have any .", "And how to tell the JaCoCo report to wait for it", "Possible duplicate of Maven Jacoco Configuration - Exclude classes packages from report not working http : stackoverflow.com questions 27799419 maven-jacoco-configuration-exclude-classes-packages-from-report-not-working", "I want measure code-coverage with exec-maven-plugin and jacoco together .", "To achieve that I have included exclude within prepare-agent goal in maven pom.xml .. . .. . Jacoco plugin : .. . .. . Surefire plugin : .. . .. . properties section :", "Question : How can I configure jacoco-maven-plugin to show the coverage report relative to a custom package", "Short answer : not possible at the time of writing using merely Maven and Jacoco .", "Hence your requirements cannot be met merely using Maven and Jacoco .", "It apply the inclusion exclusion in the prepare-agent goal defined by the jacoco plugin", "Error Type 1 : .. . .. . Error type 2 : .. . .. . Error type 3 : .. . .. . Versions : .. . .. . tried both jacoco-maven-plugin : 0.7.4.201502262128 and .. . jacoco-maven-plugin : 0.7.5.201505241946 org.testng : 6.9.9 .. . org.apache.maven.plugins.maven-failsafe-plugin : 2.18 .. . org.apache.maven.plugins.maven-surefire-plugin : 2.18.1 .. . SonarQube 4.5.5 Sonar-maven-plugin 2.7.1", "I have a maven multi-module project and I m using jacoco-maven for code-coverage reports .", "Here is the jacoco plugin I ve used .", "Question : How would I configure maven so that JaCoCo runs successfully for a maven site but does not run for a mvn clean install", "The problem discussed in JaCoCo SonarQube incompatible version 1007 http : stackoverflow.com questions 30459260 jacoco-sonarqube-incompatible-version-1007 s 1 7C3.0947 is happening again with sonarqube-maven-plugin 2.7.1 in combination with jacoco-maven-plugin 0.7.5.201505241946 .. . .. . Executing sonar : sonar results in .. . .. . According to https : jira.sonarsource.com browse SONARJAVA-1091 this should be fixed already .", "I don t get why you added jacoco-maven-plugin sonarqube maven-cobertura-plugin sonarqube5.1 maven-plugin if your question is about junit.. . None of these tags match your question .", "My log says : .. . .. . UPDATE : If I run the Maven command mvn jacoco : report-integration the console complains with a missing-data file : .. . .. . Indeed the data file is specified in the pom.xml file as being dataFile project.build.directory coverage-reports jacoco-it.exec dataFile .. . .. . Why is it looked up as jacoco-it.exec instead of coverage-reports jacoco-it.exec", "As i was searching i came across something Jacoco http : www.eclemma.org jacoco trunk doc .. . .. . As per my understanding Jacoco is an agent that will be attached to the JVM and will be instrumenting the bytecode of the classes and there by evaluate the code-coverage metrics", "Update your Jacoco dependency to look like this .. . .. . Make you maven-surefire-plugin look like this : .. . .. . in your properties section Add this as and change your jacoco Version : .. . .. . @codependent Heres an example of why you want to mock .", "I have declared the maven-jacoco plugin as follow : .. . .. . The problem is that when I execute mvn clean verify jacoco still reports classes that should have been excluded as my xml-configuration points out .", "What we would really like to do is only run JaCoCo when a maven site is run .", "Setting jacoco.skip to true does prevent JaCoCo running on normal maven clean install s but also appears to affect the reporting .", "I m new in Jacoco maven-plugin and trying to add coverage analysis for my test classes I m using TestNG with failsafe plugin .", "I have a working jacoco-maven-plugin and want to exclude code generated by lombok .", "from official jacoco github page https : github.com jacoco jacoco wiki MavenMultiModule : .. . .. . The current JaCoCo Maven goals work on single modules only : Tests are executed within the module and contribute coverage only to code within the same module .", "How are you running jacoco", "can you share a bit more of the jacoco plugin configuration of your POM", "My root level pom.xml defines this jacoco-maven-plugin config .. . .. . I ve linked the jacoco : merge goal to the maven post-integration-test phase to ensure the merge happens after the tests are run but the jacoco-it.exec file is always created within the integ-test folder .", "How to tell Jacoco to see them as integration tests and display their graph coverage not in the jacoco-ut directory but it the jacoco-it directory", "There is an open issue for it : https : github.com jacoco jacoco issues 69 .. . .. . EDIT : Found a page which collects all information on the subject : https : github.com jacoco jacoco wiki MavenMultiModule", "I want to use jacoco-maven-plugin for checking minimum level of code-coverage during build-process using check goal .", "See : github.com jacoco jacoco issues 15 https : github.com jacoco jacoco issues 15", "Copy the code end of article at https : dzone.com articles jacoco-maven-multi-module and put it in ... . works for me .", "I have a single module maven project where I am using Jacoco for code coverag .", "I am using sonarqube as the output for the test results while maven and jacoco for testing the test cases .", "How can I check if the Jacoco agent attached to the correct JVM that triggers my main java code", "From this http : stackoverflow.com questions 27799419 maven-jacoco-configuration-exclude-classes-packages-from-report-not-working I get that the plugin accepts only class paths and not package paths in the includes excludes field .", "can you find the jacoco report generated by jenkins build in the jenkins workspace", "The issue you are encoutering comes from a binary incompatiblity due to latest version of JaCoCo binary report .", "Is it because the JaCoCo report is generated before the Jetty server has had time to stop and produce the data file", "I can see at https : github.com jacoco jacoco wiki FilteringOptions that there are some filtering options to avoid having warning on code generated by the JVM at runtime .", "The prepare-agent http : eclemma.org jacoco trunk doc prepare-agent-mojo.html goal is already using project.build.directory jacoco.exec as default destFile value the same applied to the dataFile value for the report http : eclemma.org jacoco trunk doc report-mojo.html goal .", "We use inbuilt jacoco plugin to do the code-coverage .", "Maybe I don t call test from the jacoco plugin", "Jacoco-Plugin should measure the coverage in the production classes with unit tests .", "Now the Jacoco-Plugin should measure the coverage in the production classes with integration tests .", "Thanks I implemented such approach via Jacoco plugin for Jenkins", "My configuration looks like : .. . .. . Notice how the JaCoCo plugin is defined before the jetty one .", "I have a multi-module project and have set up the Jacoco plugin on my root project .", "please note this is not the same thing as the sonarqube maven-plugin .", "Maven 3.3.9 and Jenkins Maven Integration Plugin 2.12.1 .", "It is generating jacoco reports for few projects and for some of them it is giving this exception .", "You are accessing the code-coverage of jacoco via Sonar so it s more a Sonar configuration issue and not maven .", "We have a multi-module multi-language maven java project with coverage analysis with jacoco .", "After fighting very long time with Jacoco and Maven only this way it is working for me : .. . .. . 1 .", "Finally I can fix my POM so I get links to Jacoco and Surefire reports from maven site .", "trying to get my jacoco report to generate and get https : gist.github.com waater fa81a7dac99d82c5595e", "Here in the Maven configuration : .. . .. . UPDATE : I was missing this bit in the maven-failsafe-plugin plugin : .. . .. . After having added it as in : .. . .. . the integration tests report shows the integration tests .", "@codependent one thing my project also needed when using JaCoCo and Powermock was javassist try importing that into your maven file dependencies as well .", "if I understand correctly you would like to know whether jacoco would fail or not if a maven project doesn t have any test source right", "After reading a bit about the plugin on http : eclemma.org jacoco trunk doc report-integration-mojo.html I noticed that it said : .. . .. . Binds by default to the lifecycle phase : verify .", "this might be helpful : stackoverflow.com questions 27799419 http : stackoverflow.com questions 27799419 maven-jacoco-configuration-exclude-classes-packages-from-report-not-working - it does not look so bad .", "We are using jacoco for code-coverage analysis .", "Instead using inbuilt jacoco as mentioned above .", "All coverage data will be appended in the jacoco-it.exec file .", "Try using Maven 3 and maven-site-plugin-3 .", "I am using the maven-surefire-plugin version 2.17 with maven .", "In our project we have 2 code-coverage tools : sonar for CI and jacoco for local analysis driven by maven plugins like this : .. . .. . My question is there any way to maintain single exclusion list for them both", "Jacoco and PowerMockito don t work together .", "MyClassTest.java as follows : .. . .. . Anyway the coverage doesn t decrease so I guess that the class MyClass is still computed from the Jacoco report .", "If I exclude a file form jacoco it shows up in the coverage report with 0 coverage .", "I am currently using jacoco and it gives me a separate coverage report for each test .", "Cloned and built the mentioned version of jacoco https : github.com cristcost jacoco installed the jar locally different instructions here http : softwarecave.org 2014 06 14 adding-external-jars-into-maven-project and added the tests in coverage data by configuration :", "Pase the logs of mvn clean install here from the part when jacoco plugin kicks in", "I had to upgrade the Jacoco plugin from version 0.7.5 to 0.7.6 to get the exclude to be taken into account .", ".. . .. . Final note : make sure to configure the Jacoco Plugin executions within the build plugins section and not build pluginManagement plugins section .", "Have you tried using the report-aggregate http : eclemma.org jacoco trunk doc report-aggregate-mojo.html goal", "In the gwtmockito project documentation there is a JaCoCo support in the version 1.1.5 so I would expect it to work .", "Is there a way to make it work with JaCoCo or are there some other tools that can measure code-coverage of gwtmockito tests", "We use the maven target org.jacoco : jacoco-maven-plugin : prepare-agent and sonar : sonar to get a sonar build triggered from jenkins job .", "Using maven to do what maven does .", "https : github.com SonarSource sonar-examples tree master projects languages java code-coverage combined 20ut-it combined-ut-it-multimodule-maven-jacoco", "My best solution at the moment is to copy-paste the JaCoCo plugin stanza into the POM when working locally then remove it before committing to SCM .", "Could that be in the Maven build", "I am using jacoco-maven-plugin to analyze my junit tests : .. . .. . My jacoco plugin set up in my pom.xml looks like this : .. . .. . I have a class under src main java something excel that looks like this : .. . .. . My test class under src test java something excel looks like this : .. . .. . When I run this with .. . .. . I see this in the logs : .. . .. . Now if I look at the generated jacoco-ut report file I see something like this : .. . .. . As I understand it it thinks none of the lines instructions branches or methods were covered .", "Below is my failsafe and jacoco pom file snippets and I am running a maven clean verify I am also using the cargo plugin to run my war file in tomcat and I am using phantom js maven-plugin .", "I am trying to get tests runnning with maven failsafe to show up in thwe jacoco report I have split the unit and integration tests and all my tests pass and the verify runs fine .", "We are using sonar-maven-plugin : 2.7.1 .", "I have the below lines-of-code of which are indicated as not executed by Jacoco .", "If I remove the goal prepare-agent in the jacoco profile and run the same mvn command clean package -fae with the profiles jacoco arq-wildfly all my tests finish successfull but without creating the jacoco.exec file .", "We are using SonarQube 5.1 with Jacoco maven-plugin 0.7.4 and all of our slf4j logging statements such as log.debug Something happened show that only 1 of 2 branches are covered .", "UPDATE .. . .. . In case I use cobertura maven-plugin with sonar I mean if I comment this line sonar.jacoco.reportPath target sites jacoco jacoco.exec sonar.jacoco.reportPath and uncomment this one sonar.cobertura.reportPath target site cobertura coverage.xml sonar.cobertura.reportPath", "I have integrated jacoco for pax-exam based osgi tests .", "Also why are you using Jacoco seperately from SonarQube", "SonarQube has Jacoco built into it for its own code-coverage metrics .", "Scenario : I instrumented my server and attached Jacoco to JVM ." ] }
{ "confidence": [ 86.32146453857422, 80.20634460449219, 77.44865417480469, 77.12547302246094, 76.17877197265625, 75.50900268554688, 73.59786987304688, 72.52788543701172, 70.84754180908203, 70.82793426513672, 70.1072769165039, 69.52799224853516, 69.25337219238281, 68.99466705322266, 68.7415542602539, 68.51777648925781, 68.32701110839844, 68.20207214355469, 68.02706146240234, 67.80830383300781 ], "content": [ "Question : null .. . Answer : I want to use Jacoco in a way so that it excludes a Sample.java class from the overall coverage . To achieve that I have included exclude within prepare-agent goal in maven pom.xml .. . .. . Jacoco plugin : .. . .. . Surefire plugin : .. . .. . properties section : Comment : Possible duplicate of Maven Jacoco Configuration - Exclude classes packages from report not working http : stackoverflow.com questions 27799419 maven-jacoco-configuration-exclude-classes-packages-from-report-not-working Comment : You aren t setting the configuration for the right plugin . The exclusion should be for jacoco-maven-plugin but you don t have any .", "Question : We have a Maven multi-module project consisting of a parent HelloWorld and different children HelloWorldServices and HelloWorldPresentation and use Jenkins to build . The error after running the successful test is .. . .. . The lines before it says .. . .. . This is how I defined the parent-pom JaCoCo plugin : .. . .. . In no pom did I explicitly mention surefire . I also tried what you find everywhere to put the argLine in the configuration but all with the same result . The JaCoCo .exec file has never been created no matter what I do . As for the goals I use .. . .. . Since when I omit the jacoco goals it doesn t even display the INFO message . Comment : try mvn clean jacoco : prepare-agent install instead the agent between the two phases Comment : That was actually it . I love Stack Overflow : .. . Answer : You should not invoke the agent after the install phase but before so instead of invoking : .. . .. . You should invoke .. . .. . The main reason is : the agent will not participate to the build lifecycle the test phase will already be executed as part of the install phase then Maven will execute the agent as per command-line invocation but it will be too late . .. . .. . You should probably also change the plugin configuration above to : .. . .. . Note : I removed the configuration section because it was actually pointing to default values . Moreover XML elements are case sensitives here so your datafile element was simply ignored it should have been dataFile instead . The same applies to destFile . The prepare-agent http : eclemma.org jacoco trunk doc prepare-agent-mojo.html goal is already using project.build.directory jacoco.exec as default destFile value the same applied to the dataFile value for the report http : eclemma.org jacoco trunk doc report-mojo.html goal . The main reason for this change would be a more flexible and standard build not relying on artifactId as project name the default but still not mandatory and using the more generic project.build.directory property instead to point directly at target . .. . .. . Final note : make sure to configure the Jacoco Plugin executions within the build plugins section and not build pluginManagement plugins section . The pluginManagement section is meant for governance and common harmonization of versions or configurations but it will be ignored if the corresponding plugin would not be declared under build plugins . As per official Maven POM reference https : maven.apache.org pom.html .. . .. . pluginManagement : is an element that is seen along side plugins . Plugin Management contains plugin elements in much the same way except that rather than configuring plugin information for this particular project build it is intended to configure project builds that inherit from this one . However this only configures plugins that are actually referenced within the plugins element in the children . The children have every right to override pluginManagement definitions . note : bold is mine Comment : what do I need to do to make this work when only calling mvn install If I don t explicitly call the jacoco goals they won t be executed . Comment : @dasLort which version of Maven are you using I could not reproduce your issue with a sample multi-module project I didn t get any skip warning and properly got jacoco reports Comment : Maven 3.3.9 and Jenkins Maven Integration Plugin 2.12.1 . So you say you can mvn install and it will with above configuration call jacoco Comment : I found that editing the META-INF plexus default-bindings.xml file could do the trick . Sadly I think this one would be inside a jar when using the Jenkins Maven plugin . Moreover I did not find said jar not in maven-core-3.0.jar Comment : @dasLort indeed you should not change it which changes made it work", "Question : I have a report for the code-coverage by the integration test . I do have integration tests and these are run successfully in the Maven build . When I click on the Sessions link in the top right corner of the HTML report I can see my test classes in the list but I cannot see my main classes that are exercised by the tests now and all coverage report percentages are at zero . As a side note my unit test-coverage works fine with the percentages being displayed all right . My configuration looks like : .. . .. . Notice how the JaCoCo plugin is defined before the jetty one . The console log shows a log of failed connection attempts . The integration tests cannot connect to the localhost . That is because the Jetty server hasn t had the time to start before Maven ran the tests . Here is also another console log bit : .. . .. . Having the start value instead of the run-forked for the goal has the tests run fine . But I need to have it as run-forked for the code-coverage report . Using the waitForChild false waitForChild option changed nothing to the issue . How to have the Maven build wait for the Jetty server to start in forked mode before running the integration tests UPDATE : I could have the Maven build wait for the Jetty server to start in fork mode with the following maxStartupLines 200 maxStartupLines option . But now none of my integration tests although they are run fine are seen in the report . My log says : .. . .. . UPDATE : If I run the Maven command mvn jacoco : report-integration the console complains with a missing-data file : .. . .. . Indeed the data file is specified in the pom.xml file as being dataFile project.build.directory coverage-reports jacoco-it.exec dataFile .. . .. . Why is it looked up as jacoco-it.exec instead of coverage-reports jacoco-it.exec Is it because the JaCoCo report is generated before the Jetty server has had time to stop and produce the data file But why the different file path then And how to tell the JaCoCo report to wait for it UPDATE : I added a stopWait of 1 to the stop goal of the integration test : .. . .. . But it changed nothing to the issue . UPDATE : Running the build with the -X option showed the following : .. . .. . This tells me the report is being produced before the Jetty server has stopped . If that is the case then it is faulty . How to have the report produced after the Jetty server stops .. . Answer : After reading a bit about the plugin on http : eclemma.org jacoco trunk doc report-integration-mojo.html I noticed that it said : .. . .. . Binds by default to the lifecycle phase : verify . So change to : .. . .. . or just leave out the phase and it should work . Comment : I had tried that but it didn t change anything to the issue . Al percentages are still at zero . Only the test classes are seen in the Session html page . None of the main classes are . Comment : My main java code is triggered as the integration tests give a successful Maven build . But still my main java code is not listed in the Sessions web page anyway . How can I check if the Jacoco agent attached to the correct JVM that triggers my main java code", "Question : The problem discussed in JaCoCo SonarQube incompatible version 1007 http : stackoverflow.com questions 30459260 jacoco-sonarqube-incompatible-version-1007 s 1 7C3.0947 is happening again with sonarqube-maven-plugin 2.7.1 in combination with jacoco-maven-plugin 0.7.5.201505241946 .. . .. . Executing sonar : sonar results in .. . .. . According to https : jira.sonarsource.com browse SONARJAVA-1091 this should be fixed already . The java plugin in my SQ-Server installation is version 3.3 . Can anyone confirm this Comment : Which version of the sonar java plugin the version of the java plugin on your server installation are you using please note this is not the same thing as the sonarqube maven-plugin . Comment : The java plugin in my SQ-Server installation is version 3.3 . .. . Answer : The issue you are encoutering comes from a binary incompatiblity due to latest version of JaCoCo binary report . This issue has been fixed in version 3.4 of the sonar-java-plugin : https : jira.sonarsource.com browse SONARJAVA-1091 .. . .. . Please update your plugin version it should solve the issue .", "Question : I m new in Jacoco maven-plugin and trying to add coverage analysis for my test classes I m using TestNG with failsafe plugin . After checking the documentation and some tutorials I made it work on classes in Sources Root src main but couldn t manage to include the classes in Tests Root src test . My project consists of only test classes so the coverage report is required only for these . In IntelliJ there is an option Enable coverage in test folders which does what I really want . So I think there should be a way to enable these folders in plugin configurations as well . Thanks for any help Comment : Not sure what you re trying to do . Coverage measures the proportion of production code exercised by test code . What s the point in measuring the proportion of test code exercised by itself Comment : You could try out this patch to the jacoco-maven-plugin : github.com jacoco jacoco issues 271 https : github.com jacoco jacoco issues 271 Comment : @HaraldWellmann the module I m working with consist of UI automation tests and utility classes . All of them are in src test folders . If you check IntelliJ s option to include the test sources you ll see it provides a good coverage report for these too . Comment : @heenenee thanks for the tip . I ll check it out . .. . Answer : Achieved what I wanted by adding 0.7.6-SNAPSHOT version of jacoco thanks to heenenee http : stackoverflow.com users 2646526 heenenee . Cloned and built the mentioned version of jacoco https : github.com cristcost jacoco installed the jar locally different instructions here http : softwarecave.org 2014 06 14 adding-external-jars-into-maven-project and added the tests in coverage data by configuration :", "Question : null .. . Answer : I am new to using the Jacoco maven-plugin . I have a multi-module project and have set up the Jacoco plugin on my root project . The coverage report is getting generated for the projects which have junits however there are a couple of projects which have just pure java code - no junits on them yet . These are getting skipped by the plugin with the message : .. . .. . My Parent POM set up is as follows : .. . .. . Any help on how to resolve this would be great . Thanks", "Question : I have a maven multi-module project and I m using jacoco-maven for code-coverage reports . Some classes should not be reported as they re Spring configuration and I m not interested in them . I have declared the maven-jacoco plugin as follow : .. . .. . The problem is that when I execute mvn clean verify jacoco still reports classes that should have been excluded as my xml-configuration points out . How can I configure it properly .. . Answer : Your XML is slightly wrong you need to add any class exclusions within an excludes parent field so your above configuration should look like the following as per the Jacoco docs http : www.eclemma.org jacoco trunk doc report-mojo.html .. . .. . The values of the exclude fields should be class paths not package names of the compiled classes relative to the directory target classes using the standard wildcard syntax .. . .. . I have tested and my report goal reports on a reduced number of classes using the above . If you are then pushing this report into Sonar you will then need to tell Sonar to exclude these classes in the display which can be done in the Sonar settings .. . .. . Settings General Settings Exclusions Code Coverage .. . .. . Sonar Docs http : docs.sonarqube.org display SONAR Narrowing+the+Focus NarrowingtheFocus-IgnoreCodeCoverage explains it a bit more .. . .. . Running your command above .. . .. . Will show the classes have been excluded .. . .. . No exclusions .. . .. . With exclusions .. . .. . Hope this helps Comment : I had to upgrade the Jacoco plugin from version 0.7.5 to 0.7.6 to get the exclude to be taken into account . Comment : By the way . you d have an idea on displaying my tests in the jacoco-it folder stackoverflow.com questions 37485133 http : stackoverflow.com questions 37485133 have-integration-tests-in-jacoco-it-directory Comment : I wonder how to exclude not source code classes but test classes . Comment : Great tip regarding Sonar . Easy to assume that JaCoCo exclusions will automagically propogate to Sonar like I did . Comment : If I exclude a file form jacoco it shows up in the coverage report with 0 coverage . So basically I get worse results compared to no exclude . Can this be fixed", "Question : null .. . Answer : I am searching on ways for running code-coverage on few of java util library for my test cases by using a code-coverage tool like EclEmma eclipse-plugin . I am stuck at configuring rt.jar on the class path in coverage configurations . As classes are from rt.jar is there any way that we can include this jar as part of coverage analysis on the classpath of the above plugin in its coverage configuration or not sure if it is the right way of testing java library classes As i was searching i came across something Jacoco http : www.eclemma.org jacoco trunk doc .. . .. . As per my understanding Jacoco is an agent that will be attached to the JVM and will be instrumenting the bytecode of the classes and there by evaluate the code-coverage metrics I created a simple maven project exploded the rt.jar in src main java rt classes .. . .. . My test cases of core library are inside src test java .. . .. . pom.xml is following. . If I run .. . .. . Will this command instrument all the exploded rt jar classes and run the test cases so that coverage report is generated as per the documentation http : www.eclemma.org jacoco trunk doc examples build pom-offline.xml Please let me know if my approach is right", "Question : I am using the maven-surefire-plugin version 2.17 with maven . I am using jacoco-maven-plugin to analyze my junit tests : .. . .. . My jacoco plugin set up in my pom.xml looks like this : .. . .. . I have a class under src main java something excel that looks like this : .. . .. . My test class under src test java something excel looks like this : .. . .. . When I run this with .. . .. . I see this in the logs : .. . .. . Now if I look at the generated jacoco-ut report file I see something like this : .. . .. . As I understand it it thinks none of the lines instructions branches or methods were covered . Why Help : .. . Answer : The issue seems to be that maven-surefire-plugin behaves unpredictably when specified twice in a multi-module project .. . .. . My parent-pom had it in the build section and the child module pom also had it in the build section . Because of that it seemed to be running the tests but the coverage was always 0 in the child module . The fix was to remove maven-surefire-plugin from the child module pom and only have it in the build section of the parent-pom . Problem sovlved .", "Question : null .. . Answer : I am trying to get tests runnning with maven failsafe to show up in thwe jacoco report I have split the unit and integration tests and all my tests pass and the verify runs fine . I get a created integration test report in my target directory and it always shows zero coverage even though my basic test using selenium does hit some controller functions . How do I get jacoco to pick up the coverage for the selenium driven tests The unit test report is fine and shows me the code-coverage so this is just for the selenium tests I do not get any build issues and the tests do run they just dont seem to get any coverage reporting . Below is my failsafe and jacoco pom file snippets and I am running a maven clean verify I am also using the cargo plugin to run my war file in tomcat and I am using phantom js maven-plugin . Comment : Since you say you are running selenium tests and looking for code-coverage am guessing your intent here is functional code-coverage of your application . In that case have you ensured that your application has been instrumented using jacoco You would need to instrument your application code have it deployed run your selenium based functional tests against the instrumented app and then later pull the report from the instrumented app . I dont think its going to be appearing in your selenium tests side Comment : thats the idea I thought from what I had read that the instrumented code would be supplied to cargo plugin . I had made another small change since posting this which was supposed to provide the jacoco arg line to tomcat but I still get no code-coverage . Do you know how to get the instrumented code placed into the war file that the cargo plugin is running", "Question : null .. . Answer : I m working on code-coverage for a Java library . It s a SOAP REST client . The client has several packages dataTypes.generated . for the generated types for connecting to the server-side . For working with the client there is a translation layer to some more common types just in the dataTypes package that I also want to filter out of coverage . However I do have some some utility classes in dataTypes.helpers that I want to keep included . I ve tried : .. . .. . however That didn t remove it from coverage . In EclEmma I then set : .. . .. . Includes : : dataTypes helpers .. . Excludes : dataTypes : generated .. . .. . That didn t work either . It actually seemed to break something in EclEmma and code-coverage didn t display at all . I had it working at one point . I used Excludes : but that doesn t remove code from coverage it just forces coverage to 0 I d just rather not see it in the report at all . How can I do that Comment : where did you put those excludes statement It apply the inclusion exclusion in the prepare-agent goal defined by the jacoco plugin Comment : @drgn I ve updated the question with the complete plugin section for the jacoco-maven-plugin Comment : this might be helpful : stackoverflow.com questions 27799419 http : stackoverflow.com questions 27799419 maven-jacoco-configuration-exclude-classes-packages-from-report-not-working - it does not look so bad . maybe the exclusion patterns dont work like that . often multiple are not recognized . maybe generated and removing the second one so no pattern contains two Try and error it is : Comment : @Raystorm did you solve the issue since then Comment : @A . Di Matteo I ve been unable to get filtering to work from maven . I think it may be unsupported . I have gotten includes excludes working but it s been unstable . I d really like to get maven and EclEmma synced but so far I haven t had much luck .", "Question : null .. . Answer : I am using JaCoCo maven-plugin for the test-coverage reports . It works with MockitoJUnitRunner but when I use it with tests that run with GwtMockitoTestRunner annotated @RunWith GwtMockitoTestRunner.class I always get zero coverage . In the gwtmockito project documentation there is a JaCoCo support in the version 1.1.5 so I would expect it to work . Can you explain why it doesn t Is there a way to make it work with JaCoCo or are there some other tools that can measure code-coverage of gwtmockito tests", "Question : We have JaCoCo working in our POM and it runs and reports every time we run clean install . What we would really like to do is only run JaCoCo when a maven site is run . I have tried adding : .. . .. . And setting jacoco.skip to true for the build phase but in the reporting section I have added : .. . .. . But this does not work . Setting jacoco.skip to true does prevent JaCoCo running on normal maven clean install s but also appears to affect the reporting . Question : How would I configure maven so that JaCoCo runs successfully for a maven site but does not run for a mvn clean install Comment : can you share a bit more of the jacoco plugin configuration of your POM How are you running jacoco only via command-line or is there any execution configured .. . Answer : The simplest way is to delegate it to a Maven profile http : maven.apache.org guides introduction introduction-to-profiles.html removing its configuration for your build section and placing it into a profile as following : .. . .. . You can then add your custom configuration there . Then normal builds will not apply it while you could always activate it via : .. . .. . or Comment : Thanks . Using maven to do what maven does . Good answer . I added an activation block that would activate this profile by default on our Jenkins server too so that the reports are available in Jenkins but local builds that only want a swift build have JaCoCo disabled .", "Question : I want sonar to display the code quality for my project using the jacoco code-coverage reports . I am able to generate code-coverage reports using jacoco and also an executable file jacoco-ut.exec for my unit tests . When I use jenkins i get following messaages . I am using the old target folder in the project hence the build is successful Comment : What do you mean by using the old target folder I m only aware of one target folder in Maven s Standard Directory Layout . Dou you mean that you don t invoke the clean lifecycle Comment : Is there a good reason for using jacoco-maven-plugin v0.5.5 This is more than 3 years old . The latest version is 0.7.4 . http : search.maven.org search 7Cga 7C1 7Cg 3Aorg.jacoco 20a 3Ajacoco-maven-plugin .. . Answer : See sonar : sonar in maven . http : mojo.codehaus.org sonar-maven-plugin plugin-info.html .. . .. . and .. . .. . Configure various sonar . . properties in the pom or global level .xml or pass them to maven using -Dsonar . . value . For ex : Comment : Isn t convention over configuration one of Maven s basic concepts -", "Question : null .. . Answer : I have a single module maven project where I am using Jacoco for code coverag . I need to include only one class for report generation and exclude all others . From this http : stackoverflow.com questions 27799419 maven-jacoco-configuration-exclude-classes-packages-from-report-not-working I get that the plugin accepts only class paths and not package paths in the includes excludes field . My code looks like this .. . .. . Finally when the reports are generated I see that only App2 was included in the report but the code-coverage is reported as zero which is not the case . Double checked with Cobertura that the code-coverage is not zero . I tried other configurations like com mycompany app App2.class but with no change in result . What am I missing here", "Question : I want to use jacoco-maven-plugin for checking minimum level of code-coverage during build-process using check goal . For one-module project everything works fine . But for multi-module I want to check average level of code-coverage from all modules but check goal checks every module separately . For example module1 has 70 of code-coverage module2 has 100 code-coverage in average for all lines from both modules code-coverage is 85 . And I am trying to set code-coverage for all project to 80 but it fails because of first module . From pom : .. . Answer : Short answer : not possible at the time of writing using merely Maven and Jacoco . from official jacoco github page https : github.com jacoco jacoco wiki MavenMultiModule : .. . .. . The current JaCoCo Maven goals work on single modules only : Tests are executed within the module and contribute coverage only to code within the same module . Coverage reports are created for each module separately . There is no built-in support for cross-module coverage or combined reports for multiple modules . Hence your requirements cannot be met merely using Maven and Jacoco . You can however use a common approach in enterprise settings : Sonarqube which will process the generated jacoco files i.e . jacoco.exec and aggregate reporting and governance via its Jacoco integration provided out-of-the-box on its latest versions . Comment : Thanks I implemented such approach via Jacoco plugin for Jenkins", "Question : I have integration tests and they are executed fine but Jacoco considers them as unit tests . How to tell Jacoco to see them as integration tests and display their graph coverage not in the jacoco-ut directory but it the jacoco-it directory Here in the Maven configuration : .. . .. . UPDATE : I was missing this bit in the maven-failsafe-plugin plugin : .. . .. . After having added it as in : .. . .. . the integration tests report shows the integration tests . The final full configuration is : .. . Answer : You misunderstood the pattern for the include tag of maven-failsafe-plugin . The pattern is used for the package name of the classes within the test classpath see also https : maven.apache.org surefire maven-failsafe-plugin examples inclusion-exclusion.html . The build-helper-maven-plugin includes all classes in src it java to the test classpath . Then the pattern of include tag in both test plugins surefire failsafe filters the classes within this test classpath . These filtered classes are executed by the test plugins . So the workflow is .. . .. . 1 . Build-Helper-Plugin extends the set of the test classes that have to be compiled and executed . Therefore the source directive is used . The path location defined in this source directive is related to the Maven project path . 2 . Compiler Plugin compiles the java classes . 3 . Jacoco-Plugin should measure the coverage in the production classes with unit tests . Therefore the normal agent has to be prepared before the tests are executed . You can specify which production code should be included or excluded in the coverage measurment include exclude directive . The pattern in these directives are package-based shlashes are used instead of dots . 4 . Surefire-Plugin executes the tests whose full-qualified class name match the pattern of the include directive . The pattern uses slashes instead of dots . 5 . Now the Jacoco-Plugin should measure the coverage in the production classes with integration tests . Therefore the integration agent has to be prepared before the tests are executed . And again you can specify which production code should be included or excluded in the coverage measurment include exclude directive . The pattern in these directives are package-based shlashes are used instead of dots . 6 . The same for the Failsafe-Plugin . It executes the tests whose full-qualified class name match the pattern of the include directive . The pattern uses slashes instead of dots . Comment : I understand I must use a path pattern and not a package pattern . Is that right Are you saying all classes are mix together in the very same directory There is no way then to differentiate them with a sub directory name Only a class name suffix like IT can help here Comment : No the other way around . You have to use a package pattern . After compiling all compiled classes from src it java and src test java are under target test-classes the test-classpath . Then the surefire failsafe plugin executes the classes described by the pattern in the include tag . Therefore your approach using a class name suffix will help . BTW check the default suffix of the failsafe plugin maven.apache.org surefire maven-failsafe-plugin http : maven.apache.org surefire maven-failsafe-plugin integration-test-mojo.html includes to reduce the configuration . Comment : I m still confused as the doc shows path like includes . The slash means path like . The dot means package like . I tried this config : configuration destFile project.build.directory coverage-reports jacoco-it.exec destFile propertyName failsafeArgLine propertyName includes include .it . include includes configuration and include it include but these two configs didn t include anything . I have my integration tests in an it folder . You d know how to express that as an include Comment : For example you have two classes named com.example.integrationtest.ATest and com.example.unittest.BTest . ATest.java is located in src it java means failsafe should execute it and BTest.java is located under src test java means surefire should execute it . Then the include pattern for failsafe is include integration include and the pattern for surefire is include unittest include . It is a pattern for package but they use slashes instead of dots . Comment : In my last comment it should mean it s not a good approach . The reason is that you can have trouble with your structure if you tests package-protected classes . I will prefer the suffix way .", "Question : null .. . Answer : We have several different faults with our jacoco.exec file see the Error types below . Can you please help us with this problem we have at least 25 build failures due to Jacoco . Error Type 1 : .. . .. . Error type 2 : .. . .. . Error type 3 : .. . .. . Versions : .. . .. . tried both jacoco-maven-plugin : 0.7.4.201502262128 and .. . jacoco-maven-plugin : 0.7.5.201505241946 org.testng : 6.9.9 .. . org.apache.maven.plugins.maven-failsafe-plugin : 2.18 .. . org.apache.maven.plugins.maven-surefire-plugin : 2.18.1 .. . SonarQube 4.5.5 Sonar-maven-plugin 2.7.1 Comment : You are accessing the code-coverage of jacoco via Sonar so it s more a Sonar configuration issue and not maven . To get clear error details run the maven command with -X as explained in the error stack copy the updated error to the post so that we can understand what s happening .", "Question : I want to migrate from cobertura to jacoco codecoverage tool . I m using maven as build tool and I added jococo-maven-plugin in my pom.xml file . its configuration looks like this : .. . .. . So after performing mvn clean install jacoco generates me some pretty html pages with code-coverage . And this document looks exactly how I want it to look . The second step I need to perform is integrate jococo with sonar . Previously I integrated sonar with cobertura . So I simply removed cobertura specific properties and added properties related to jococo . Maven plugin .. . .. . and profile .. . .. . As a result I get such code-coverage on server : .. . .. . As a result I get such code-coverage on server http : i.stack.imgur.com t1Ms8.png .. . .. . enter image description here http : i.stack.imgur.com Ljx3Y.png .. . .. . And I see that in generated coverage report on server I see that my excluded packages are included in report . When I use cobertura everything worked fine . So may be someone could help me with this . I do not want to add exclusions for sonar configuration . I really hope that it could be some additional configuration for jococo plugin . UPDATE .. . .. . In case I use cobertura maven-plugin with sonar I mean if I comment this line sonar.jacoco.reportPath target sites jacoco jacoco.exec sonar.jacoco.reportPath and uncomment this one sonar.cobertura.reportPath target site cobertura coverage.xml sonar.cobertura.reportPath enter image description here http : i.stack.imgur.com KDlfD.png .. . Answer : The exclusions need to happen not on the JaCoCo side but on the SonarQube side and be specified via the SonarQube UI rather than in your POM . The docs will give you details : http : docs.sonarqube.org display SONAR Narrowing+the+Focus NarrowingtheFocus-IgnoreCodeCoverage Comment : Hi Ann but if I change only one line in sonar-maven plugin uncomment cobertura coverage report then sonar report looks perfect . Check update section of my question", "Question : I d like to see an example to prevent JaCoCo to report private empty constructors as non-covered code in a Java class . In the maven-plugin configuration I have .. . .. . Isn t there something similar for the constructor .. . Answer : This is not supported . The official documentation https : github.com jacoco jacoco wiki FilteringOptions says : .. . .. . Filters for Code where Test Execution is Questionable or Impossible by Design .. . .. . Private empty default constructors - assuming no calls to it .. . Plain getters and setters .. . Blocks that throw AssertionErrors - Entire block should be ignored if a condition if assertion throw new AssertionError .. . .. . see also : https : github.com jacoco jacoco issues 298 Comment : That s terrible :" ] }
[ "yes-answer-long", "yes-answer-short" ]
automated-tests
UNK_RELATION
knockout-amd-helpers@knockout.js@87
knockout-amd-helpers -- knockout-amd-helpers is a javascript extension of the popular @placeholder framework that enables support for amd asynchronous module definition and external templates .
{ "confidence": [ 100.51759338378906, 73.41509246826172, 67.55792236328125, 46.64006805419922, 42.124656677246094, 36.62001037597656, 33.2067985534668, 32.972251892089844, 32.972251892089844, 32.90005874633789, 32.82512283325195, 32.552894592285156, 32.153629302978516, 31.993816375732422, 31.75879669189453, 31.148193359375, 31.148193359375, 26.370534896850586, 26.370534896850586, 26.370534896850586, 26.370534896850586, 26.370534896850586, 26.370534896850586, 26.370534896850586, 26.370534896850586, 26.370534896850586, 20.51336097717285, 20.51336097717285, 20.51336097717285, 20.51336097717285, 20.51336097717285, 20.51336097717285, 20.51336097717285, 20.51336097717285 ], "content": [ "I m using Knockout AMD Helpers https : github.com rniemeyer knockout-amd-helpers to load ViewModels with the module binding https : github.com rniemeyer knockout-amd-helpers module-binding feature .", "Firstly I am new to knockoutjs and I have started to develop an application using knockout-amd-helpers and we are using require.js to load modules .", "It would be great if someone could add the tag knockout-amd-helpers to the question as I don t have enough reputation to do so", "Not an answer to your question but you might want to look at Durandal if you are doing advanced app stuff with AMD PubSub etc : durandaljs.com http : durandaljs.com", "I created a sample jsfiddle http : jsfiddle.net 7WKQd 19 to illustrate my issue using a delayed ajax call : .. . .. . How can I architect my code using the AMD Helpers but delaying the ApplyBindings until all my data is ready on the ViewModel", "stackoverflow.com questions 7427146 http : stackoverflow.com questions 7427146 knockout-applybindings-is-too-fast rq 1", "The entire mainContainer module needs to be replaced with a different module called detail in the same div tag .", "I figured I can achieve 1 . by setting the module name as an observable and 2 . by publishing the node value in the mainContainer on a particular topic and in the detail module I need to subscribe to that topic and pass to the module with data attribute .", "I have a temporary work around by calling the subscribe on the root module parent of detail module but it seems to me a dirty solution and ideally I would like to keep this logic in the detail module itself .", "If your module returns an object then it will be passed to the initialize function .", "I am facing the following issue with publish-subscribe : .. . .. . My main page has two section navigation and mainContainer both loaded as modules external html templates and js files and I am setting the name of the modules with observable so it can be replaced dynamically .", "So instead of binding against just an observable module name you can bind against an observable that holds a module binding config object .", "If your module returns a function constructor then the value will be passed to the function itself .", "However in the detail module even though I am subscribing to the topic that was published it fails to get hold of the value since this subscribe takes place in the detail module and the detail module has loaded once the user has clicked the node and so after publish has already taken place in the mainContainer .", "So in the onclick event of the node of the tree I am publishing the node value and changing the module name value in the observable which successfully replaces the mainContainer with the detail module .", "Based on the node in the tree that the user has clicked in the mainContainer I need to pass the value as a parameter to this detail module .", "You could consider passing the extra information as initialization data to your detail module .", "In the mainContainer there is a tree and if the user clicks on any node of the tree then two things should happen .", "1 .", "2 .", "So I am subscribing to a topic for which publish has already taken place and so wont be able to get past published values .", "This is more of a design problem so I am not posting the code but I was wondering if anybody can comment on whether I should approach this differently or if there is a technical solution to it .", "Thanks", "You would populate it like : .. . .. . With a binding like : .. . .. . Here is a sample : http : jsfiddle.net rniemeyer ctx083w3", "Thank you", "That works .", "Usually when I need to load remote data I use a deferred object to ensure that ko.ApplyBindings is only called after all my data is available on the ViewModel .", "Seems to be the like this one", "With this type of scenario applyBindings will have already happened so you would either want to just allow observable sections to update as data becomes available or control particular sections using the if or with or template bindings .", "For example you could wrap your area in a :", "Thanks .", "From a performance perspective is this the wrong way to go", "My understanding is that bindings will be changing multiple times as data gets loaded .", "I m open to alternative ways to structure this ." ] }
{ "confidence": [ 102.82829284667969, 81.38493347167969 ], "content": [ "Question : I m using Knockout AMD Helpers https : github.com rniemeyer knockout-amd-helpers to load ViewModels with the module binding https : github.com rniemeyer knockout-amd-helpers module-binding feature . Usually when I need to load remote data I use a deferred object to ensure that ko.ApplyBindings is only called after all my data is available on the ViewModel . I created a sample jsfiddle http : jsfiddle.net 7WKQd 19 to illustrate my issue using a delayed ajax call : .. . .. . How can I architect my code using the AMD Helpers but delaying the ApplyBindings until all my data is ready on the ViewModel Comment : It would be great if someone could add the tag knockout-amd-helpers to the question as I don t have enough reputation to do so Comment : Seems to be the like this one stackoverflow.com questions 7427146 http : stackoverflow.com questions 7427146 knockout-applybindings-is-too-fast rq 1 .. . Answer : With this type of scenario applyBindings will have already happened so you would either want to just allow observable sections to update as data becomes available or control particular sections using the if or with or template bindings . For example you could wrap your area in a : Comment : Thanks . From a performance perspective is this the wrong way to go My understanding is that bindings will be changing multiple times as data gets loaded . I m open to alternative ways to structure this .", "Question : Firstly I am new to knockoutjs and I have started to develop an application using knockout-amd-helpers and we are using require.js to load modules . I am facing the following issue with publish-subscribe : .. . .. . My main page has two section navigation and mainContainer both loaded as modules external html templates and js files and I am setting the name of the modules with observable so it can be replaced dynamically . In the mainContainer there is a tree and if the user clicks on any node of the tree then two things should happen . 1 . The entire mainContainer module needs to be replaced with a different module called detail in the same div tag . 2 . Based on the node in the tree that the user has clicked in the mainContainer I need to pass the value as a parameter to this detail module . I figured I can achieve 1 . by setting the module name as an observable and 2 . by publishing the node value in the mainContainer on a particular topic and in the detail module I need to subscribe to that topic and pass to the module with data attribute . So in the onclick event of the node of the tree I am publishing the node value and changing the module name value in the observable which successfully replaces the mainContainer with the detail module . However in the detail module even though I am subscribing to the topic that was published it fails to get hold of the value since this subscribe takes place in the detail module and the detail module has loaded once the user has clicked the node and so after publish has already taken place in the mainContainer . So I am subscribing to a topic for which publish has already taken place and so wont be able to get past published values . I have a temporary work around by calling the subscribe on the root module parent of detail module but it seems to me a dirty solution and ideally I would like to keep this logic in the detail module itself . This is more of a design problem so I am not posting the code but I was wondering if anybody can comment on whether I should approach this differently or if there is a technical solution to it . Thanks Comment : Not an answer to your question but you might want to look at Durandal if you are doing advanced app stuff with AMD PubSub etc : durandaljs.com http : durandaljs.com .. . Answer : You could consider passing the extra information as initialization data to your detail module . If your module returns a function constructor then the value will be passed to the function itself . If your module returns an object then it will be passed to the initialize function . So instead of binding against just an observable module name you can bind against an observable that holds a module binding config object . You would populate it like : .. . .. . With a binding like : .. . .. . Here is a sample : http : jsfiddle.net rniemeyer ctx083w3 Comment : Thank you That works ." ] }
[ "yes-answer-long", "yes-answer-short" ]
knockout.js
UNK_RELATION
video-card@graphics@58
video-card -- a video-card display card graphics card or @placeholder adapter is an expansion card which generates a feed of output images to a display .
{ "confidence": [ 78.06295013427734, 77.56237030029297, 77.56237030029297, 73.812255859375, 72.28998565673828, 69.25254821777344, 69.25254821777344, 67.34828186035156, 67.19850158691406, 63.64793395996094, 62.800559997558594, 62.800559997558594, 62.49235153198242, 62.36674499511719, 61.92219543457031, 61.07482147216797, 61.07482147216797, 61.07482147216797, 61.07482147216797, 61.07482147216797, 59.648536682128906, 58.85602569580078, 58.128509521484375, 57.836639404296875, 57.836639404296875, 56.24266052246094, 56.11090087890625, 56.11090087890625, 56.11090087890625, 55.869117736816406, 55.54964065551758, 54.16358184814453, 54.10975646972656, 54.10975646972656, 54.10975646972656, 54.10975646972656, 54.10975646972656, 54.10975646972656, 54.10975646972656, 53.42371368408203, 53.26115417480469, 53.07704162597656, 52.570220947265625, 52.38401794433594, 52.38401794433594, 51.61078643798828, 51.44873809814453, 51.44873809814453, 51.44873809814453, 51.44873809814453, 51.44873809814453, 51.44873809814453, 51.44873809814453, 51.44873809814453, 51.442508697509766, 51.442508697509766, 50.939849853515625, 50.00885772705078, 50.00885772705078, 50.00262451171875, 49.91375732421875, 48.283119201660156, 48.283119201660156, 48.283119201660156, 48.283119201660156, 48.276885986328125, 48.276885986328125, 48.094764709472656, 47.53263854980469, 47.39569854736328, 47.071617126464844, 47.0650634765625, 47.0650634765625, 47.0650634765625, 47.0650634765625, 46.25874710083008, 45.929107666015625, 45.87896728515625, 45.82965850830078, 45.21808624267578, 44.97673034667969, 43.53684997558594, 43.53684997558594, 43.492347717285156, 43.33409118652344, 42.83338165283203, 41.89421081542969, 41.89421081542969, 41.81111145019531, 41.81111145019531, 41.78355407714844, 41.46797561645508, 41.29212951660156, 41.107643127441406, 40.05781555175781, 39.85224914550781, 39.652626037597656, 38.14373016357422, 38.12651062011719 ], "content": [ "Video modes depend on the video-card .", "8086 is a processor not a video-card .", "It s certanly the video-card", "@Will A : What is your video-card", "i have a video-card gfx win8 8.1 64 15.33.19.3540", "And the only solution to my problem is to buy a video-card .", "With assembly is possible to write directly in the video memory card .", "It seems that the PCs with Intel video-card doesn t have hardware-acceleration or don t know where is it it s a integrated card in a laptop .", "I would like to get the display adapter card memory size .", "What external graphics card do you have", "Unfortunately my PC currently don t have video-card .", "It may need to prevent all the applications to write data into the video-card memory .", "I have purchased a graphics card which supports OpenGL 4.2 .", "and not my AMD graphic video-card .. . .. . When I type on terminal fglrxinfo : .. . .. . And according to this https : help.ubuntu.com community BinaryDriverHowto AMD in section 3 my AMD graphics video-card is installed and working .", "Does this mean I need a new graphics card", "Information on video-card programing and device-driver development are scarce and arcane .", "Easiest way would be to get a newer video-card and associated drivers .", "When looking for a new video-card what indicates if it supports modesetting", "I really want to put my graphic video-card to work .", "How does it keep the video-card from going to sleep", "I recently switched my graphics card from a Radeon HD 7770 to an MSI GTX 970 because my Radeon card died .", "The long story is : I recently bought a Dell laptop with Ubuntu 14.04 and with a AMD graphics video-card .", "I am interested in a way how to read GPU temperature graphics processing unit main chip of graphic card by using some video-card driver API", "I solely exploit my graphics-card capabilities in Windows while gaming .", "Then I thought it probably has something to do with the graphics card .", "Is there a way to discover CUDA sm xx version by card name", "This will bring up a window with information about your graphics card .", "Does the graphics card take an ordered list of bitmaps or a tree of bitmaps", "Type dxdiag to access a diagnostic tool that lists the graphics card information .", "How to get the following information : shared system memory total available memory and system video memory for my graphics card in c sharp", "And so what does it mean that my video-card is supported openGL 4.x", "Here it was : GL version : 3.0.0 - Build 8.15.10.2291 Error compiling shader type 35633 : ERROR : 0 : 1 : : Version number not support ed by OGL driver The video-card of my laptop is GT520M but I ve already updated my video-card driver to the version340.82 which is said to support OpenGL 4.5 and GLSL 4.50 .", "So we ve got a little graphical doohickey that needs to run in a server environment without a real video-card .", "Unfortunately our dev server HAS a video-card so I can t really show what I ve tried .", "If your video-card maker didn t provide any performance counters for the GPU there aren t any for you to get .", "Can I upgrade the OpenGL version in my PC without buying a video-card", ": I already bought my pc a video-card and I can build and run cocos2dx sample project now .", "I don t know if there is any API about video-card drivers that can help .", "It seems to me that watching the video sort of jump started the card and made it perform on the processing sketch properly .", "but I m not sure if a computer will accept to boot without a video-card inside his chest.. . For wayland I would be suprise if that will work without graphic card.. . but I don t know about it .", "@BenVoigt I meant if you look for a performance counter for video or GPU and you don t find one your video-card manuf .", "Any ideas how to acquire that elusive card", "I figured I could just buy a DVI splitter and a low-end Radeon-card and disable the PCI-slot of the high-end card in Linux .", "So the answer is no the video-card chip it s the PowerVR BTW does not take an ordered bunch of layers .", "I assume that having a different video-card that supports modesetting would also resolve the issue correct", "Do want to completely avoid using interrupts also in changing the video mode create a custom video mode only by tweaking the video-card registers directly or only do the drawing by writing directly to the video memory", "I may be able to get a new Graphics Card but I am not sure so any advice would be wonderful .", "Your best bet is to get a graphics card from one of the major vendors Nvidia or AMD .", "That is what I thought quick question is any graphics card compatible with any computer", "Well with an old graphics card you cannot expect to have the latest features up and running at maximum performance right", "It is not that old of a graphics card so I expected it to be able to run modern day applications it sucks that Intel is so behind with OpenGL .", "I am pretty new to assembly language and I want to interface with a graphics card to draw a pixel or something .", "Is there a website source that can tell you if graphics card X with driver version Y supports OpenGL extension Z", "That would be because you are using your laptop s integrated graphics Intel HD instead of the dedicated card GT 520M .", "Your graphic card will have the backward compatibility with OpenGl 2.0 app .", "How can I discover whether that card has SM 12 or higher", "In the object editor window check the field AdapterRam which has the graphics card RAM in bytes .", "My graphics-card uses 110 watt idle whereas a low-end Radeon HD5xxx only uses 5 watt .", "I am to draw some shapes under Intel 8086 without using interrupts but rather by directly accessing the graphics card .", "This depends on more than just the version of OpenGL that your card supports .", "I see this project split in two layers : one to deal with video-card detection and keyboard shortcut management and another to actually tweak the video adapter having some sort of hardware abstraction-layer in between .", "To simplify we don t consider the Implicit animation in the CA framework What is actually happening down in the graphics card handling layer", "What am I missing to be able to see the set THEMES at boot via the new graphics card .", "You could try changing your primary monitor to be the monitor that is attached to the stronger graphics card .", "To check graphics card type Windows : .. . .. . Open the Windows Run dialog box Click Start Run .", "First download driver from card vendor not from Microsoft .", "I m interested in learning how to do it for each different card driver .", "If the desktop is running on the integrated card wouldn t it make sense that you d need to duplicate using that adapter to begin with", "Although many external graphics card exist which connect to a PCi slot I didn t come across any USB ones .", "Does anyone know how to make eclipse or netbeans use the graphics card in optimus laptops by invoking optirun bumblebee inside the IDE so that one can just use the run button in the IDE to run the program in a graphics card within the IDE .", "Some one told me to try CUDA programming but it only works on Nivida video-card and I need my program to be suitable for all kinds of video cards .", "It would eventually useful for me to know how to get more usefull datas from the video-card and the drivers used by it on the running computer .", "It is entirely possible that on Linux a given X server accesses part of the video-card memory directly as a framebuffer http : en.wikipedia.org wiki Linux framebuffer .", "the error of Genymotion when i start the API23-6.0.0 .. . .. . so how to know if my video-card supports OpenGL ES 2.0 and if there how to update it", "The obvious solution is to turn off the power-management feature that turns the screen and video-card off but I m looking for something more user friendly .", "I am running a 64-bit system with 16GB of DDR3 on the motherboard and 4GB of GDDR5 on the graphics card .", "One solution would be to duplicate the output of Intel card because everything goes through it but EnumOutputs returns no outputs for it .", "According to the VS.Net 2010 site http : www.microsoft.com visualstudio en-us products 2010-editions premium overview you need a DirectX 9 capable video-card running at 1024 x 768 or higher-resolution display .", "My question is : When learning from the book how do I know which functions and methods explained in the book I can use with my video-card and which ones I can t", "I want to program an external graphics card I m just looking for a way to get the GPU instructions to get to my device and get back the pixel array .", "I am on an Asus Laptop so could I just buy a Nividia card and install it", "After several tests the only difference between the PC with the issue and the PC with the correct behaviour is the graphic card .", "You can compare it with the 4.3 reference card http : www.khronos.org files opengl43-quick-reference-card.pdf to know the difference .", "EDIT : I have already tried to start Visual Studio 13 or my program with the stronger graphics card but it is always using the weaker one .", "But I want to develop an application which should support OpenGL 2.0 .. . .. . Does my card will support OpenGL 2.0 apps Backward compatibility", "But my video-card Nvidia GeForce 9500GT supports only OpenGL 3.3 that is what I found when checking GPU Caps Viewer http : www.ozone3d.net gpu caps viewer .", "Alternatively you can run optirun netbeans but that means that the nvidia card will always be on even if you are programming which increases power use and increase the heat .", "Another resource is OpenGL 3.2 reference card http : www.khronos.org files opengl-quick-reference-card.pdf which lists them neatly .", "You should be able to extract info about the graphic card through WMI and the Win32 VideoController class .", "so the workaround is to ask the user to force usage of Intel card in NVIDIA Control panel .", "This solution works perfectly for me : I can debug Java code inside Eclipse which calls native-code involving CUDA optimizations and Bumblebee only activates the discrete graphics card when necessary .", "You ve correctly identified that the internal memory speed of a graphics card is significantly higher than the speed it can communicate with external devices particularly system RAM .", "I m working on drawing some shapes directly using the graphics card without interrupts for Intel 8086 TASM and I read that the 7th bit in the byte responsible for background and foreground colours can make the characters blink .", "But after many many attempt I forgot my graphic video-card and just want to make my SDL code work well without errors or memory leak .", "I also have an nVidia graphics card installed for which I have already installed drivers for and followed the debian plymouth guide from here https : wiki.debian.org plymouth .", "With this information I open a terminal and run : .. . .. . Another hint if you have to open and close the program frequently run optirun bash in a different tab so that preparing the use of the graphics card becomes faster .", "enter image description here http : i.stack.imgur.com VWUVN.png .. . .. . Not sure how much correct is my may of comparison but you can see that winapi says that DISPLAY1 belongs-to Intel card and directx says DISPLAY1 belongs-to NVIDIA card .", "The only chance you would have would be to get the spec of the chip card which is in the slot and see if there is a bit you can set on it which would disable it or put it into some low power mode .", "Except this time it is not 1 bitmap but a tree or a linked-list of bitmaps and the graphics card constantly use the Painter s Model to paint those bitmaps with position and opacity onto the main screen ." ] }
{ "confidence": [ 83.58644104003906, 81.30799865722656, 76.54769897460938, 76.00100708007812, 75.496826171875, 73.29480743408203, 72.86647033691406, 72.41310119628906, 70.589599609375, 70.55220794677734, 69.64871215820312, 68.51911926269531, 68.47652435302734, 68.2988052368164, 68.02996826171875, 67.76956939697266, 66.3734130859375, 65.75699615478516, 65.31475830078125, 65.30338287353516 ], "content": [ "Question : I am to draw some shapes under Intel 8086 without using interrupts but rather by directly accessing the graphics card . The problem is I don t know how performing such operations is called so I can t even google anything on it . All I know is that this mode works on 80x25 resolution and is located on b800h in the memory . I tried googling 8086 graphics mode 8086 text mode drawing without interrupts and such but no hits whatsoever . Could you please tell me how such drawing is called so that I can read on it Comment : Do want to completely avoid using interrupts also in changing the video mode create a custom video mode only by tweaking the video-card registers directly or only do the drawing by writing directly to the video memory The former is more difficult the latter may be simple depending on the video mode see stackoverflow.com questions 14081088 dot-2-pixels-together http : stackoverflow.com questions 14081088 dot-2-pixels-together 14081142 . BIOS VGA video mode 0x13 320x200x8bits is the easiest . There is no such thing as 8086 graphics mode or 8086 text mode . 8086 is a processor not a video-card . Video modes depend on the video-card . .. . Answer : With assembly is possible to write directly in the video memory card . In text mode which you are referring to memory graphic starts from location b800h and each couple of bytes refer to the character to display and the color . Here is some sample code it runs on dosbox or on a real dos box . Comment : If you have some that would make your answer far more useful .", "Question : the error of Genymotion when i start the API23-6.0.0 .. . .. . so how to know if my video-card supports OpenGL ES 2.0 and if there how to update it i have a video-card gfx win8 8.1 64 15.33.19.3540 .. . Answer : I think gfx win8 8.1 64 15.33.19.3540 is name of grafic driver . To check graphics card type Windows : .. . .. . Open the Windows Run dialog box Click Start Run . Type dxdiag to access a diagnostic tool that lists the graphics card information . To determine the OpenGL version install the OpenGL Extensions Viewer .", "Question : I am interested in a way how to read GPU temperature graphics processing unit main chip of graphic card by using some video-card driver API Everyone knows that there two different chip manufacturers popular ones at least - ATI and nVIDIA - so there are two different kinds of drivers to read temperature from . I m interested in learning how to do it for each different card driver . Language in question is irrelevant - it could be C C++ .NET platform Java but let s say that .NET is preferred . Anyone been doing this before .. . Answer : I found this : AMD Display Library SDK ADL for short . That covers ATI cards . http : developer.amd.com gpu adlsdk Pages default.aspx", "Question : On iOS I was able to create 3 CGImage objects and use a CADisplayLink at 60fps to do .. . .. . inside the ViewController and each time an image is set to the view s CALayer contents which is a bitmap . And this all by itself can alter what the screen shows . The screen will just loop through these 3 images at 60fps . There is no UIView s drawRect no CALayer s display drawInContext or CALayer s delegate s drawLayerInContext . All it does is to change the CALayer s contents . I also tried adding a smaller size sublayer to self.view.layer and set that sublayer s contents instead . And that sublayer will cycle through those 3 images . So this is very similar to back in the old days even on Apple or even in King s Quest III era which are DOS video games where there is 1 bitmap and the screen just constantly shows what the bitmap is . Except this time it is not 1 bitmap but a tree or a linked-list of bitmaps and the graphics card constantly use the Painter s Model to paint those bitmaps with position and opacity onto the main screen . So it seems that drawRect CALayer everything were all designed to achieve this final purpose . Is that how it works Does the graphics card take an ordered list of bitmaps or a tree of bitmaps and then constantly show them . To simplify we don t consider the Implicit animation in the CA framework What is actually happening down in the graphics card handling layer and actually is this method almost the same on iOS Mac OS X and on the PCs this question aims to understand how our graphics programming actually get rendered in modern graphics cards since for example if we need to understand UIView and how CALayer works or even use CALayer s bitmap directly we do need to understand the graphics architecture . .. . Answer : You ve got a reasonable intuition here but there are still several steps between contents and the display . First off contents doesn t have to be a CGImage . It is often a private class called CABackingStorage which is not quite the same thing . In many cases there are hardware optimizations going on to bypass rendering the image into main memory and then copying it to video memory . And since the contents of various layers are all composited together you re still a ways from the real display memory . Not to mention that modifications to contents just directly impacts the model layer not the presentation or render layers . Plus there are CGLayer objects that can store their image directly in video memory . There s a lot of different stuff going on . So the answer is no the video-card chip it s the PowerVR BTW does not take an ordered bunch of layers . It takes lower-level data in ways that are not well documented . Some things particularly parts of Core Animation and perhaps CGLayer appear to be wrappers around OpenGL textures but others are probably Core Graphics directly accessing the hardware itself . Once you get to this level of the stack it s all private and can change from version to version and from device to device . You also may find Brad Larson s response useful here : iOS : is Core Graphics implemented on top of OpenGL http : stackoverflow.com questions 7558636 ios-is-core-graphics-implemented-on-top-of-opengl .. . .. . You may also be interested in Chapter 6 of iOS : PTL http : iosptl.com book . While it doesn t go into the implementation specifics it does include a lot of practical discussion of how to improve drawing performance and best utilize the hardware with Core Graphics . Chapter 7 details all the developer-accessible steps involved in CALayer drawing .", "Question : I am to draw some shapes under Intel 8086 without using interrupts but rather by directly accessing the graphics card . The problem is I don t know how performing such operations is called so I can t even google anything on it . All I know is that this mode works on 80x25 resolution and is located on b800h in the memory . I tried googling 8086 graphics mode 8086 text mode drawing without interrupts and such but no hits whatsoever . Could you please tell me how such drawing is called so that I can read on it Comment : Do want to completely avoid using interrupts also in changing the video mode create a custom video mode only by tweaking the video-card registers directly or only do the drawing by writing directly to the video memory The former is more difficult the latter may be simple depending on the video mode see stackoverflow.com questions 14081088 dot-2-pixels-together http : stackoverflow.com questions 14081088 dot-2-pixels-together 14081142 . BIOS VGA video mode 0x13 320x200x8bits is the easiest . There is no such thing as 8086 graphics mode or 8086 text mode . 8086 is a processor not a video-card . Video modes depend on the video-card . .. . Answer : A reference for accessing the VGA video cards http : www.osdever.net FreeVGA vga vgamem.htm can be found here . If you can t find more detailed information you can always use an interrupt call and then debug and see what it is doing .", "Question : null .. . Answer : I m learning GLSL to do some computer graphics experiment now . While I tried to compile shaders from some tutorials I ran into some problems . Here it was : GL version : 3.0.0 - Build 8.15.10.2291 Error compiling shader type 35633 : ERROR : 0 : 1 : : Version number not support ed by OGL driver The video-card of my laptop is GT520M but I ve already updated my video-card driver to the version340.82 which is said to support OpenGL 4.5 and GLSL 4.50 . Comment : So which version did you specify What happens if you try to compile your shader without specifying a version Comment : Since my OpenGL version is 3.0.0 the glsl version is 1.30 . In the vertex-shader the key word layout produce a error which belongs-to a higher glsl version . Comment : Please post the exact version line you have in your shader . You know that glsl versions are given without the . so it should be version 130 in your case . Comment : Sorry my mistake . This what i got using glGetString GL SHADING LANGUAGE VERSION GLSL version : 1.30 - Intel Build 8.15.10.2291 the verison line in shader is version 330 .But what i am puzzled is why the OpenGL version is not updated to 4.5 after I updated the video-card driver to 340.82 Comment : That would be because you are using your laptop s integrated graphics Intel HD instead of the dedicated card GT 520M .", "Question : I m running Debian 6.0.7 Squeeze and installed Plymouth to get a splash-screen to cover up the system calls that appear on boot . I also have an nVidia graphics card installed for which I have already installed drivers for and followed the debian plymouth guide from here https : wiki.debian.org plymouth . Instead of seeing the THEME that I set i get a blue and white progress-bar to appear at the bottom of the screen . What am I missing to be able to see the set THEMES at boot via the new graphics card . Comment : legacy system have to use squeeze : .. . Answer : That is expected and happens because NVIDIA proprietary driver does not support kernel modesetting so a graphical animation cannot be displayed at boot . Instead Plymouth falls back to the default textual theme . Comment : do you know if there is a work around for this I assume that having a different video-card that supports modesetting would also resolve the issue correct Comment : 1 . Unfortunately no . No workaround in your situation AFAIK unless you could use the open-source driver but Squeeze s version might be too old . Have a look if there is a recent kernel in backports but I assume you won t change a critical part of the system only because of an animation at boot : 2 . Yes Intel videocards support modesetting and will display graphic animation at boot . Comment : thanks for update . I m not tied to Plymouth is there an alternative technology available for splash screens Comment : Unfortunately no . Kernel modesetting is necessary for displaying a graphical animation at boot . Comment : When looking for a new video-card what indicates if it supports modesetting", "Question : I have a problem with my first JMonkeyEngine program . I am getting this : .. . .. . I know this is because I need GLSL and OpenGL2 found here http : jmonkeyengine.org forum topic where-can-i-get-glsl-and-opengl2 but I seem to already have the latest graphics card driver : .. . .. . The best driver software for your device is already installed http : i.stack.imgur.com I5BQs.png .. . .. . How can I fix this note : I am following the tutorial here http : jmonkeyengine.org wiki doku.php jme3 3abeginner 3ahello simpleapplication .. . Answer : Windows supports OpenGL 1.4 or something similar . You should download drivers from vendors website . e.g . NVidia website Comment : Does this mean I need a new graphics card Comment : First download driver from card vendor not from Microsoft . Microsoft does not support latest versions of OpenGL Comment : + you do not say what video adapter you have .", "Question : I tried to build sample projects in cocos2d-x . When I run the exe files there s a pop window that tells me that OpenGL 1.5 or higher is needed and I should update my drivers . Unfortunately my PC currently don t have video-card . Can I upgrade the OpenGL version in my PC without buying a video-card My PC currently uses Intel G33 G31 Express Chipset Family . .. . Answer : I found out here http : h30434.www3.hp.com t5 Desktop-Audio-Video-Monitors opengl-driver-for-intel-g31-g33-chipset td-p 957541 that Intel G33 G31 Express Chipset Family can support of up to OpenGL 1.4 only . And the only solution to my problem is to buy a video-card .", "Question : null .. . Answer : I am starting to learn SDL and I am following some tutorials on internet . I wrote a simple code that shows the window for 2 seconds on screen : .. . .. . When I run it it works well . But if I run it with Valgrind many invalid read and other errors are shown . To see the errors see here http : pastebin.com Gawkw4Uf .. . .. . All of them it seems to be related with fglrx dri.so . The long story is : I recently bought a Dell laptop with Ubuntu 14.04 and with a AMD graphics video-card . I could not install it . I tried a lot of ways to install it but failed . So when I type on terminal lspci grep VGA shows : .. . .. . So I am using my integrated graphics . and not my AMD graphic video-card .. . .. . When I type on terminal fglrxinfo : .. . .. . And according to this https : help.ubuntu.com community BinaryDriverHowto AMD in section 3 my AMD graphics video-card is installed and working . But it isn t . So back to my SDL problem when I was running my first SDL program an error libGL error : dlopen usr lib fglrx dri i965 dri.so failed usr lib fglrx dri i965 dri.so : cannot open shared object file : No such file or directory was shown . I opend this http : stackoverflow.com questions 34215617 error-running-simple-code-sdl question but I can t solve it . So I copyed the file i965 dri.so to directory usr lib fglrx dri . This makes this error disappear . So anyone has an idea why this is occurring I really want to put my graphic video-card to work . But after many many attempt I forgot my graphic video-card and just want to make my SDL code work well without errors or memory leak . Thanks Comment : I don t think your valgrind results related to driver problems although it may be but general rule is not every code piece is very good and if authors never used valgrind and didn t fixed detected problems - you re out of luck and will either have to live with that or blacklist this entries so valgrind woudln t report them again . Comment : I found this http : valgrind.org docs manual dist.readme-missing.html . Will solve just the first error or perhaps all of them . Comment : On the second thought it might not be an error at all but memory valgrind don t know about e.g . virtualised GPU memory .", "Question : I am interested in a way how to read GPU temperature graphics processing unit main chip of graphic card by using some video-card driver API Everyone knows that there two different chip manufacturers popular ones at least - ATI and nVIDIA - so there are two different kinds of drivers to read temperature from . I m interested in learning how to do it for each different card driver . Language in question is irrelevant - it could be C C++ .NET platform Java but let s say that .NET is preferred . Anyone been doing this before .. . Answer : For nVidia you would use nvcpl.dll . Here s the documentation : .. . http : developer.download.nvidia.com SDK 9.5 Samples DEMOS common src NvCpl docs NVControlPanel API.pdf Comment : Although this is a partial answer to my question as stated in answer covers only nVidia I ll mark it as answer . See below for my own ATI-related findings .", "Question : On iOS I was able to create 3 CGImage objects and use a CADisplayLink at 60fps to do .. . .. . inside the ViewController and each time an image is set to the view s CALayer contents which is a bitmap . And this all by itself can alter what the screen shows . The screen will just loop through these 3 images at 60fps . There is no UIView s drawRect no CALayer s display drawInContext or CALayer s delegate s drawLayerInContext . All it does is to change the CALayer s contents . I also tried adding a smaller size sublayer to self.view.layer and set that sublayer s contents instead . And that sublayer will cycle through those 3 images . So this is very similar to back in the old days even on Apple or even in King s Quest III era which are DOS video games where there is 1 bitmap and the screen just constantly shows what the bitmap is . Except this time it is not 1 bitmap but a tree or a linked-list of bitmaps and the graphics card constantly use the Painter s Model to paint those bitmaps with position and opacity onto the main screen . So it seems that drawRect CALayer everything were all designed to achieve this final purpose . Is that how it works Does the graphics card take an ordered list of bitmaps or a tree of bitmaps and then constantly show them . To simplify we don t consider the Implicit animation in the CA framework What is actually happening down in the graphics card handling layer and actually is this method almost the same on iOS Mac OS X and on the PCs this question aims to understand how our graphics programming actually get rendered in modern graphics cards since for example if we need to understand UIView and how CALayer works or even use CALayer s bitmap directly we do need to understand the graphics architecture . .. . Answer : Modern display libraries such as Quartz used in iOS and Mac OS use hardware accelerated compositing . The workings is very similar to how computer graphics libraries such as OpenGL work . In essence each CALayer is kept in as a separate surface that is buffered and rendered by the video hardware much like a texture in a 3D game . This is exceptionally well implemented in iOS and this is why the iPhone is so well-known for having a smooth UI . In the old days i.e . Windows 9x Mac OS Classic etc the screen was essentially one big framebuffer and everything that was exposed by e.g . moving a window had to be redrawn manually by each application . The redrawing was mostly done by the CPU which put an upper limit on animation performance . Animation were usually very flickery due to the redrawing involved . This technique was mostly suited for desktop applications without too much animation . Notably Android uses or at least used to use this technique which is a big problem when porting iOS applications over to Android . Games of the old days days e.g . DOS arcade machines etc also used a lot on Mac OS classic something called sprite animation http : en.wikipedia.org wiki Sprite 28computer graphics 29 was used to improve performance and reduce flickering by keeping the moving images in offscreen buffers that were rendered by the hardware and synchronized with the monitor s vblank which meant that animations were smooth even on very low-end systems . However the size of these images were very limited and the screen resolutions were low only about 10-15 of the pixels of even an iPhone screen of today .", "Question : null .. . Answer : Is there any way in any Linux-based OS to access the instructions sent to have it transfer the instructions meant for the GPU to an external device connected via USB3.0 and obviously get the pixel output back In Windows there is no native support for this kind of thing . Although many external graphics card exist which connect to a PCi slot I didn t come across any USB ones . Is there any way to accomplish this with native support of any of the Linux OSes EDIT : I was misunderstood as far as I can see the comments . I want to program an external graphics card I m just looking for a way to get the GPU instructions to get to my device and get back the pixel array . Comment : What external graphics card do you have Look up name of device linux support on Google and see if it s supported . Edit : this thread on the Ubuntu SE https : askubuntu.com questions 251500 usb-display-adapter-with-linux-ubuntu-drivers may be helpful Comment : Also asking about device support doesn t really seem like a programming question . Why don t you try SuperUser https : superuser.com Comment : I didn t come across any USB ones . Then you didn t really look very hard.. . Comment : I think you misunderstood me . I want to program a device like so . But how should the driver work", "Question : I have purchased a graphics card which supports OpenGL 4.2 . But I want to develop an application which should support OpenGL 2.0 .. . .. . Does my card will support OpenGL 2.0 apps Backward compatibility Then how to ensure backwards-compatibility .. . .. . I have planned to use GLUT GLFW C++ libraries . .. . Answer : Your graphic card will have the backward compatibility with OpenGl 2.0 app . You do not need to do anything special", "Question : null .. . Answer : I have a 3 monitor setup currently . I have 2 ASUS VS247 monitors along with 1 AOC 2251w monitor . I recently switched my graphics card from a Radeon HD 7770 to an MSI GTX 970 because my Radeon card died . Ever since installing the new card however whenever I turn off my computer put my computer into sleep-mode the AOC monitor will power back on show a display with the LED turning from orange to blue but the other 2 VS247 monitors LEDs stay orange and do not show a display and remain black unless I specifically press the change input button . One of the ASUS monitors is plugged into the HDMI port the other is plugged into a DVI port . I honestly have no idea why this happens and I believe that I have the most recent drivers installed for both the GTX 970 and the monitors . I am also using Windows 10 if that matters . Any advice is greatly appreciated . Thanks", "Question : The problem : calling IDXGIOutput1 : : DuplicateOutput method https : msdn.microsoft.com en-us library windows desktop hh404600 v vs.85 .aspx returns DXGI ERROR UNSUPPORTED when you run an application using discrete graphics controller on a machine with switchable graphics . This answer http : superuser.com a 586811 shed some light on the issue . In short the discrete graphics renders only a part of the screen and sends the data to the framebuffer of the intergrated graphics controller -- in other words all output always goes through the integrated graphics controller . It seems that this is why DuplicateOutput returns DXGI ERROR UNSUPPORTED . I wrote a sample that gets all outputs and their videoadapters using winapi EnumDisplayDevices function https : msdn.microsoft.com en-us library windows desktop dd162609 28v vs.85 29.aspx directx IDXGIFactory : : EnumAdapters method https : msdn.microsoft.com en-us library windows desktop bb174538 28v vs.85 29.aspx IDXGIAdapter : : EnumOutputs method https : msdn.microsoft.com en-us library windows desktop bb174525 28v vs.85 29.aspx to compare on a machine with switchable graphics Intel HD 4600 NVIDIA 840M . This is the result : .. . .. . enter image description here http : i.stack.imgur.com VWUVN.png .. . .. . Not sure how much correct is my may of comparison but you can see that winapi says that DISPLAY1 belongs-to Intel card and directx says DISPLAY1 belongs-to NVIDIA card . One solution would be to duplicate the output of Intel card because everything goes through it but EnumOutputs returns no outputs for it . Currently there is a workaround : always run an application that uses Duplication API using the integrated graphics controller . The question : how to make DuplicateOutput work with the discrete graphics controller on a laptop with switchable graphics Or it is a limitation of the Desktop Duplication API Comment : How is your workaround a workaround If the desktop is running on the integrated card wouldn t it make sense that you d need to duplicate using that adapter to begin with What s your goal in duplicating the desktop using the discrete adapter Comment : @MooseBoys my goal is just duplicate the screen it does not matter using which adapter . usage of the integrated or discrete adapter is determined by NVIDIA settings not by me as a developer . by default for a heavy WPF app the discrete adapter will be selected and only its dxgi object will have the output duplicating which returns DXGI NOT SUPPORTED because actually everything goes through the integrated adapter -- see the picture . so the workaround is to ask the user to force usage of Intel card in NVIDIA Control panel . and the question is whether there is a way without workarounds .. . Answer : solved : .. . .. . unfortunately this issue occurs because the Desktop Duplication API does not support being run against the discrete GPU on a Microsoft Hybrid system . By design the call fails together with error-code DXGI ERROR UNSUPPORTED in such a scenario . .. . To work around this issue run the application on the integrated GPU instead of on the discrete GPU on a Microsoft Hybrid system . from here : https : support.microsoft.com en-us kb 3019314", "Question : I am about to start learning OpenGL with the book : OpenGL SuperBible 6th edition . I am an absolute beginner so if my question will seem strange it means I need some extra explanations . The book states : .. . .. . This book covers version 4.3 of the OpenGL specification . But my video-card Nvidia GeForce 9500GT supports only OpenGL 3.3 that is what I found when checking GPU Caps Viewer http : www.ozone3d.net gpu caps viewer . My question is : When learning from the book how do I know which functions and methods explained in the book I can use with my video-card and which ones I can t Comment : This depends on more than just the version of OpenGL that your card supports . The driver may not implement compatibility profiles in which case you must limit yourself to the core profile specification . Otherwise you will access to legacy stuff . There are two versions of the OpenGL specification beginning with GL 3.1 for precisely this reason . Comment : It is to be noted that the SuperBible sticks to core profile only . This is written upfront in the Introduction . .. . Answer : The functions which are part of OpenGL 3.3 are listed in its man pages http : www.opengl.org sdk docs man3 . If the function talked about in the book is not listed in this then that function would be part of OpenGL 4 or above . The man pages strictly have only what is absoluted mandated for that particular version of OpenGL . OpenGL 4 man pages http : www.opengl.org sdk docs man4 are also there to verify against . Another resource is OpenGL 3.2 reference card http : www.khronos.org files opengl-quick-reference-card.pdf which lists them neatly . You can compare it with the 4.3 reference card http : www.khronos.org files opengl43-quick-reference-card.pdf to know the difference . Above all OpenGL is an open specification so you are free to look up the OpenGL 3.3 specification http : www.opengl.org registry doc glspec33.core.20100311.withchanges.pdf to confirm some assumption if you want to be just sure .", "Question : null .. . Answer : In my Computer I got two graphics cards and I want that the Visual Studio debugger uses the stronger one . I want that because I am programming a game and I got fps drops with the weaker one . How can I do that EDIT : I have already tried to start Visual Studio 13 or my program with the stronger graphics card but it is always using the weaker one . Comment : What has this to do with the debugger exactly Isn t it a responsibility of your 3D program code to choose the graphics adapter it wants to use for rendering Comment : You can choose from the settings of your graphic cards which programs will use one or another . Comment : My guess is that your code is configured to choose the primary monitor . You could try changing your primary monitor to be the monitor that is attached to the stronger graphics card .", "Question : I tried to build sample projects in cocos2d-x . When I run the exe files there s a pop window that tells me that OpenGL 1.5 or higher is needed and I should update my drivers . Unfortunately my PC currently don t have video-card . Can I upgrade the OpenGL version in my PC without buying a video-card My PC currently uses Intel G33 G31 Express Chipset Family . .. . Answer : Install the Mesa 3D Graphics Library . From the mesa3d dot org website Mesa includes a special off-screen rendering interface called OSMesa . It s unique in that the interface has no dependencies on any operating-system or window system . Mesa s off-screen rendering interface is quite simple . Documentation for it may be found in the Mesa README file and there is an example program in the Mesa distribution demos osdemo.c . Comment : Actually he does not need the osmesa renderer but just the swrast software rasterizer also part of mesa . Comment : Hi thanks for the answer . : I already bought my pc a video-card and I can build and run cocos2dx sample project now . : I just need to cut my expenses since the money is from my allowance . I ll remember OSMesa so I can consider searching that in the future when I encountered again problems related to this .", "Question : I d like to know if it is possible to create a Windows program to invert all display colors by tweaking the video adapter directly just like MacOS does in its black-on-white mode . I am a C++ Windows developer and I have a degenerative disease on my retina called Retinitis Pigmentosa which makes me very sensitive to glare and bright colors . The High Contrast schemes offered by Windows are not an option . It just does not work . When selected most apps event Microsoft s ignores it ending up rendering black text on black background . Apple s approach of just flipping the bits of every color is simple fast and very effective . I understand that the Macintosh has the advantage of dealing with a limited and controlled set of video adapters whereas Windows is supposed to deal with any kind that provides the compatible driver . I see this project split in two layers : one to deal with video-card detection and keyboard shortcut management and another to actually tweak the video adapter having some sort of hardware abstraction-layer in between . Each video adapter may take a different technique to accomplish the desired effect . I d like to support at least NVIDIA ATI and Intel adapters . After a lot of googling on the subject I m frustrated . Information on video-card programing and device-driver development are scarce and arcane . Is what I m trying to accomplish possible at all Could anyone point me in the right direction My intention is to create a free tool to help people with similar eye disorders . I would be very grateful for any help Comment : Are you sure that video cards don t already support what you re looking for For nvidia gpu I know you can just apply black and white mode hue rotation gamma correction etc . in the driver control panel . Is this for personal use or are you actually looking to release something to the public Comment : I ve learned that NVIDIA has this capability but I need to tweak the video parameters via some sort of API not the GUI tool Comment : If you re using Window 7 the functionality is already built into the OS - although perhaps not in the most obvious place - start Magnifier set it to magnify with a factor of 1 so no actual magnification and then select the Turn on color inversion option . More details here http : www.wikihow.com Invert-Colors-on-Windows-7 . Comment : Thanks but the built-in magnifier makes the screen refresh rate too slow specially in fullscreen mode or with more than one monitor . .. . Answer : I d dig towards color profiles they existed since early windows versions ." ] }
[ "yes-answer-long", "yes-answer-short" ]
graphics
UNK_RELATION
cmdlet@powershell@51
cmdlet -- a cmdlet is a lightweight windows tag : @placeholder script that performs a single function .
{ "confidence": [ 39.21506881713867, 36.87522506713867, 35.9143180847168, 35.83049011230469, 35.752017974853516, 35.42182922363281, 35.42182922363281, 35.42182922363281, 35.42182922363281, 35.23603057861328, 35.16011047363281, 35.123409271240234, 34.55643844604492, 34.55643844604492, 33.46990966796875, 33.46990966796875, 33.46990966796875, 33.46990966796875, 33.46990966796875, 33.31450271606445, 33.109519958496094, 32.425174713134766, 32.425174713134766, 31.6768798828125, 31.46822738647461, 31.173030853271484, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.825923919677734, 30.790733337402344, 30.616086959838867, 29.78118896484375, 29.78118896484375, 29.78118896484375, 29.78118896484375, 29.78118896484375, 29.704208374023438, 29.427352905273438, 29.17134666442871, 28.92890167236328, 28.853376388549805, 28.839298248291016, 28.839298248291016, 28.839298248291016, 28.839298248291016, 28.839298248291016, 28.529043197631836, 28.473072052001953, 28.473072052001953, 28.382617950439453, 28.135818481445312, 28.135818481445312, 27.96295928955078, 27.702388763427734, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 27.264490127563477, 26.942337036132812, 26.423444747924805, 26.21975326538086, 26.21975326538086, 26.21975326538086, 26.21975326538086, 26.21975326538086, 26.21975326538086, 25.699390411376953, 25.699390411376953, 25.084815979003906, 25.084815979003906, 25.084815979003906, 25.079931259155273, 24.967609405517578, 24.967609405517578, 24.967609405517578, 24.967609405517578, 24.967609405517578 ], "content": [ "However when I add the cmdlet to the script it errors .", "Are you creating a Custom Cmdlet", "It generates a template help script for a cmdlet which looks somewhat similar to help .", "Does it have to be through a cmdlet", ": .. . .. . A cmdlet pronounced command-let is a single-feature command that manipulates objects in Windows PowerShell .", "I want to convert it in to a powershell cmdlet .", "I am subclassing a Cmdlet and NOT a PSCmdlet .", "Here are the relevant sections from the cmdlet .", "Has anybody used this cmdlet successfully", "Script : .. . .. . Your-CmdLet : .. . .. . Checking explicitly for Continue allows the script to be equal to -verbose : false when you call the CmdLet from a script that doesn t set the global variable in which case it s null", "Let s say I have a cmdlet like this : .. . .. . if -debug or -verbose was passed into my function I want to pass that flag into the new-item cmdlet .", "https : technet.microsoft.com en-us library bb648597 v vs.85 .aspx .. . .. . and : .. . .. . A cmdlet is a lightweight command that is used in the Windows PowerShell environment .", "Parameters of a given cmdlet only need to have enough of it to make it distinct within that cmdlet .", "When calling a cmdlet is it possible to expand the value of a powershell variable somehow so it acts as a parameter with associated values for the cmdlet", "Cmdlet help is normally in the satellite XML file .", "I am writing a Cmdlet for PowerShell in C .", "Cmdlet alone does not provide access to SessionState .", "Class implementing cmdlet should be public or it will not be exported as command .", "Did I write my Cmdlet wrong", "How to Write a Custom Cmdlet - Part 1 http : www.byteblocks.com page How-To-Write-Custom-Powershell-Cmdlet-Part-1.aspx .. . How to Write a Custom Cmdlet - Part 2 http : www.byteblocks.com page How-To-Write-Custom-Powershell-Cmdlet-Part-2.aspx", "The cmdlet is not present when it is called .", "I created my custom powershell cmdlet .", "I have a custom cmdlet I created .", "I am trying to write a powershell cmdlet which accepts multiple inputs for a single parameter .", "You can set the VerbosePreference as a global variable on starting your script and then check for the global variable in your custom cmdlet .", "I am trying to implement a powershell cmdlet in C .", "Unfortunately the Import-Module cmdlet gives no indication that it failed to import the cmdlets .", "How do I add dynamic argument tab completion to a PowerShell Cmdlet", "I have started a PowerShell cmdlet and want to supply the help message for a parameter .", "The cmdlet Write-EventLog works fine when typed manually .", "When I use a cmdlet like Get-Process it works fine.. .", "We re using the stop-service cmdlet to kill a few services on our boxes .", "Can anyone help me to convert a c .net program to powershell cmdlet .", "The output is .. . .. . It is not done as direct as passing -Debug to the next cmdlet though .", "Is there something I need to do to register my Cmdlet in PowerShell or in the Runspace or something", "Just in case with this approach cmdlet classes do not have to be public .", "And by not working I mean it can t even find the CmdLet The term is not recognized as the name of a cmdlet .", "I have a cmdlet implemented in C as follows .. . .. . if someone calls .. . .. . I just want to log the command in the processRecord function .", "The cmdlet will accept the name from the pipeline or as a positional or named parameter .", "Since you re piping input into the cmdlet it s assuming that s the name to use .", "How can I create and remove psdrives from my cmdlet", "I currently uninstall by manually deleting the path that the installer of the cmdlet resides at .", "Get-Command -Name psconfig is looking for a cmdlet named psconfig .", "If I switch to a normal powershell the CmdLet works fine .", "http : stackoverflow.com questions 2775357 how-does-a-cmdlet-know-when-it-really-should-call-writeverbose .. . .. . One not perfect but practically reasonable option is to introduce your own cmdlet parameters e.g .", "We re moving from a batch-file that calls osql to a Powershell script which uses the Invoke-Sqlcmd cmdlet .", "It accepts wildcards in the path but it must resolve to a single file 1 https : andrwwatt.wordpress.com 2006 05 13 limitations-of-the-rename-item-cmdlet .", "To create a PowerShell cmdlet I would recommend you read Easy Windows PowerShell cmdlet development and debugging http : community.bartdesmet.net blogs bart archive 2008 02 03 easy-windows-powershell-cmdlet-development-and-debugging.aspx by Bart De Smet B it s a great walk through for creating and debugging cmdlet s Does what it says on the tin", "something s wrong with my get-content cmdlet and I don t understand why its acting that way .", "I m currently experimenting with PowerShell Show-Command cmdlet https : technet.microsoft.com library hh849915.aspx .", "Anyone know if there s a standard way to look up what version of PowerShell introduced a particular cmdlet", "powershell.exe -Version 2 then use the Get-Command cmdlet to see if your cmdlets are listed or not .", "I want to write a cmdlet that read multiple records from a database and puts them onto the pipeline .", "Can I generate a string and import its embedded cmdlet", "The following Powershell script fetches all the System Error Events occuring today only - it works : .. . .. . But it can take several seconds to run : I suspect this is because the first Get-EventLog cmdlet is generating the complete list of all events first then the Where-Object cmdlet trims down that list .", "I ve tried using ParameterAttribute.HelpMessage for this : .. . .. . But when I use the PowerShell Get-Help command it does not show the HelpMessage for the parameter : .. . .. . When writing a cmdlet in PowerShell script I can add a help message for parameters using this syntax : .. . .. . But what is the equivalent in a C cmdlet", "Platform is set to Active Any CPU .. . .. . This is my cmdlet code : .. . .. . This is the error I m getting when I m trying to invoke the Cmdlet : .. . .. . What I m a doing wrong is there something setup wrong concerning the targeting platform x86", "When I write the Add-User command I expect to display the test string but I get this error : .. . .. . Add-User : The term Add-User is not recognized as the name of a cmdlet function script file or operable program .", "I know a simple way of getting a relative-path using the Resolve-Path cmdlet : .. . .. . But I can t get it to fit in the rest of my script I guess their might be a .NET function to do this in a different way", "For comparison : .. . .. . I can pass a type to the Where-Object cmdlet like this : .. . .. . In this case the value System.DateTime gets passed on to the CmdLet parameter Value which is of type System.Object .. . .. . I can use a Type with the -Is operator like this : .. . .. . How do i declare the -Check parameter in my CmdLet", "I m looking for an explanation on why parameter binding fails when using script blocks without specifying named parameters in a piped Rename-Item cmdlet .", "The error is from the Rename-Item cmdlet your code example says copy-item .", "Clearly I know the cmdlet name but not sure how to print the exact string of arguments .", "In another question : How does one securely handle passwords in a custom written PowerShell cmdlet", "There are a plethora of questions here on SO and elsewhere explaining how to propagate -Confirm throughout one s cmdlet to nested cmdlets etc .", "That is once a user answers this prompt.. . .. . .. . .. . one would reasonably assume that my cmdlet may now act on the user s response to that prompt .", "You should really be using PSCmdlet or pass the location as parameter argument from the invoking cmdlet .", "Altrnativly try : .. . .. . Reference : How can I get the current directory in PowerShell cmdlet", "http : stackoverflow.com questions 13897918 how-can-i-get-the-current-directory-in-powershell-cmdlet", "Here is the Cmdlet code https : github.com fsprojects Paket blob master src Paket.PowerShell PowerShell.fs .", "I want to use a cmdlet https : technet.microsoft.com en-us library jj649835 v wps.630 .aspx e.g .", "In which case you ll need to register for an event in your cmdlet and fire the event from the other thread .", "Or is there some fancy ninja-use of brackets that let me squeeze this call to a cmdlet insde of the select-object list", "Is there some sort of resource or cmdlet that can just get me the info straight away", "Things like Get-Member -m Property -m stands for MemberType which is the only M parameter for this cmdlet .", "I try to make my scripts as readable as I can for other folks that may not know the aliases of every cmdlet .", "Is there a way to have the stop-service cmdlet give up or timeout after a certain point", "I figure we can check afterward and if the service is still running use the kill-process cmdlet to provide a final chop .", "Perhaps it sounds strange but there is no easy way for a cmdlet to know its verbose or debug mode .", "Take a look at the related question : .. . .. . How does a cmdlet know when it really should call WriteVerbose", "You do need to register your cmdlet before you can use it in a Powershell session .", "I have a cmdlet like the following example to deleted files older than x days and a logging function write-log that logs to a file : .. . .. . What I want to do is log what the cmdlet does to each processed file .", "So I have this little test function : .. . .. . The problem is that in some computers it works just fine but in others I receive the message that the term msg is not recognized as a cmdlet function etc .", "I m building a cmdlet for Powershell that basically takes an API and creates a new environment lifecycle project group project and team .", "I know about Get-Process but only shows PowerShell running not which cmdlet is currently running .", "@mjolinor is right you can do what you propose using Foreach object alias CmdLet : .. . .. . or", "while I found few references to my cmdlet removing them doesn t make a difference .", "I have a PSCmdlet written in C and .NET 3.5 that calls a few other commands that are defined within the same Cmdlet .", "I would like to use splatting with hash tables to pass variable parameters to a CmdLet .", "I used this cmdlet in my PowerShell script to get all files in the path except the rdl files : .. . .. . The problem is that the command also eliminates files with extension .rdl.rss and that s not what I want .", "In this instance one of the services in question will remain in the stopping state and the cmdlet puts this out to the console over and over : .. . .. . Eventually we have to kill the service in the task manager and our script then continues .", "Assuming the cmdlet is in the module MyModule.dll the help file is normally in MyModule en-US MyModule.dll-help.xml .. . .. . Help XML is so called MAML-format .", "I want to be able to use either a power-cli cmdlet or the vsphere api i m writing in C - to be able to change a vm s hostname .", "My cmdlet has a Get-Deal command which will receive value from pipeline : .. . .. . It works fine if I passed a list of string or other types .", "In a sample function like .. . .. . Is there an actually cmdlet to skip to the end block or would I just have to make a if-statement that checks a variable and wrap that around the inside of my proces block", "I can get the resolution from the Get-DisplayResolution cmdlet and I get the following back .", "From the documentation for the cmdlet itself : .. . .. . The above is an example of calling Invoke-Sqlcmd specifying an input file and piping the output to a file .", "I could re-write the module with Invoke-Command wrapper for each cmdlet but that is not the purpose .", "What I would like to do is remot-ify the MyModule by creating an proxy equal proxy per cmdlet and parameter .", "first question here : .. . .. . So I have to create a custom CMDLet for Powershell 2.0 using visual-studio-2010 express ." ] }
{ "confidence": [ 45.98188781738281, 41.42680358886719, 40.82963943481445, 40.44379806518555, 40.396183013916016, 40.21299743652344, 40.047019958496094, 40.04393768310547, 39.28096389770508, 38.138885498046875, 38.02742385864258, 37.781288146972656, 37.700164794921875, 37.50835037231445, 37.481788635253906, 36.75062942504883, 36.59809494018555, 36.59809494018555, 36.57219314575195, 36.10215377807617 ], "content": [ "Question : By default any named named function that has the CmdletBinding attribute accepts -debug and -verbose and a few others parameters and has predefined debug and verbose variables . What I m trying to figure out is how to pass them on to other cmdlet s that that get called within the function . Let s say I have a cmdlet like this : .. . .. . if -debug or -verbose was passed into my function I want to pass that flag into the new-item cmdlet . What s the right pattern for doing this Comment : PowerShell already does this for you . Not as direct as you might expect though . See my answer below .. . Answer : You can set the VerbosePreference as a global variable on starting your script and then check for the global variable in your custom cmdlet . Script : .. . .. . Your-CmdLet : .. . .. . Checking explicitly for Continue allows the script to be equal to -verbose : false when you call the CmdLet from a script that doesn t set the global variable in which case it s null", "Question : I have written my program in c .net . I want to convert it in to a powershell cmdlet . I was instructed to use pssnapin and getproc programs . Can anyone plz help me out. . Regards Arun Comment : Is there any reason that you have not accepted any answer to you questions .. . Answer : To create a PowerShell cmdlet I would recommend you read Easy Windows PowerShell cmdlet development and debugging http : community.bartdesmet.net blogs bart archive 2008 02 03 easy-windows-powershell-cmdlet-development-and-debugging.aspx by Bart De Smet B it s a great walk through for creating and debugging cmdlet s Does what it says on the tin Also I ve found Professional Windows PowerShell Programming ISBN 978-0470173930 ISBN-10 0470173939 very good for creating cmdlets and providers .", "Question : If -let is a diminutive suffix and PowerShell commands are called command-lets what is a full-fledged PowerShell command Comment : In PowerShell terminology Command is usually used as an umbrella-term for functions cmdlets scripts etc . rather than for a specific type . Cmdlets are not inferior in any sense they are first-class functions if you will .. . Answer : cmdlets is used to compare PowerShell commandlets with with commands in traditional shells rather than as a comparison to something else in PowerShell . e.g . : .. . .. . A cmdlet pronounced command-let is a single-feature command that manipulates objects in Windows PowerShell . You can recognize cmdlets by their name format -- a verb and noun separated by a dash - such as Get-Help Get-Process and Start-Service . .. . In traditional shells the commands are executable programs that range from the very simple such as attrib.exe to the very complex such as netsh.exe . .. . In Windows PowerShell most cmdlets are very simple and they are designed to be used in combination with other cmdlets . https : technet.microsoft.com en-us library bb648597 v vs.85 .aspx .. . .. . and : .. . .. . A cmdlet is a lightweight command that is used in the Windows PowerShell environment . . . Cmdlets perform an action and typically return a Microsoft .NET Framework object to the next command in the pipeline . .. . How Cmdlets Differ from Commands .. . .. . Cmdlets differ from commands in other command-shell environments in the following ways : .. . .. . Cmdlets are instances of .NET Framework classes they are not stand-alone executables . .. . Cmdlets can be created from as few as a dozen lines-of-code . .. . Cmdlets do not generally do their own parsing error presentation or output formatting . Parsing error presentation and output formatting are handled by the Windows PowerShell runtime . .. . Cmdlets process input objects from the pipeline rather than from streams of text and cmdlets typically deliver objects as output to the pipeline . .. . Cmdlets are record-oriented because they process a single object at a time . https : msdn.microsoft.com en-us library ms714395 v vs.85 .aspx", "Question : We re using the stop-service cmdlet to kill a few services on our boxes . Most of the time it works great however we have one or two services who doesn t that occasionally don t play nice . In this instance one of the services in question will remain in the stopping state and the cmdlet puts this out to the console over and over : .. . .. . Eventually we have to kill the service in the task manager and our script then continues . Is there a way to have the stop-service cmdlet give up or timeout after a certain point I figure we can check afterward and if the service is still running use the kill-process cmdlet to provide a final chop . .. . Answer : Although Stop-Service does not have a timeout parameter the WaitForStatus method on the System.ServiceController class does have an overload that takes a timeout parameter documented here https : msdn.microsoft.com en-us library 35st9aw1.aspx . Fortunately this is exactly the type of object that the Get-Service command returns . Here is a simple function that takes a service name and a timeout in seconds . It returns true if the service stops before the timeout is reached and false if the call times out or if the service isn t present .", "Question : Suppose you are writing some PSCmdLet http : msdn.microsoft.com en-us library system.management.automation.pscmdlet 28v vs.85 29.aspx in C : .. . .. . If the module defining the above is loaded into PowerShell the command help Join-StackOverflow will return the following : .. . .. . How can I add a synopsis summary for this cmdlet e.g . the same as for Get-Process : .. . Answer : Cmdlet help is normally in the satellite XML file . Assuming the cmdlet is in the module MyModule.dll the help file is normally in MyModule en-US MyModule.dll-help.xml .. . .. . Help XML is so called MAML-format . In order to avoid composing it each time manually I created a tool script library Helps https : github.com nightroman Helps . It generates a template help script for a cmdlet which looks somewhat similar to help . Here is an example https : github.com nightroman Helps wiki Command-Help-Script . Then after filling blanks example https : github.com nightroman SplitPipeline blob master Module en-US SplitPipeline.dll-Help.ps1 another Helps command is called to convert this script into MAML XML . P.S . There are other helper tools on the web . I tried a couple of them and decided to create my own .", "Question : By default any named named function that has the CmdletBinding attribute accepts -debug and -verbose and a few others parameters and has predefined debug and verbose variables . What I m trying to figure out is how to pass them on to other cmdlet s that that get called within the function . Let s say I have a cmdlet like this : .. . .. . if -debug or -verbose was passed into my function I want to pass that flag into the new-item cmdlet . What s the right pattern for doing this Comment : PowerShell already does this for you . Not as direct as you might expect though . See my answer below .. . Answer : The best way to do it is by setting the VerbosePreference . This will enable the verbose level for the entire script . Do not forget to disable it by the end of the script .", "Question : I have started a PowerShell cmdlet and want to supply the help message for a parameter . I ve tried using ParameterAttribute.HelpMessage for this : .. . .. . But when I use the PowerShell Get-Help command it does not show the HelpMessage for the parameter : .. . .. . When writing a cmdlet in PowerShell script I can add a help message for parameters using this syntax : .. . .. . But what is the equivalent in a C cmdlet .. . Answer : You re doing it absolutely right You just need to inspect the -Full view or get help for the specific parameter with -Parameter : Comment : Thanks . But I don t have to do that with ps1 cmdlets I think . Just Get-Help Get-Workspace -det is enough to see the parameter help message . Is that not achievable for C cmdlets", "Question : I m trying to run PowerShell scripts from my C code that will use custom Cmdlets from the assembly that runs them . Here is the code : .. . .. . When I try to run it I get a CommandNotFoundException . Did I write my Cmdlet wrong Is there something I need to do to register my Cmdlet in PowerShell or in the Runspace or something .. . Answer : You do need to register your cmdlet before you can use it in a Powershell session . You ll generally do that by way of a Powershell Snap-In . Here s a high-level overview of the process : .. . .. . Create custom cmdlets you ve already done this part .. . Create a Powershell Snap-in which contains and describes your cmdlets .. . Install the new Snap-in on your system using Installutil .. . Add the Snap-in to a specific Powershell session using Add-PSSnapin .. . .. . There are a couple useful articles on MSDN that explain the process pretty thoroughly : .. . .. . Developing with Windows PowerShell http : msdn.microsoft.com en-us library cc303698.aspx .. . How to Create a Windows PowerShell Snap-in http : msdn.microsoft.com en-us library cc136070 28VS.85 29.aspx .. . .. . There s also a 2-part series on ByteBlocks that discusses writing custom cmdlets . That series may be your best bet since you seem to have done the equivalent of part 1 already . You may be able to just use part 2 as a quick reference and be good to go . How to Write a Custom Cmdlet - Part 1 http : www.byteblocks.com page How-To-Write-Custom-Powershell-Cmdlet-Part-1.aspx .. . How to Write a Custom Cmdlet - Part 2 http : www.byteblocks.com page How-To-Write-Custom-Powershell-Cmdlet-Part-2.aspx Comment : A SnapIn is the powershell v1 way of doing things and is discouraged these days as it requires administrative privileges to register them . He should be using powershell v2 modules . Comment : Doesn t really answer the question for what he is trying to do . Comment : @manojlds It does answer the question but is definitely not as up to-date or elegant as x0n s answer . Comment : @x0n I upvoted your answer since it s much more elegant and has the added benefit of being self-contained .", "Question : null .. . Answer : I have a cmdlet like the following example to deleted files older than x days and a logging function write-log that logs to a file : .. . .. . What I want to do is log what the cmdlet does to each processed file . In a normal foreach-loop I would add something like this to log the process .. . .. . How can I log all actions using my logging function and the above cmdlet", "Question : I m having a problem to execute powershell commands from the C application . I ve found many things related to this issue but none of them helped me to figured it out what might is going on . So I have this little test function : .. . .. . The problem is that in some computers it works just fine but in others I receive the message that the term msg is not recognized as a cmdlet function etc . This is happening with every executable file that exists in c : windows system32 . When I use a cmdlet like Get-Process it works fine.. . I m testing in two computers right now both of them have the ExecutionPolicy seted to unrestricted and they have the same Powershell version . The Path on the Environment Variables are the same too . Appreciate any help . Thanks in advance . Paulo Comment : Does the executable msg.exe exist on both system This replaced net send starting with Vista and I believe this is what your command going to invoke . Comment : Yes and if I type the command directly in powershell it works fine . As I said it happens to every file in ths system32 msg psexec tscmd etc. . Comment : Are you creating a Custom Cmdlet .. . Answer : How are you compiling your C application If it is compiled as x86 platform then it will be using the virtualized System32 dir C : windows syswow64 and there is no msg.exe in that dir . You can either A compile as x64 or B use the path C : windows sysnative msg.exe . Comment : This seems to be the problem . I ve tried to use the comand as c : windows system32 msg.exe but didn t work either . But them I ve copied some of the files as msg psexec tscmd etc to the C : windows syswow64 and it starts to work . Thanks a lot Keith great help .", "Question : null .. . Answer : Lately I have been developing Powershell scripts on a Window 8 machine instead of on a Windows Server 2012R2 which s I normally do . I have encountered two very strange things that never happened on the server . I know two questions in one post but I believe they might be connected . 1 . After a while CmdLets just stop producing any output whatsoever no error messages no verbose output . It doesn t matter if I run it in the lower command part or in the upper script editor and no difference if I run a selected part of the script or the whole thing . If I switch to a normal powershell the CmdLet works fine . If I restart Powershell ISE the CmdLet start working again but only for a like 2-5 execution not at all exact number after which it stops working again . Not all CmdLets behave this way mostly had problems with Storage related CmdLets Format-Partition Get-Disk Get-Volume and so on . 2 . After a while CmdLets that used to work fine in the upper script part of Powershell ISE just stops working . The CmdLets still work fine in the lower command part of the ISE GUI but does not work when used in the upper script editor even though they did just a second ago . And it doesn t matter if I run the whole script or just a selected part . And by not working I mean it can t even find the CmdLet The term is not recognized as the name of a cmdlet . The CmdLet is available in the Commands Side-Bar where it show up without any problem and I can access help for it . So any ideas what is going on here Comment : I ve run into quite a lot of issues debugging step-by-step . Sometimes the ISE cannot stop on a line because I don t know the parsing of it hangs it or something you cannot Debug Stop you have to restart the ISE . If I have a breakpoint on the line after that one and I run to that line it works and I can debug after that . Comment : I have not used the debugging feature in Powershell ISE at all when I encountered these problems . Comment : Do you have anything to show us that we can reproduce your issue Output is not very specific and I would like to see some of your output lines . ISE and Console are capable of having different profiles loaded so your situations could easily be different . Comment : Well when the CmdLet stops working there is no output whatsoever so nothing to show there and in the other case-when it stops working after a while it is the same output as-if you try to run Jump-Pig -height 4 -count 3 PS C : Jump-Pig -height 4 -count 3 Jump-Pig : The term Jump-Pig is not recognized as the name of a cmdlet function script file or operable program . Check the spelling of the name or if a path was included verify that the path is correct and try again . + Jump-Pig -height 4 -count 3 + ... . + FullyQualifiedErrorId : CommandNotFoundException Comment : Well that error is very specific . The cmdlet is not present when it is called . Is it declared before it is called If you don t show us a specific example that we can reproduce there is going to be a lot of back and forth here .", "Question : I m looking for an explanation on why parameter binding fails when using script blocks without specifying named parameters in a piped Rename-Item cmdlet . Why does this work : .. . .. . but this does not work : .. . .. . Error : .. . .. . The Rename-Item syntax seems pretty straightforward to me ie . two mandatory positional parameters : .. . Answer : @mjolinor is right you can do what you propose using Foreach object alias CmdLet : .. . .. . or", "Question : I m looking for an explanation on why parameter binding fails when using script blocks without specifying named parameters in a piped Rename-Item cmdlet . Why does this work : .. . .. . but this does not work : .. . .. . Error : .. . .. . The Rename-Item syntax seems pretty straightforward to me ie . two mandatory positional parameters : .. . Answer : I think you re confusing the parser by giving it the name from the pipe and as a positional parameter simultaneously . The cmdlet will accept the name from the pipeline or as a positional or named parameter . Since you re piping input into the cmdlet it s assuming that s the name to use . If the name is coming from the pipeline then there should only be one additional positional parameter Newname . Give both pipeline input and two positional parameters it s not sure what to bind where . Using named parameters gives it explicit instructions about how to bind the parameters .", "Question : By default any named named function that has the CmdletBinding attribute accepts -debug and -verbose and a few others parameters and has predefined debug and verbose variables . What I m trying to figure out is how to pass them on to other cmdlet s that that get called within the function . Let s say I have a cmdlet like this : .. . .. . if -debug or -verbose was passed into my function I want to pass that flag into the new-item cmdlet . What s the right pattern for doing this Comment : PowerShell already does this for you . Not as direct as you might expect though . See my answer below .. . Answer : Perhaps it sounds strange but there is no easy way for a cmdlet to know its verbose or debug mode . Take a look at the related question : .. . .. . How does a cmdlet know when it really should call WriteVerbose http : stackoverflow.com questions 2775357 how-does-a-cmdlet-know-when-it-really-should-call-writeverbose .. . .. . One not perfect but practically reasonable option is to introduce your own cmdlet parameters e.g . MyVerbose MyDebug and use them in the code explicitly . UPDATE .. . .. . When we need only a switch not say verbosity level value then the approach with PSBoundParameters is perhaps better than proposed above extra parameters : .. . .. . It s all not perfect anyway . If there are better solutions then I would really like to know them myself . Comment : I think that second example might evaluate Verbose to true if it hasn t been explicitly set false when calling the function . It seems to assume true when given a null . Comment : @Alisdair Craik : good catch thanks I have corrected that and tested this time . Weird isn t it Note : in your answer there is perhaps a minor flaw too : to check ContainsKey is not enough because the actual value behind that existing key can be still false . It s a rare case but it is not impossible . Comment : That s the trick -Vebose : xxx I didn t know you could set a switch that way . I thought it was always include or exclude . I didn t know you could directly set the value of switch like that . Comment : that s true - I ve added another example now to take the value of the parameters . Cheers . Comment : @RomanKuzmin : there is a better solution . Since PowerShell already takes care of it the better solution is doing nothing . See stackoverflow.com a 20830886 1242 http : stackoverflow.com a 20830886 1242 . For the detecting part see stackoverflow.com a 20828118 1242 http : stackoverflow.com a 20828118 1242", "Question : By default any named named function that has the CmdletBinding attribute accepts -debug and -verbose and a few others parameters and has predefined debug and verbose variables . What I m trying to figure out is how to pass them on to other cmdlet s that that get called within the function . Let s say I have a cmdlet like this : .. . .. . if -debug or -verbose was passed into my function I want to pass that flag into the new-item cmdlet . What s the right pattern for doing this Comment : PowerShell already does this for you . Not as direct as you might expect though . See my answer below .. . Answer : I think this is the easiest way :", "Question : I am writing a Cmdlet for PowerShell in C . I am subclassing a Cmdlet and NOT a PSCmdlet . Is there a way to get the current directory from PowerShell I could do so with the PSCmdlet using GetVariableValue pwd . But in the Cmd class I do not have that available . Environment.CurrentDiretory points me to the path where powershell was started from not where PowerShell itself is currently positioned . edit .. . .. . Example : .. . .. . I fire up powershell via - say - powershell ise.exe . It starts up in C : Windows System32 WindowsPowerShell v1.0 . I then change path using cd c : my folder and run my command Do-Something . Inside the implementation of Do-Something C -side I d like to be able to retrieve the current path c : my folder . If possible I would like to avoid using PSCmdlet . Comment : You should really be using PSCmdlet or pass the location as parameter argument from the invoking cmdlet . Comment : I am currently rewriting my code to derive from PSCmdlet . Looks good so far . I was a bit scared of it because I really don t need much of it except access to it s internals . And on the other hand .. . that s exactly what it s for I guess.. . Comment : Exactly you have a runtime dependecy current location use PSCmdlet .. . Answer : I am starting in C : Users myusername . If I know enter cd. . I am in C : Users .. . .. . Entering Get-Location .Path returns C : Users . Thats what you want isnt it Altrnativly try : .. . .. . Reference : How can I get the current directory in PowerShell cmdlet http : stackoverflow.com questions 13897918 how-can-i-get-the-current-directory-in-powershell-cmdlet Comment : I updated my original answer with an example . I would like to avoid running further cmdlets to get my current path . Unless I have no other way . Comment : @Hemisphera I ve updated my answer . I don t have access to LinqPad or Visual Studio right now so I can t confirm this works Comment : It only works because I now use PSCmdlet . Cmdlet alone does not provide access to SessionState . But since I ended up using PSCmdlet I ll mark this as answered . It s cleaner than GetVariableValue pwd anway . Thanks", "Question : Could someone help me log the actual PowerShell command issued along with arguments . I have a cmdlet implemented in C as follows .. . .. . if someone calls .. . .. . I just want to log the command in the processRecord function . Clearly I know the cmdlet name but not sure how to print the exact string of arguments . Environment.CommandLine works inside regular exes but how to do the same in cmdlets .. . .. . Thanks .. . Answer : Use the MyInvocation.Line property on PSCmdlet e.g . : Comment : Both the above answers are correct and useful to me marking this as answer as it is clear answer to the question", "Question : Could someone help me log the actual PowerShell command issued along with arguments . I have a cmdlet implemented in C as follows .. . .. . if someone calls .. . .. . I just want to log the command in the processRecord function . Clearly I know the cmdlet name but not sure how to print the exact string of arguments . Environment.CommandLine works inside regular exes but how to do the same in cmdlets .. . .. . Thanks .. . Answer : Have a look at the InvocationInfo object available as MyInvocation member on PSCmdlet . It provides info like Line BoundParameters etc that will be of use to you . http : msdn.microsoft.com en-us library system.management.automation.invocationinfo members v vs.85 .aspx", "Question : I m putting Requires -Version at the top of my script but need to figure out what version I require . I was hoping to query what version of PowerShell introduced each of the cmdlets I call . But I don t see that in the Get-Help -verbose output for one of the cmdlets . I didn t find a canonical web page listing for it . Anyone know if there s a standard way to look up what version of PowerShell introduced a particular cmdlet Or is there a better way to accomplish what I m trying to do Comment : I usually check the msdn documentation for a given cmdlet the one with the arguments and types not the useless Using foo command pages and check the versions drop down to see where it starts . .. . Answer : So as far as I am aware the standard way to look this up is to read MSDN . : - You can get to the relevant page pretty easily using the -Online switch for Get-Help for example : .. . .. . Another approach might be to fire up powershell.exe using the -Version switch to set a specific version e.g . powershell.exe -Version 2 then use the Get-Command cmdlet to see if your cmdlets are listed or not . .. . .. . I have enjoyed myself Here is some code that seems to work OK parsing a script and then working out if the commands are valid cmdlets in different PS versions . At this point it doesn t seem that 1.0 or 5.0 are supported by the -PSVersion switch on Start-Job though . powershell questions tagged powershell Comment : What a gem very cool tool", "Question : By default any named named function that has the CmdletBinding attribute accepts -debug and -verbose and a few others parameters and has predefined debug and verbose variables . What I m trying to figure out is how to pass them on to other cmdlet s that that get called within the function . Let s say I have a cmdlet like this : .. . .. . if -debug or -verbose was passed into my function I want to pass that flag into the new-item cmdlet . What s the right pattern for doing this Comment : PowerShell already does this for you . Not as direct as you might expect though . See my answer below .. . Answer : You could build a new hash table based on the bound debug or verbose parameters and then splat it to the internal command . If you re just specifying switches and aren t passing a false switch like debug : false you can just check for the existence of debug or verbose : .. . .. . If you want to pass the parameter value it s more complicated but can be done with :" ] }
[ "yes-answer-long", "yes-answer-short" ]
powershell
UNK_RELATION
resharper-6.0@visual-studio@122
resharper-6 .0 -- is a refactoring and productivity extension by jetbrains that extends native functionality of microsoft @placeholder 2003 2005 2008 and 2010 .
{ "confidence": [ 34.370059967041016, 32.94725036621094, 32.09410858154297, 31.856163024902344, 31.019969940185547, 30.592655181884766, 30.47273826599121, 29.01540756225586, 28.423934936523438, 28.221698760986328, 28.204666137695312, 28.122047424316406, 28.049949645996094, 28.030824661254883, 27.72981834411621, 27.72981834411621, 27.529399871826172, 27.446651458740234, 27.092144012451172, 27.092144012451172, 27.092144012451172, 27.092144012451172, 27.092144012451172, 27.092144012451172, 27.08884048461914, 27.08884048461914, 26.835105895996094, 26.712451934814453, 26.712451934814453, 26.712451934814453, 26.41730499267578, 26.239654541015625, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.235740661621094, 26.195560455322266, 26.104494094848633, 25.963088989257812, 25.764862060546875, 25.69620132446289, 25.69620132446289, 25.66297149658203, 25.527996063232422, 25.16156005859375, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.075695037841797, 25.007883071899414, 24.854305267333984, 24.854305267333984, 24.854305267333984, 24.850616455078125, 24.850616455078125, 24.845382690429688, 24.610416412353516, 24.610416412353516, 24.2475643157959, 24.2475643157959, 24.156497955322266, 24.156497955322266, 24.156497955322266, 24.156497955322266, 24.144832611083984, 24.070877075195312, 23.518823623657227, 23.518823623657227, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.513118743896484, 23.45037078857422, 23.45037078857422, 23.45037078857422, 23.45037078857422, 23.083192825317383, 22.99148178100586, 22.90631103515625 ], "content": [ "Looks like it is a bug with resharper 6 .", "Is there any way to run a single scenario with Resharper 6", "I am working with visual-studio-2010 and resharper 6 .", "I m using resharper 6 .", "ReSharper 6 creates folders like ReSharper.projectname with the files and folders below in it .", "why Resharper 6 takes much more CPU than Resharper 5", "I see you work for JetBrains .. . is there any reason why this ability isn t built into ReSharper itself", "If there is no extensions and plugins other that ReSharper 6.1.1 and typing is still slow then please make a performance snapshot and send it to JetBrains as described here here http : confluence.jetbrains.net display ReSharper ReSharper+Profiling+Instructions .", "I downloaded StyleCop 4.6.3 which integrates with ReSharper 6 and the results are really fantastic", "Also try checking resharper options : Resharper - Options - Tools - Unit testing .", "I recently installed Resharper 6.1 in VS-2010 .", "Btw here s an old yet useful post on using Complete Statement in different scenarios : blogs.jetbrains.com dotnet 2008 05 http : blogs.jetbrains.com dotnet 2008 05 resharper-in-detail-complete-statement-scenarios", "The question is why Resharper 6 takes much more CPU than Resharper 5 and what nice features I have for that", "Resharper", "It s all in .ReSharper files .", "I m using resharper with nunit .", "But this is most likely the cause of the refactoring .", "I ve upgraded Resharper from 5 version to 6 version .", "Anyway the combination of StyleCop and ReSharper rocks", "I have Resharper 6.1.37.86 and this option is there .", "Next I run it with Resharper 6.1.37.86 .", "I suggest asking on the Resharper forum .", "This isn t a programming question this is a Resharper question .", "I want Resharper to do it automatically .", "I am using Resharper 6.x with VS2010 .", "With ReSharper 6 I don t have any of that .", "I renamed a folder and updated my namespace declarations but Resharper 6 keeps trying to tell me that the namespace should be a reflection of how it was before the rename .", "When I was not using ReSharper Tap key helped to jump out from double quotes but it is not working when using ReSharper .", "I m running ReSharper 6.1.37.86 Full Edition .. . .. . UPDATE : After upgrading to Resharper 6.1.1000.82 I get a slightly different error :", "For anyone in the future : In ReSharper 9 I had to change the setting in ReSharper Options - Code Editing C Code Style - Use this .", "I ended up uninstalling ReSharper and am now using Reference directives in my JS files to get native VS-2010 JS intellisense .", "Paste it on the same file that you ll find on the c : Users your user AppData Roaming JetBrains Resharper v6.0 vsxx.x folder .", "which exact version of resharper do you use", "Problem was solved by installing a new version of Resharper .", "Resharper shows that all three test are passed .", "I suggest that you delete all .ReSharper files .", "Resharper will recreate them from scratch without the garbage .", "This also happened to me using Resharper 8.2.3 .", "Yeah.. . project file and not just resharper files .", "I fixed them and now resharper shows it right .", "I received this answer from the Resharper support team .", "I was even faster then the JetBrains marketing lead .", "It uses the same technology as ReSharper .", "Previously I created a custom resharper file template to create a new test class .", "Also check out the plugin development guide http : confluence.jetbrains.net display ReSharper ReSharper+6+Plugin+Development .", "I m not sure whether there is such a command in Resharper but if you re saying that this command there was in VS before Resharper then you can find this command in Options- Environment- Keyboard", "By default ReSharper installer executes per-user installation but if one selects Options All Users chechbox ReSharper installer will execute per-machine installation .", "We re using ReSharper 6.0 with StyleCop for ReSharper .", "I had seen that was available but assumed that it was simply a subset of the functionality available in ReSharper and that I was failing to find a menu item that would enable me to do it .", "Is this how ReSharper 6 is by default or do I have to reinstall it", "I can t seem to find it on the ReSharper menu options etc .", "Normally I let Resharper have its way with namespace optimizations .", "This is something ReSharper will do when you let it : shorten references on code-cleanup .", "My guess is that Resharper is using NUnit 2.5.10 and so the test passes .", "Once I did this ReSharper 7.7.1 quit complaining about the namespace .", "Please note I am using ReSharper to run the tests .", "Maybe I am looking for an option that it is not still implemented in Resharper .", "I am trying to write a customized template in Resharper A plugin for Visual Studio .", "By the way where can I find those build-in macros of Resharper", "First there s no setting in ReSharper to forget a certain project in solution .", "Also note that we re only using Resharper Ultimate 2016 .", "Resharper is smart .", "From the JetBrains issue tracker http : youtrack.jetbrains.com issue RSRP-287973 : .. . .. . There is a way .", "When anything happens to the issue at JetBrains I will update this question here on stack", "If anything comes up from this jetbrains issue I will update this question on stack", "If Resharper 6 has new features which require CPU time while i m typing anything even comments", "I will test how Resharper 6 works on my desktop i7-860 in a moment .", "They have listed that functionality as one of their version 6 features here .", "Also check the SEP logs for anything pointing to ReSharper .", "@DanAppleyard : keep in mind that ReSharper is user-mode code .", "I am working with JetBrains to get the issue resolved .", "Andrey Serebryansky Senior Support Engineer JetBrains Inc", "Resharper can help you .", "This seems to be a bug in ReSharper .", "Maybe because Resharper sucks", "Confirmed by the Resharper team that this is not possible :", "I have already posted this question on the forum over at JetBrains fyi .. . .. . JetBrains UPDATE : .. . .. . There seems to be other people encountering this same issue http : youtrack.jetbrains.net issue RSRP-274232 projectKey RSRP without mentioning Symantec .", "possible duplicate of ReSharper - force curly-braces around single line http : stackoverflow.com questions 3622236 resharper-force-curly-braces-around-single-line", "What version of ReSharper are you using", "Do you use ReSharper 6.1.1", "ReSharper has the habit of applying C Highlighting to XAML files meaning that every Node gets a Class Highlighting and so on .", "Resharper detects that using Dtos MyProduct.ServiceModel.Dtos is no longer in use after all the other using covers your shortened reference .", "For example with resharper when editing unit tests we have a green point on the side in order to execute it .", "If you re prepared to venture into ReSharper plug-in dev territory this yields a very very simple plug-in that would take minutes to implement .", "If I debug some unit tests with Resharper and those unit tests use the SMO SDK I get this error : .. . .. .", "Find option ReSharper Options - Code Editing C Formatting Style Other - Other Force this .", "When using the various navigation and usage features of ReSharper is there a way to make it hide some of the projects with tests in the solution", "Take a look at this Article http : blogs.jetbrains.com dotnet 2011 06 preventing-items-from-being-analyzed-in-resharper too", "For example when you search for types files or symbols with ReSharper you can restrict search scope with navigation combos .", "The installation path for Resharper appears different across several different computers we tried .", "So it seems as-if someone who installed ReSharper on the first machine used per-machine installation .", "Resharper - Options go to the General tab and change store caches in to system TEMP folder instead of solution folder", "Resharper 9 just added a new option Custom folder so you can put the cache anywhere event in ramdisk", "How can I remove a user category from a Resharper Live Template", "Is there a way as in Reflector and ILSpy to simply give ReSharper a standalone assembly file and decompile it", "I would like to be able to do this with the Resharper Icon that shows in the left margin .", "It causes the machine to automatically reboot after I randomly do things with ReSharper .", "In my previous company I was supposed to use it but the moment I installed ReSharper it completely hijacked the Visual Studio native intellisense .", "The installation path of R depends on which installation mode has been used - per-user LocalAppData or per-machine https : resharper-support.jetbrains.com hc en-us articles 206545259-How-do-I-install-ReSharper-for-All-Users-on-current-PC- Program Files x86 .", "I reported the issue to JetBrains and they requested a VS solution which has the problem ." ] }
{ "confidence": [ 37.05568313598633, 36.03459930419922, 35.134395599365234, 34.872535705566406, 34.86165237426758, 34.34858322143555, 33.819305419921875, 33.29242706298828, 33.05541229248047, 32.943382263183594, 32.85080337524414, 31.598217010498047, 31.484668731689453, 31.352924346923828, 31.215200424194336, 31.215200424194336, 31.18596076965332, 30.98492431640625, 30.823360443115234, 30.761425018310547 ], "content": [ "Question : I ve upgraded Resharper from 5 version to 6 version . After that when I type something inside VS I do see lags . I.e . text doesn t appear immediatly after key pressed . My CPU is pretty slow - it s Pentium U5400 However with Resharper 5 i didn t seen such lags . I was working pretty comfortable . Now I see lags . Is it because CPU is too slow or this is Resharper bug If Resharper 6 has new features which require CPU time while i m typing anything even comments It lags always . While I type comment in VS devenv.exe process takes 70 of CPU . I will test how Resharper 6 works on my desktop i7-860 in a moment . The question is why Resharper 6 takes much more CPU than Resharper 5 and what nice features I have for that upd on i7-860 while typing VS takes 10 of CPU what 70 of U5400 . So the question is elligable . why Resharper 6 takes much more CPU than Resharper 5 .. . Answer : Do you use ReSharper 6.1.1 If not then you should because it contains many performance fixes . If you use ReSharper 6.1.1 and still experience lags try to disable other Visual Studio extensions and plugins . If there is no extensions and plugins other that ReSharper 6.1.1 and typing is still slow then please make a performance snapshot and send it to JetBrains as described here here http : confluence.jetbrains.net display ReSharper ReSharper+Profiling+Instructions . Also you can try to disable ReSharper s typing assists features go to ReSharper Options - Environment Editor and disable all Auto- and Highlight options repeat at ReSharper Options - Code Editing HTML ASP.NET Razor Editor .", "Question : The installation path for Resharper appears different across several different computers we tried . In one the default location was .. . .. . C : Program Files x86 JetBrains Installations .. . .. . while on other computers it was .. . .. . C : Users my username AppData Locals Installations .. . .. . This usually would not be a problem but however since we re using dotCover from a batch-file we re referencing the dotCover.exe directly and the part my username changes with different systems . Also note that we re only using Resharper Ultimate 2016 . I want to confirm if this is intended or not . It is possible it could be problems due to our system but so far no other program have given varying install paths . .. . Answer : The installation path of R depends on which installation mode has been used - per-user LocalAppData or per-machine https : resharper-support.jetbrains.com hc en-us articles 206545259-How-do-I-install-ReSharper-for-All-Users-on-current-PC- Program Files x86 . By default ReSharper installer executes per-user installation but if one selects Options All Users chechbox ReSharper installer will execute per-machine installation . So it seems as-if someone who installed ReSharper on the first machine used per-machine installation . Comment : That makes sense", "Question : Back when I had ReSharper 5 my files would have all kinds of syntax-highlighting and a bar next to the scrollbar to the right . It was wonderful because it would highlight redundant imports and possible code smells as well mark things in the bar next to the scroll bar . With ReSharper 6 I don t have any of that . I have to actually have cursor on what I want to change and wait for the pencil or light bulb to show up . Is this how ReSharper 6 is by default or do I have to reinstall it Comment : Looks like your settings got messed up . Try re-installing . .. . Answer : Maybe the settings were not taken from the version 5 folder to the version 6 one . Try the following : .. . .. . Make sure you close Visual Studio . Go to : .. . .. . Note : this folder is from a Windows 7 machine since you didn t provide information on which version of visual-studio you are using I m putting x .. . .. . c : Users your user AppData Roaming JetBrains ReSharper v5.x vsxx.x .. . .. . In there you ll find a UserSettings.xml file open it for edit . Look for the SeverityTable node . Select it and copy it . Paste it on the same file that you ll find on the c : Users your user AppData Roaming JetBrains Resharper v6.0 vsxx.x folder . I recommend making a backup of the file before doing that . Reopen visual-studio . Resharper should be indicating all the recommendations and smells as it did before you updated it . Hope this helps .", "Question : I recently installed Resharper 6.1 in VS-2010 . I m using it with a rich web application with an Azure-based C back end and JQuery and other Javascript libraries on the front end . I love the way Resharper can parse my JS files and provide statement completion and the code-analysis has identified a number of style and syntax issues that I ve already fixed . HOWEVER I am now experiencing MAJOR typing latency in my IDE as Resharper works its magic . I have a quad core Intel i5 dev box with 6GB of RAM and the CPU is thrashing and memory usage shoots way up . The latency is so bad that any benefits from improved statement completion in JS files are lost . I have a number of other JS plugins that I ve temporarily disabled but this didn t help . I then turned off Resharper s Intellisense and reverted back to VS-2010 . This helped marginally but Resharper is still making the editing experience latent . I ve run out of ideas about how to improve its performance . Maybe it s not possible to speed things up.. . On paper it s everything I ve been looking for . But in practice it has turned my speedy development-machine into a 286 box from the 1980 s running Windows 3.1 . And as someone who was using 286-based Intel PC s back in the 1980 s...that is not a good thing Comment : Quick update : I just uninstalled ReSharper so I can try out some other ideas . I want to see how far I can get with reference path directives in VS-2010 for JS Intellisense e.g . reference path MyScripts.js I haven t thrown in the towel completely but if I can find something that s only a quarter as cool as ReSharper but that doesn t destroy my real-time editing experience in the IDE that ll be good enough for me . .. . Answer : I don t mean to be facetious but my recommendation is to uninstall the thing . My personal take is that all the benefits that ReSharper offers are marginal compared to the headaches that it creates . In my previous company I was supposed to use it but the moment I installed ReSharper it completely hijacked the Visual Studio native intellisense . My productivity actually went down instead of the other way around . Trying to figure out this thing through zillions of settings was quite frustrating . I then went around the team and asked what everyone else thought of it . Two out of three devs hated it and had already uninstalled . Comment : Accepting this as the answer . I ended up uninstalling ReSharper and am now using Reference directives in my JS files to get native VS-2010 JS intellisense . It s a manual per file process but now I have a responsive IDE again . My own view is that ReSharper is trying to do too many things at once . As you noted it hijacks the editor and in my case made it totally latent and sluggish .", "Question : ReSharper 6.0 seems to be conflicting with Symantec Endpoint Protection on my XP Pro SP3 machine at work . It causes the machine to automatically reboot after I randomly do things with ReSharper . If I uninstall 6.0 and install 5.1.3 I see no problem whatsoever . Anyone else ever encounter this Anyone know of a solution that would allow me to use 6.0 I have already posted this question on the forum over at JetBrains fyi .. . .. . JetBrains UPDATE : .. . .. . There seems to be other people encountering this same issue http : youtrack.jetbrains.net issue RSRP-274232 projectKey RSRP without mentioning Symantec . When anything happens to the issue at JetBrains I will update this question here on stack Thanks Comment : Have your admin turn on memory dumps for your system . Send the dumps to Symantec . .. . Answer : Are you seeing any errors in the Windows Event viewer What features of SEP are installed on this system You might try disabling one feature at a time to narrow down the cause of this issue . Also check the SEP logs for anything pointing to ReSharper . Can you tell me What version of SEP are you running P.S . I responded to your tweet so feel free to DM me there if you wish . Comment : Does SEP monitor assembly library loads If so do you test with Visual Studio and other applications that load a large number of libraries I had crashes from another vendors EP product some time ago caused by bugs that only showed up when large numbers of assemblies were loaded . Was able to repro by loading and unloading all assemblies from program files . Comment : I am seeing errors - 3 in fact . 1 MSSQL SQLEXPRESS - FallBack certificate initialization failed with error-code : 1 . 2 Schannel - A fatal-error occurred when attempting to access the SSL server credential private key.. . 3 DCOM - The application-specific permission settings do not grant Local Launch permission for the COM Server application with CLSID.. . Comment : As far as I am aware - it is all on work computer - not really allowed to modify it . Antivirus Antispyware Protection Proactive Threat Protection and Network Threat Protection are all on . It is version 11.0.5002.333 . Comment : It may not even be Symantec related after all . There are other people who are encountering the same problem and they do not mention Symantec at all - youtrack.jetbrains.net issue RSRP-274232 projectKey RSRP http : youtrack.jetbrains.net issue RSRP-274232 projectKey RSRP . If anything comes up from this jetbrains issue I will update this question on stack Comment : @DanAppleyard : keep in mind that ReSharper is user-mode code . It cannot crash your computer .", "Question : I have ReSharper 6.1 and can use the Navigate To Decompiled Sources command to decompile .NET assemblies for which I do not have source code . This is excellent when I want to take a peek inside an assembly which I have referenced in my code . Is there a way as in Reflector and ILSpy to simply give ReSharper a standalone assembly file and decompile it I want to take a deployed DLL from a server and view the decompiled code so I can verify it is the version I think it is . I am fully aware that the fact I am asking this means our versioning process leaves a lot to be desired but that s a different topic .. . Answer : Use dotPeek http : www.jetbrains.com decompiler which is a standalone application based on ReSharper decompiling engine or the other way around as you like Comment : I was even faster then the JetBrains marketing lead . Not bad . Do I get a commission Hehe.. . Comment : I see you work for JetBrains .. . is there any reason why this ability isn t built into ReSharper itself After all the decompiling engine is all there surely it would just need some kind of GUI . Comment : @DanielHilgarth Well done and an upvote from me . It s no problem though to be faster than me as I m a total slowpoke . Comment : @SirCrispalot I guess integrating this into VS would be an overkill : VS and ReSharper is intended to work with solutions projects and references not with individual files . As far as I know for use cases like yours a common solution implies using a standalone decompiler and associating .dll files with it .", "Question : I want to create a live template with resharper that allows me to write logging information inserting method name and method parameters something like this : .. . .. . I have in my code a method like this : .. . .. . Now I want to add logging so far I have two live templates created with resharper : .. . .. . Enter which template code is : .. . .. . And Exit which template code is : .. . .. . for METHOD NAME I ve choosen the macro : containing type member name .. . .. . Then after using these live templates my method ends as follows : .. . .. . which is fine . Now I want to modify my Enter template in order to have it inserting the list of arguments in this example param1 and param2 and make it usable for methods with different number of input params and different types . How can I do this I m using resharper 6 . Thanks in advance . .. . Answer : I am not sure this can be done actually not that I know of . Today I found myself needing the same thing so I am making a feature request http : youtrack.jetbrains.com issue RSRP-306415 to JetBrains . If you still care please vote for this .", "Question : I am trying to create a surround-with template with resharper that formats a selection like this .. . .. . into this : .. . .. . I want to select the A text with spaces myself press the surround-with shortcut and just watch it happen I have a template that produces .. . .. . ...but that s not good enough for me . Any suggestions Comment : could you create a method that formatted your string as you want it without spaces and camal-case so your call would be string foo Translate RemoveSpaces A text with spaces or include it in your Translate method Comment : Including it in my translate method would actually work . Creating such a method in code would not be that hard actually . Good thinking However I parse the .cs files for usages of Translate for other reasons and there it would be best to have the correct value directly . I guess I could use that same functionality there though.. . Comment : Thinking about it for another few seconds your approach has some other advantages . Seeing the value in code as it was originally written is beneficial What a difference a pair of new eyes have .. . Answer : If you re prepared to venture into ReSharper plug-in dev territory this yields a very very simple plug-in that would take minutes to implement . Basically what you can do is make a context action that when the caret is on a string literal would take said literal remove spaces with string.Replace then create a new expression using e.g . CSharpElementFactory.CreateExpressionAsIs Translate 1 x where x is the modified literal . If you re interested in doing this and need more info feel free to contact me skype : dmitri.nesteruk email : dn at jetbrains dot com with any questions you may have . Comment : Thanks I think I ll give that a try", "Question : How can I remove a user category from a Resharper Live Template When only a category is selected and not a template itself the delete button is disabled : .. . .. . Resharper Live Templates http : i.stack.imgur.com ofO1h.png .. . .. . None of the items provide context menus and editing a template does not provide any way to edit it s categories . .. . Answer : From the JetBrains issue tracker http : youtrack.jetbrains.com issue RSRP-287973 : .. . .. . There is a way . .. . You just select that category and drag the template out to the All category . and I feel I must also quote a user comment : .. . .. . Your solution works but is not intuitive at all . Quite . Comment : As a side note at least in R v10 this seems to only work if you drag one at a time.. .", "Question : I want to jump out from quotes . When I was not using ReSharper Tap key helped to jump out from double quotes but it is not working when using ReSharper . Of course I do not want to use right arrow key . Help please . reharper http : i.stack.imgur.com viO6Y.png Comment : What is tap key Comment : @Snowbear I think he meant Tab .. . .. . Answer : If you re looking to jump out of the method arguments altogether use Ctrl+Shift+Enter Complete Statement . If your intention is to quit the current string value to start entering the next argument then I m not sure anything apart from the right arrow or Ctrl + right arrow will work . What s the Tap key btw Comment : tap key works the same as Ctrl + right arrow key . That is what I was looking for . ctrl+shift+enter seems useful but it does not do anything in my vs Comment : Weird : the shortcut for Complete Statement is the same between both keymaps . Try going to Tools Options Environment Keyboard and see if ReSharper.ReSharper CompleteStatement is assigned this shortcut it could possibly be used by another command related or not related to ReSharper . Btw here s an old yet useful post on using Complete Statement in different scenarios : blogs.jetbrains.com dotnet 2008 05 http : blogs.jetbrains.com dotnet 2008 05 resharper-in-detail-complete-statement-scenarios", "Question : I know this has been asked before but there was no solution to the problem and it was last year so I thought maybe someone has found something to solve this by now . I am using VS2010 with SP1 . before installing the SP1 there was no problem . if I uninstal re it works fine . I have an ASP.Net website and some other projects . The classes from the other projects are not recognized resharper suggests using the other project so I do so it puts it up at the usings then the using also gets a cannot resolve symbol . I have tried the suggestions they gave in 2011 here http : stackoverflow.com questions 5539131 resharper-cannot-resolve-symbol-eval-in-vs2010-sp1 but nothing . if I delete the Resharper . and restart vs it will work for 5 seconds then all red again.. . .. . .. . hope someone found a solution to this since then...thanks .. . .. . Edit : I have noticed it does this with Web Services Comment : Resharper can not resolve symbol even when project builds http : stackoverflow.com questions 15713167 resharper-can-not-resolve-symbol-even-when-project-builds .. . Answer : I was having the same problem with one of my projects . I reported the issue to JetBrains and they requested a VS solution which has the problem . So I decided to spend a few hours trying to narrow down the problem as much as possible . I found out that the issue is related to a tool I use which strips out information from .DLLs . If I don t strip the .DLLs Resharper works fine without showing any cannot resolve symbol errors . However If I do strip the .dll then ReSharper starts to show these cannot resolve symbol errors . In both cases Visual Studio compiles the program and the program runs fine . I am working with JetBrains to get the issue resolved . In the mean time I am able to workaround the problem by using versions of my .DLLs which do not have any information stripped out of them .", "Question : I am using Specflow http : specflow.org to write some integration tests and I would like to run a single Scenario . Is there any way to run a single scenario with Resharper 6 BTW I configured specflow to use MSTest . My Specflow test looks like : .. . .. . I want to run only the first scenario . .. . Answer : If you are running with ReSharper as I am I just open the Feature file the right-click anywhere within a Scenario and select Run Specflow Scenarios from the pop-up menu . It runs just the one scenario you are in . Please note I am using ReSharper to run the tests .", "Question : I downloaded StyleCop 4.6.3 which integrates with ReSharper 6 and the results are really fantastic However on a specific project I would like to disable the StyleCop warnings temporarily and enable again later on . Is there any way of doing this I can t seem to find it on the ReSharper menu options etc . .. . Answer : You can use different Settings.Stylecop settings for each project just create one that ignores all the rules . Right click on a project and select Stylecop settings to modify them . I think you can also disable plugins by unticking them from ReSharper- Plugins.. . in version 5.1 not sure if it s the same in 6.0 Comment : That did it : Thank you I unchecked it from the Plugins and it worked . The solution with using different Settings.Stylecop settings is also interesting . Anyway the combination of StyleCop and ReSharper rocks : Thanks again .", "Question : I renamed a folder and updated my namespace declarations but Resharper 6 keeps trying to tell me that the namespace should be a reflection of how it was before the rename . Where on earth is it storing the file location data Comment : I suggest that you delete all .ReSharper files . Resharper will recreate them from scratch without the garbage . Comment : I thought I had . I suppose I should give it another go . Comment : Did it work I will move my comment into an answer . Comment : It s all in .ReSharper files . If all were deleted and you still get a namespace issue I believe it is indeed related to your folder s structure.. . Comment : This also happened to me using Resharper 8.2.3 . The problem is that it was ignoring folders with a space in the name . So MyProject Service Contracts Common was resolving to MyProject Common instead of the expected MyProject Service Contracts Common .. . Answer : I also had this problem with a folder namespace and none of the above steps fixed it . In my case I had to do this in Visual Studio : .. . .. . Right-click the problem folder in the solution-explorer to open the properties .. . Ensure the Namespace Provider is set to true .. . .. . This fixed the ReSharper issue for me and I was able to adjust namespaces as normal .", "Question : ReSharper 6 creates folders like ReSharper.projectname with the files and folders below in it . That caused a lot of problems with MSDeploy and source control in general . I had to add ignore rules everywhere . What s the right way to prevent that from happening Is switching back to Visual Studio Intellisense enough .. . Answer : Resharper - Options go to the General tab and change store caches in to system TEMP folder instead of solution folder Comment : I was lost in the options dialog thanks", "Question : ReSharper 6 creates folders like ReSharper.projectname with the files and folders below in it . That caused a lot of problems with MSDeploy and source control in general . I had to add ignore rules everywhere . What s the right way to prevent that from happening Is switching back to Visual Studio Intellisense enough .. . Answer : Resharper 9 just added a new option Custom folder so you can put the cache anywhere event in ramdisk", "Question : I ve searched around a bit for this and tried a few things and can t get it to work without turning some stuff off that I want on . Normally I let Resharper have its way with namespace optimizations . In a Service implementation that s mapping DTO s to Domain Model objects it s a nice visual to create an alias for each . That way when it s late and you re sleep deprived seeing Dtos.Customer and DomainModel.Customer helps . When I run code-cleanup it changes those to : .. . .. . Does anyone do this or something similar and keep R from whacking it .. . Answer : This is something ReSharper will do when you let it : shorten references on code-cleanup . Even though this behavior might be unwanted for you it s technically seen correct . Because in your code it ll shorten something . And that s what the algorithm is supposed to do . This is how the algorithm works that causes this result : .. . .. . 1 . Resharper finds a reference that can be made shorter you ve not given me enough code to exactly tell you where but that doesn t matter . 2 . After shortening it needs to assure that the object can be resolved so it adds a new using for it using Customer MyProduct.Core.Domain.Model.Customer in your case . 3 . Resharper detects that using Dtos MyProduct.ServiceModel.Dtos is no longer in use after all the other using covers your shortened reference . And removes it . This is what I suspect is causing this . I cannot be 100 certain without seeing the actual usages in code . But this is most likely the cause of the refactoring . Comment : I see I also see why it s getting rid of the using Dtos alias . Something else needs a ref to MyProejct.ServiceModel . I suppose creating a code-cleanup profile that doesn t optimize using-directives would work .", "Question : I renamed a folder and updated my namespace declarations but Resharper 6 keeps trying to tell me that the namespace should be a reflection of how it was before the rename . Where on earth is it storing the file location data Comment : I suggest that you delete all .ReSharper files . Resharper will recreate them from scratch without the garbage . Comment : I thought I had . I suppose I should give it another go . Comment : Did it work I will move my comment into an answer . Comment : It s all in .ReSharper files . If all were deleted and you still get a namespace issue I believe it is indeed related to your folder s structure.. . Comment : This also happened to me using Resharper 8.2.3 . The problem is that it was ignoring folders with a space in the name . So MyProject Service Contracts Common was resolving to MyProject Common instead of the expected MyProject Service Contracts Common .. . Answer : As delliottg s http : stackoverflow.com users 811329 delliottg comment In Visual Studio go to .. . .. . Project project name Properties Application .. . .. . and change .. . .. . Assembly name .. . .. . as well as .. . .. . Default namespace .. . .. . .", "Question : I m using resharper with nunit . As seen in the picture all test are passed in a text fixture but text fixture fails . All my test cases are parameterized by the way . How does this happen When I click on the text Fixture it says : Failed : Child test failed .. . .. . enter image description here http : i.stack.imgur.com vzlcE.png Comment : When you click on fixture what s written in description window Comment : have you tried running your tests in the NUnit console runner .. . Answer : I downloaded nunit installer and run the test with nunit GUI . nunit showed 2 failed tests . I fixed them and now resharper shows it right . Looks like it is a bug with resharper 6 .", "Question : I would like to create custom templates for c files unit test classes .aspx.cs etc so that common items to all files are included once they are created eg file headers . I am working with visual-studio-2010 and resharper 6 . What is the easiest way to create these files and is it possible to be able to share them a team of developers easily Appreciate any assistance or information as to how I might achieve this . .. . Answer : You should open Templates Explorer from ReSharper Templates Explorer . Then select the File Templates tab . There are default templates that comes with ReSharper . You can examine them and see how you can write your own . Here s the documentation http : www.jetbrains.com resharper features code templates.html File Templates and there s a question http : stackoverflow.com questions 186970 what-resharper-4-live-templates-for-c-sharp-do-you-use for useful examples ." ] }
[ "yes-answer-long", "yes-answer-short" ]
visual-studio
UNK_RELATION
basehttpserver@web@67
basehttpserver -- this python class is used to make a simple http @placeholder server .
{ "confidence": [ 40.91156005859375, 39.375, 39.17063903808594, 35.5972900390625, 35.17886734008789, 34.60231018066406, 33.538028717041016, 33.501888275146484, 32.41871643066406, 32.21571350097656, 32.113868713378906, 31.943103790283203, 31.392311096191406, 31.207063674926758, 30.65924072265625, 28.97907829284668, 28.405467987060547, 28.215892791748047, 28.022768020629883, 27.921184539794922, 27.9146728515625, 27.78926658630371, 27.77271842956543, 27.614179611206055, 27.522504806518555, 27.442157745361328, 27.10387420654297, 27.092159271240234, 26.99094009399414, 26.24102210998535, 26.103565216064453, 26.037700653076172, 25.842342376708984, 25.842342376708984, 25.842342376708984, 25.842342376708984, 25.842342376708984, 25.829559326171875, 25.52203941345215, 25.287046432495117, 25.136234283447266, 25.07646369934082, 24.93142318725586, 24.759946823120117, 24.727712631225586, 24.703433990478516, 24.282272338867188, 24.23485565185547, 24.149394989013672, 24.149394989013672, 24.149394989013672, 23.9835205078125, 23.9835205078125, 23.982524871826172, 23.963024139404297, 23.903610229492188, 23.884479522705078, 23.868408203125, 23.861019134521484, 23.76629066467285, 23.4650936126709, 23.434894561767578, 23.400123596191406, 23.391799926757812, 23.294960021972656, 23.034767150878906, 22.852489471435547, 22.591203689575195, 22.515071868896484, 22.503067016601562, 22.503067016601562, 22.430328369140625, 22.351743698120117, 22.22344970703125, 22.180856704711914, 22.180856704711914, 22.1782169342041, 22.153522491455078, 21.913681030273438, 21.869007110595703, 21.869007110595703, 21.869007110595703, 21.869007110595703, 21.869007110595703, 21.869007110595703, 21.831729888916016, 21.6988525390625, 21.6988525390625, 21.570236206054688, 21.50278091430664, 21.50278091430664, 21.40653419494629, 21.319499969482422, 21.132396697998047, 21.121959686279297, 20.88768768310547, 20.817399978637695, 20.750167846679688, 20.5089054107666 ], "content": [ "I am hosting a http server on Python using BaseHTTPServer module .", "I have the following code for a simple BaseHTTPServer based server .", "BaseHTTPServer is not a production grade server .", "2 . i run a python basehttpserver on a virtual-machine with Ubuntu Server 12.04.2 .", "example basehttpserver .. . .. . screenshot from server", "I m using python-2.7 and I want to implement the do TRACE function for my HTTP server and I m using the BaseHTTPServer library .", "Reference : http : docs.python.org 2 library basehttpserver.html .. . .. . I have the following code snippet which uses Python BaseHTTPServer to run a basic HTTP server .", "I used BaseHttpServer .", "I am using a simple BaseHTTPServer in Python 2.6.6 or 2.7.5 The docs state that it is singlethreaded and I can find no clue in the docs or the sourcecode for BaseHTTPServer or SocketServer that this is not the case .", "I am using the method do GET of class BaseHttpServer .", "I am trying to make a BaseHTTPServer program .", "The reason I would like to use BaseHTTPServer is that I found this example : fraka6.blogspot.de 2013 05 http : fraka6.blogspot.de 2013 05 the-simple-python-server-example.html", "I used the example found at https : wiki.python.org moin BaseHttpServer modifying the server name to my domain and the port to a four digit number .", "I m trying to use BaseHttpServer in Python2.7 to make a simple HTTP SERVER and the problem is when want to set multiple cookies on the browser via .. . .. . everything after n is not sent", "What am I missing server configuration-wise or code-wise to successfully reach this BaseHTTPServer", "I m sending a couple of files from an HTML form to my server which is based on BaseHTTPServer .", "I am running a server with BaseHttp with python .", "Make sure that you are serving protovis protovis.js using your BaseHTTPServer .", "is it a bug in Python2 BaseHttpServer", "The 2.7 documentation states right at the top Note The BaseHTTPServer module has been merged into http.server in Python 3 .", "server.socket.close .. . .. . It would be excellent to configure the http server with the following callbacks : .. . .. . before starting the server .. . after starting the server .. . before stopping the server .. . after stopping the server .. . .. . Is there a way to setup these callbacks in Python BaseHTTPServer.HTTPServer", "here is a reference : link http : www.doughellmann.com PyMOTW BaseHTTPServer index.html module-BaseHTTPServer threading forking", "i m trying to upload a file using python-2.7 requests and BaseHTTPServer here s the server POST config .. . .. . the client is quite simple .. . .. . The error message which i get says Nothing matches the given URI .", "I also recommend using a better HTTP framework server than BaseHTTPServer for more than very basic tests flask bottle tornado etc .", "I m using BaseHTTPServer to serve web content .", "I am writing a simple http server as part of my project .", "might be a general http server concept and not specific to Python .. . .. . Why can t it be like anybody who knows the IP of the machine could connect to the http server", "Is it possible to have a really singlethreaded baseHttpServer", "I am taking a python course where they use BaseHTTPServer .", "I have some relatively large .js files flot and jquery to serve with a Python BaseHTTPServer .", "I tried to create a HTTP-server in Python using Threading : .. . .. . The server works well but if two request are same time they are executed sequentially .", "It would be excellent to configure the http server with the following callbacks : .. . .. . before starting the server .. . after starting the server .. . before stopping the server .. . after stopping the server .. . .. . Bear in mind that the OS will start accepting and queuing TCP connections the moment the socket starts listening which is done in the constructor of BaseHTTPServer so if you want to perform lengthy tasks before starting the server it s probably better to do them before the OS starts accepting connections .", "I wouldn t really suggest using BaseHTTPServer .", "That s not valid in a header and that s nothing to do with BaseHttpServer .", "My main application continues to work but BaseHTTPServer does not .", "Also your best option : Don t use BaseHTTPServer .", "The whole BaseHTTPServer module has very little documentation :", "Is it possible to modify the 404 response page sent from pythons basehttpserver library", "Next I fork according to the info here : Daemonizing python s BaseHTTPServer http : stackoverflow.com questions 888834 daemonizing-pythons-basehttpserver .. . .. . Then I do : .. . .. . What I am trying to do is have the same Python script run a Tornado WebSocket server as well I tried creating the second handler and in my main creating the second server similar to above but then the serve forever blocks I assume and I can t start the Tornado WebSocket server .", "Simple server stoppable with user action SIGTERM Ctrl+C .. . : .. . .. . Server running in a thread :", "After a bit of googling I finally stumbled over this BaseHTTPServer documentation http : pymotw.com 2 BaseHTTPServer index.html module-BaseHTTPServer and after that I ended up with : .. . .. . Which for the most part comes after I fork and ended up resolving my problem .", "Screenshot server http : i.stack.imgur.com FrC9y.png", "I m trying to exchange data using jsonp between a python server and a webbrowser .", "I m using Python 2.7.8 to make an server from where I can download files .", "I am running a website using basehttpserver .", "Im trying to write a simple Http proxy with python .", "I am working under CentOS 6.2 with python-2.6 is there anything special I need to do in baseHTTPserver to include that javascript library that I am using", "BaseHTTPHandler from the BaseHTTPServer module doesn t seem to provide any convenient way to access http-request parameters .", "With your code it s going to be requested from the same BaseHTTPServer .", "Unlike Apache+PHP BaseHTTPServer will not just serve anything you put into that folder .", "They provide a much quicker path to handling these things than BaseHTTPServer .", "When an error occurs in the HTTP server e.g .", "Your problem is not related much to HTTP server .", "I am building a python based web server del Yes python is a bad choice for web server but this is the only choice I have del There is another great choice for my purpose e.g .", "I was trying to make the most basic server that could handle get and post requests in Python and only yours worked for me in handling POST requests .", "I am very new to the language C guy by trade but have gotten simple scripts to run on the server .", "I solve the problem creating a static-class http : stackoverflow.com questions 68645 static-class-variables-in-python and using in static-class global-variables .", "After you resolve problems with calling the script it shall be easy to make it working inside of your HTTP server .", "The server ran and stayed up .", "If you re simply looking for hosting Python than why not use an existing http server like nginx apache or lighttpd", "The best simplest solution that I have found is : from BaseHTTPServer import BaseHTTPRequestHandler class QuietBaseHTTPRequestHandler BaseHTTPRequestHandler : def send response self code message None : pass", "Are there compelling reasons to go the more complicated Apache route more complicated to me because I will need to do research on configuring Apache and getting mod-wsgi going but already have a test instance of BaseHTTPServer up and running or is it equally safe secure very important and performance-oriented to use BaseHTTPServer for something so simple", "If set to HTTP 1.1 the server will permit HTTP persistent connections however your server must then include an accurate Content-Length header using send header in all of its responses to clients .", "I am having the same issue with a basehttpserver on OSX .", "I face problems in case-when my http server is connected to two networks at the same time and I want to serve the http server on both the networks .", "There is a controller with a cellular modem on it which hosts the website and runs the basehttpserver .", "If you want to suppress the traceback you will need to extend the BaseHTTPServer class and override the handle one request method to add a try .. . except block .", "Specify 0.0.0.0 or empty string to make the server accept connections from anywhere .", "I m trying to figure out how to set up a basic web server in Python but I m having a lot of difficulty .", "this is my http server : .. . .. . I need to acces instance t1 inside of myHander .", "I am working on a daemon where I need to embed a HTTP server .", "I tried to hit the server in various ways with no success .", "I have these two Python scripts I m using to attempt to work out how to send and receive POST requests in Python : .. . .. . The Client : .. . .. . The Server : .. . .. . The problem is that the server hangs on self.rfile.read until conn.close has been called on the client but if conn.close is called on the client the client cannot receive a response from the server .", "I am trying to build a simple web server that receives GPS coordinates through POST requests and then shows them on a webpage .", "This is my server code .", "Then where is the server folder", "I found a very complex example here https : chromium.googlesource.com external googleappengine python + 9e962efff462d9ed00a8bee046a85d0d631861cb google appengine tools dev appserver.py where BaseHTTPServer is used but this is too complex for me yet .", "BUT when the request arrives an exception is raised : .. . .. . Question : Is there a version of BaseHTTPServer or http.server that works out of the box with Python3.x or am I doing something wrong", "You shall not bind your server to 127.0.0.1 which is visible only from localhost but better to 0.0.0.0 or to an IP of network-interface on your server .", "Solution .. . .. . Unlike Apache+PHP BaseHTTPServer will not just serve anything you put into that folder .", "In looking on stackoverflow it seems I can potentially go with BaseHTTPServer and ThreadingMixIn or Apache and mod-wsgi .", "I now see that the init for the BaseRequestHandler looks like this : .. . .. . So I will extend the BaseHTTPServer to contain a queue then it will be available to the handler .", "So I would like to use BaseHTTPServer now and subclass do GET self instead .", "I believe this has something to do with the fact that BaseHTTPServer sends log data to STDOUT and STDERR .", "Here is the code snippet : .. . .. . Am I doing something wrong here or is BaseHTTPServer somehow prevented from becoming daemonized", "my HTML bootstrap code is .. . .. . JavaScript Display function : .. . .. . Python baseHTTPServer code is : .. . .. . Any kind of help would be highly appreciated Thanks in Advance :", "It is because BaseHTTPServer is performing by default a lookup on the client IP for logging purpose .", "I m running a BaseHTTPServer passed through ThreadedHTTPServer so I get threading .", "How do you start the server", "I wrote a little http server using BaseHTTPServer and BaseHTTPRequestHandler now everything works great except that in the do GET method I can t manage to except the following error : .. . .. . I know that this is a socket.error exception with the errno of 10054 but when I surround the problematic block with try-except this exception is not being excepted as I wished .", "I ve looked into changing the php http-headers with no luck and hosting the website externally on an IIS server it loads just fine no ping issues - so I know it s something to do with the basehttpserver.. . but other than that I m a bit out of my depth .", "Here is a stripped down version of my class : .. . .. . Since then handler gets created by the BaseHTTPServer I don t think I can alter the init method to pass in a queue .", "Are there any headers sent to the server to indicate this that I can grab", "I have a Python script that implements a built-in web server : .. . .. . This works fine however the problem is that the python script also implements an on-screen status display using curses running in another thread .", "log server http : i.stack.imgur.com eoQqM.png .. . .. . IP machine with ubuntu-server 192.168.101.3 .. . .. . Sorry for my English .", "I am setting up a very simple HTTP server for the first time am considering my options and would appreciate any feedback on the best way to proceed .", "Additionally if you want your HTTP server to process more than one request at a time you need your server class to use one of the SocketServer.ForkingMixIn and SocketServer.ThreadingMixIn classes .", "You are providing your own handler for the server .", "When I start the server and go to http : 127.0.0.1 : 8080 both of my messages display and everything is fine ." ] }
{ "confidence": [ 42.404170989990234, 42.25636291503906, 39.393760681152344, 39.31153869628906, 39.28348159790039, 39.19111633300781, 39.03260803222656, 38.50703430175781, 38.463436126708984, 37.411460876464844, 37.395503997802734, 37.19998550415039, 37.097900390625, 36.95709991455078, 36.88279342651367, 35.69194412231445, 35.3653450012207, 34.927608489990234, 34.587623596191406, 34.56868362426758 ], "content": [ "Question : I am writing a foosball ladder for my office in Python to be served on my HostGator shared-hosting . I am very new to the language C guy by trade but have gotten simple scripts to run on the server . I used the example found at https : wiki.python.org moin BaseHttpServer modifying the server name to my domain and the port to a four digit number . I got HostGator support to open the corresponding outgoing port . I then chmodded the script with a+x and executed it . Success The server ran and stayed up . I tried to hit the server in various ways with no success . http : mydomain.com path to script .. . http : mydomain.com : port path to script .. . http : mydomain.com : port .. . A GET request to the paths above . What am I missing server configuration-wise or code-wise to successfully reach this BaseHTTPServer .. . Answer : You shall not bind your server to 127.0.0.1 which is visible only from localhost but better to 0.0.0.0 or to an IP of network-interface on your server . Start with 0.0.0.0 which will bind to all network interfaces . If it does not help than you shall check if firewall allows access to given port . Comment : It is most likely inbound ports being blocked by HostGator so this advice definitely led me in the right direction .", "Question : I m trying to exchange data using jsonp between a python server and a webbrowser . The client-side looks like this using jQuery and works just fine : .. . .. . After the initial init lines the python server socket reaches a string like this : .. . .. . Now I would like to return a string like this with reply containing that is a test : .. . .. . For the communication I use a simple socket right now . But that works not really good . I searched for a little more high level solution . So I would like to use BaseHTTPServer now and subclass do GET self instead . But I don t know how to realize the communication above . Can anybody help Comment : The reason I would like to use BaseHTTPServer is that I found this example : fraka6.blogspot.de 2013 05 http : fraka6.blogspot.de 2013 05 the-simple-python-server-example.html Comment : I wouldn t really suggest using BaseHTTPServer . Flask http : flask.pocoo.org is simpler . Tornado http : www.tornadoweb.org en stable scales better . .. . Answer : I just found the solution . You can get the request paramters by using self.path and reply by using self.request.sendall . Here is the code :", "Question : I am setting up a very simple HTTP server for the first time am considering my options and would appreciate any feedback on the best way to proceed . My goal is pretty simple : I m not serving any files I only need to respond to a very specific HTTP POST request that will contain geolocation data run some Python code and return the results as JSON . I do need to be able to respond to multiple simultaneous requests . I would like to use HTTPS . In looking on stackoverflow it seems I can potentially go with BaseHTTPServer and ThreadingMixIn or Apache and mod-wsgi . I already have Apache installed but have never configured it . Are there compelling reasons to go the more complicated Apache route more complicated to me because I will need to do research on configuring Apache and getting mod-wsgi going but already have a test instance of BaseHTTPServer up and running or is it equally safe secure very important and performance-oriented to use BaseHTTPServer for something so simple .. . Answer : BaseHTTPServer is not a production grade server . If you don t understand how to set up Apache but want to get something with mod-wsgi running quickly and easily then you probably want to look at mod-wsgi express . This gives you a way of installing mod-wsgi using Python pip and also provides you a way of starting up Apache mod-wsgi with a auto generated Apache and mod wsgiconfiguration such that you don t even need to know how to configure Apache . The next version of mod-wsgi express to be released version 4.3.0 likely released this week can even set up a HTTPS site for you with you just needing to have obtained a valid certificate or generated a self-signed certificate . I would suggest if interested you use the mod-wsgi mailing list to ask for more details about using mod-wsgi express for running a HTTPS site . http : code.google.com p modwsgi wiki WhereToGetHelp tm 6 Asking Your Questions .. . .. . You can start playing around though with it for a normal HTTP site by following instructions at : .. . .. . https : pypi.python.org pypi mod-wsgi", "Question : I am building a python based web server del Yes python is a bad choice for web server but this is the only choice I have del There is another great choice for my purpose e.g . PHP but I am restricted to python .. . .. . I use ProtoVis for some data-visualization . a JavaScript based visualization tool .. . .. . The following piece of code works if I just copy and paste them into a test file and rename .html provided that I have the protovis library extracted beside it .. . .. . If you want to try get it here https : github.com mbostock protovis zipball v3.3.1 .. . .. . However if I return the above code in a baseHTTPserver it does not seem to work . From my investigation it seems that the library at protovis protovis.js is not properly included . where chart function returns the lines above . I am working under CentOS 6.2 with python-2.6 is there anything special I need to do in baseHTTPserver to include that javascript library that I am using The same code worked fine with Apache + PHP where I simply echo them . Any idea Solution .. . .. . Unlike Apache+PHP BaseHTTPServer will not just serve anything you put into that folder . You have to either do it yourself as Matthew described or serve protovis.js from a different server could even be a SimpleHTTPServer running on a different port . Vasiliy Faronov .. . .. . See Matthew Adams s instruction below .. . .. . What I had to do to fix the problem was to add another method into do GET that handles the JavaScript file .. . .. . which solves the problem . Thank you all for the solution I really appreciate it Comment : Are you sure that this : script type text javascript+protovis isn t causing your problem What happens if you leave off the type attribute altogether it s not really necessary unless you re truing to prevent the browser from interpreting the code . Comment : Psst : do not tell all the python http : www.webob.org web http : flask.pocoo.org frameworks http : www.pylonsproject.org that https : www.djangoproject.com python https : developers.google.com appengine isn t http : www.zope.org suitable http : www.tornadoweb.org for http : web-core.org the http : grok.zope.org web . Comment : If I just copy and paste the above HTML code into a text file and saveas .html it works OK . script type text javascript+protovis didn t cause me any trouble this method Comment : Oh and how do you actually serve protovis protovis.js With your code it s going to be requested from the same BaseHTTPServer . Comment : Unlike Apache+PHP BaseHTTPServer will not just serve anything you put into that folder . You have to either do it yourself as Matthew described or serve protovis.js from a different server could even be a SimpleHTTPServer running on a different port . .. . Answer : Make sure that you are serving protovis protovis.js using your BaseHTTPServer . Basically the browser will see the line script type text javascript src protovis protovis.js script when it is reading the html output it gets and then request that the server actually send the protovis protovis.js file . I didn t see the python code in that github download so I can t specifically show how to do this in the context of your code but check out SimpleHTTPRequestHandler . Using that you can add to the do GET method to have the server send protovis protovis.js when it is requested that is when self.path is protovis protovis.js . Comment : Yes I ve followed your instruction . I ve added a method into do GET which reads protovis protovis.js It works now . Thank you very much", "Question : I have the following code for a simple BaseHTTPServer based server . I was expecting the HTML page to show 1 but it shows 0 . How can I update the response through keep alive .. . Answer : I believe you are setting self.protocol version to HTTP 1.1 too late . You are doing it in your do GET method at which point your request handler has already been instantiated and the server has already inspected that instance s protocol version property . Better to set it on the class :", "Question : I m trying to use BaseHttpServer in Python2.7 to make a simple HTTP SERVER and the problem is when want to set multiple cookies on the browser via .. . .. . everything after n is not sent it seems send header drops anything after n so the browser only receives A LDJDSFLKSDJLDSF any suggestions on how to solve this is it a bug in Python2 BaseHttpServer and thanks in advance . .. . Answer : That s not valid in a header and that s nothing to do with BaseHttpServer . You can only set one cookie in a single header however you can certainly send multiple headers . So :", "Question : Is there a way to make BaseHTTPServer.HTTPServer be multi-threaded like SocketServer.ThreadingTCPServer Comment : Is there a reason why you need it to be Comment : Because I want a basic web server that can handle concurrency I also don t need want an all out framework like web.py cherrypy or anything like that I just want a really basic webserver like BaseHTTPServer that can handle multiple concurrent requests . Comment : Use Apache and mod-wsgi . Comment : here is a reference : link http : www.doughellmann.com PyMOTW BaseHTTPServer index.html module-BaseHTTPServer threading forking .. . Answer : You can simply use the threading mixin using both of those classes to make it multithread : .. . .. . It won t help you much in performance though but it s atleast multithreaded . Comment : This looks like a solution. . however I d rather opt to write my own server than use something slow. . : Comment : If you re simply looking for hosting Python than why not use an existing http server like nginx apache or lighttpd As for the performance threading it will allow you to make multiple concurrent connections without blocking so in the case of multiple simultaneous requests it will be faster . But it will still use only 1 processor . Comment : I m not looking for that I m making a Queue server that takes incoming requests http or some similar format and does an action based on the request . Comment : here is a reference : link http : www.doughellmann.com PyMOTW BaseHTTPServer index.html module-BaseHTTPServer threading forking Comment : @Ian : since you re making a queue server you might want to try some other technology . Take a look at the eventlet library : wiki.secondlife.com wiki Eventlet http : wiki.secondlife.com wiki Eventlet", "Question : I have the following code for a simple BaseHTTPServer based server . I was expecting the HTML page to show 1 but it shows 0 . How can I update the response through keep alive .. . Answer : https : docs.python.org 2 library basehttpserver.html .. . .. . protocol version .. . .. . This specifies the HTTP protocol version used in responses . If set to HTTP 1.1 the server will permit HTTP persistent connections however your server must then include an accurate Content-Length header using send header in all of its responses to clients . For backwards compatibility the setting defaults to HTTP 1.0 .", "Question : I am working on a daemon where I need to embed a HTTP server . I am attempting to do it with BaseHTTPServer which when I run it in the foreground it works fine but when I try and fork the daemon into the background it stops working . My main application continues to work but BaseHTTPServer does not . I believe this has something to do with the fact that BaseHTTPServer sends log data to STDOUT and STDERR . I am redirecting those to files . Here is the code snippet : .. . .. . Am I doing something wrong here or is BaseHTTPServer somehow prevented from becoming daemonized Edit : Updated code to demonstrate the additional previously missing code flow and that log.debug shows in my forked background daemon I am hitting code after fork . .. . Answer : Just use daemontools http : cr.yp.to daemontools.html or some other similar script instead of rolling your own daemonizing process . It is much better to keep this off your script . Also your best option : Don t use BaseHTTPServer . It is really bad . There are many good HTTP servers for python i.e . cherrypy http : cherrypy.org or paste http : pythonpaste.org . Both includes ready-to-use daemonizing scripts . Comment : Why exactly is it BAD please this is one of the top results in google.. . There are a massive amount of prebuilt python library s for http so more of a description of those would be amazing as well .", "Question : I am working on a daemon where I need to embed a HTTP server . I am attempting to do it with BaseHTTPServer which when I run it in the foreground it works fine but when I try and fork the daemon into the background it stops working . My main application continues to work but BaseHTTPServer does not . I believe this has something to do with the fact that BaseHTTPServer sends log data to STDOUT and STDERR . I am redirecting those to files . Here is the code snippet : .. . .. . Am I doing something wrong here or is BaseHTTPServer somehow prevented from becoming daemonized Edit : Updated code to demonstrate the additional previously missing code flow and that log.debug shows in my forked background daemon I am hitting code after fork . .. . Answer : Here s how to do this with the python-daemon http : pypi.python.org pypi python-daemon library : .. . .. . As usual for a daemon you need to decide how you will interact with the program after it becomes a daemon . For example you might register a systemd service or write a PID file etc . That s all outside the scope of the question though . Comment : Works great to start the daemon but how would I use it with start and stop commands So far I wasn t able to stop the daemon . Comment : How do you stop this daemon", "Question : Reference : http : docs.python.org 2 library basehttpserver.html .. . .. . I have the following code snippet which uses Python BaseHTTPServer to run a basic HTTP server . What I am looking for is a way to get a callback whenever the http server is started stopped using server.serve forever server.socket.close methods . Say we have the following functions : .. . .. . I want http server start callback function to be called right after whenever I start the server i.e . server.serve forever and I want http server stop callback function to be called right after whenever I stop the server i.e . server.socket.close .. . .. . It would be excellent to configure the http server with the following callbacks : .. . .. . before starting the server .. . after starting the server .. . before stopping the server .. . after stopping the server .. . .. . Is there a way to setup these callbacks in Python BaseHTTPServer.HTTPServer .. . Answer : It would be excellent to configure the http server with the following callbacks : .. . .. . before starting the server .. . after starting the server .. . before stopping the server .. . after stopping the server .. . .. . Bear in mind that the OS will start accepting and queuing TCP connections the moment the socket starts listening which is done in the constructor of BaseHTTPServer so if you want to perform lengthy tasks before starting the server it s probably better to do them before the OS starts accepting connections . There s a server activate method which makes the call to socket.listen so it s probably best to override that . Similarly the OS will continue to accept connections until the call to socket.close so if you want to be able to define a pre-stop handler which has the capacity to prevent itself from being shutdown it s probably better to use the server close method rather than calling socket.close directly . I ve put together a simple example using class methods on the request handler to handle the four new events although you can move them somewhere else.. . Note that I ve also moved the call to the constructor into its own try...except block since the server variable won t exist if you hit CTRL-C during its construction . Comment : Elegant solution Thanks Comment : Thanks for the solution . Suppose I run this script . Then where is the server folder I mean I have a file say numbers.txt . I will to add it into the server folder and call it say by localhost numbers.txt .", "Question : I m running a BaseHTTPServer passed through ThreadedHTTPServer so I get threading . Next I fork according to the info here : Daemonizing python s BaseHTTPServer http : stackoverflow.com questions 888834 daemonizing-pythons-basehttpserver .. . .. . Then I do : .. . .. . What I am trying to do is have the same Python script run a Tornado WebSocket server as well I tried creating the second handler and in my main creating the second server similar to above but then the serve forever blocks I assume and I can t start the Tornado WebSocket server . I had considered using Tornado to serve my general web stuff too but performance was aweful and unusable so I d prefer to run it alongside unless there is a simpler alternative to adding WebSockets to the BaseHTTPServer . Can anyone offer a solution please Comment : performance was aweful and unusable It should be pretty close how did you test it Regardless nginx should be the fastest way to serve your general web stuff . Comment : I tried serving up a simple static html page and it took many seconds to load . I think in retrospect it was my erroneous setup and not a fault of Tornado . .. . Answer : Yes serve forever blocks it all . You can use handle request to serve one request at a time . To assure it won t block you have to set timeout . To run it periodically you can use tornado.ioloop.PeriodicCallback . Example : .. . .. . Running : .. . .. . I used here timeout attribute to set timeout . I m not sure if it s proper way to do it . Other method : http : code.activestate.com recipes 499376 .. . .. . Another solution : running every server in its own thread : Comment : Wow thank you for the excellently detailed response and for giving me options too . I ll run them both and see which works best but certainly going to accept this answer .", "Question : My problem.. . .. . .. . 1 . We have a local network . 2 . i run a python basehttpserver on a virtual-machine with Ubuntu Server 12.04.2 . When i open in browser-link 192.168.101.3 : 8081 index.html get request processed 10 seconds why example basehttpserver .. . .. . screenshot from server log server http : i.stack.imgur.com eoQqM.png .. . .. . IP machine with ubuntu-server 192.168.101.3 .. . .. . Sorry for my English . My solution - I added the following method in ReqHandler Comment : Profile your code with fabulous python profile library that will tell you what and why : docs.python.org 2 library profile.html http : docs.python.org 2 library profile.html Comment : I am having the same issue with a basehttpserver on OSX . I am making a simple GET request to retrieve a single document from mongodb . The request stays delayed for around 10-20 seconds each time . The chrome console shows status Waiting during this time . Any other request like POST or PUT are completing in milliseconds . Also GET requests to external sites are working as normal so I definitely don t think the client is the issue . Please share if you find a solution and I ll do the same . .. . Answer : If your testing your webapp on a local network not connected to Internet you may encounter these delays . It is because BaseHTTPServer is performing by default a lookup on the client IP for logging purpose . Check this hack : http : bugs.python.org issue6085", "Question : I am working on a daemon where I need to embed a HTTP server . I am attempting to do it with BaseHTTPServer which when I run it in the foreground it works fine but when I try and fork the daemon into the background it stops working . My main application continues to work but BaseHTTPServer does not . I believe this has something to do with the fact that BaseHTTPServer sends log data to STDOUT and STDERR . I am redirecting those to files . Here is the code snippet : .. . .. . Am I doing something wrong here or is BaseHTTPServer somehow prevented from becoming daemonized Edit : Updated code to demonstrate the additional previously missing code flow and that log.debug shows in my forked background daemon I am hitting code after fork . .. . Answer : A simple solution that worked for me was to override the BaseHTTPRequestHandler method log message so we prevent any kind of writing in stdout and avoid problems when demonizing .", "Question : I am running my HTTPServer in a separate thread using the threading module which has no way to stop threads.. . and want to stop serving requests when the main thread also shuts down . The Python documentation states that BaseHTTPServer.HTTPServer is a subclass of SocketServer.TCPServer which supports a shutdown method but it is missing in HTTPServer . The whole BaseHTTPServer module has very little documentation : .. . Answer : The event-loops ends on SIGTERM Ctrl+C or when shutdown is called . server close must be called after server forever to close the listening socket . Simple server stoppable with user action SIGTERM Ctrl+C .. . : .. . .. . Server running in a thread :", "Question : I am trying to make a BaseHTTPServer program . I prefer to use Python 3.3 or 3.2 for it . I find the doc hard to understand regarding what to import but tried changing the import from : .. . .. . to : .. . .. . and then the import works and the program start and awaits a GET request . BUT when the request arrives an exception is raised : .. . .. . Question : Is there a version of BaseHTTPServer or http.server that works out of the box with Python3.x or am I doing something wrong This is my program that I try running in Python 3.3 and 3.2 : .. . .. . The Program work partly in Python2.7 but gives this exception after 2-8 requests : .. . Answer : Whoever did the python 3 documentation for http.server failed to note the change . The 2.7 documentation states right at the top Note The BaseHTTPServer module has been merged into http.server in Python 3 . The 2to3 tool will automatically adapt imports when converting your sources to Python 3 . Comment : Sadly the norm on the Python 3 docs is not to note changes from Python 2 . I think that this was a major mistake .", "Question : I am trying to make a BaseHTTPServer program . I prefer to use Python 3.3 or 3.2 for it . I find the doc hard to understand regarding what to import but tried changing the import from : .. . .. . to : .. . .. . and then the import works and the program start and awaits a GET request . BUT when the request arrives an exception is raised : .. . .. . Question : Is there a version of BaseHTTPServer or http.server that works out of the box with Python3.x or am I doing something wrong This is my program that I try running in Python 3.3 and 3.2 : .. . .. . The Program work partly in Python2.7 but gives this exception after 2-8 requests : .. . Answer : You can just do like that :", "Question : I am working on a daemon where I need to embed a HTTP server . I am attempting to do it with BaseHTTPServer which when I run it in the foreground it works fine but when I try and fork the daemon into the background it stops working . My main application continues to work but BaseHTTPServer does not . I believe this has something to do with the fact that BaseHTTPServer sends log data to STDOUT and STDERR . I am redirecting those to files . Here is the code snippet : .. . .. . Am I doing something wrong here or is BaseHTTPServer somehow prevented from becoming daemonized Edit : Updated code to demonstrate the additional previously missing code flow and that log.debug shows in my forked background daemon I am hitting code after fork . .. . Answer : After a bit of googling I finally stumbled over this BaseHTTPServer documentation http : pymotw.com 2 BaseHTTPServer index.html module-BaseHTTPServer and after that I ended up with : .. . .. . Which for the most part comes after I fork and ended up resolving my problem .", "Question : I am hosting a http server on Python using BaseHTTPServer module . I want to understand why it s required to specify the IP on which you are hosting the http server like 127.0.0.1 192.168.0.1 or whatever . might be a general http server concept and not specific to Python .. . .. . Why can t it be like anybody who knows the IP of the machine could connect to the http server I face problems in case-when my http server is connected to two networks at the same time and I want to serve the http server on both the networks . And often my IP changes on-the-fly when I switch from hotspot mode on the http server machine to connecting to another wifi router . .. . Answer : Try running it on 0.0.0.0 this accepts connections from all interfaces . Explicitly specifying the IP is a good practice in general load-balancing caching servers security internal netwrok-only micro services etc but judging by your story this is not a production server but some internal LAN application .", "Question : I am using the method do GET of class BaseHttpServer . I want to do is that successive calls to this method have access to the same shared variable .. . .. . If I send the first command 0 then 1 I can not access the same variable Comment : where does command come from Comment : comand self.path 2 .. . Answer : I solve the problem creating a static-class http : stackoverflow.com questions 68645 static-class-variables-in-python and using in static-class global-variables ." ] }
[ "yes-answer-long", "yes-answer-short" ]
web
UNK_RELATION
hp-ux@operating-system@97
hp-ux -- hp-ux hewlett-packard unix is hewlett-packard s proprietary implementation of the unix @placeholder based on unix system v initially system iii and first released in 1984 .
{ "confidence": [ 73.04345703125, 70.91984558105469, 68.32074737548828, 68.32074737548828, 63.42856979370117, 61.6511344909668, 61.1414680480957, 61.1414680480957, 61.1414680480957, 61.1414680480957, 60.44141387939453, 59.01785659790039, 56.472652435302734, 56.472652435302734, 56.27862548828125, 54.91056823730469, 54.16947555541992, 54.166080474853516, 54.166080474853516, 54.166080474853516, 54.166080474853516, 53.78117370605469, 52.54536437988281, 52.0424690246582, 51.645912170410156, 49.896995544433594, 49.49726486206055, 47.848167419433594, 47.79977035522461, 47.77338409423828, 47.77338409423828, 47.02758026123047, 46.552223205566406, 46.511619567871094, 46.021610260009766, 45.82482147216797, 45.82482147216797, 45.228179931640625, 45.228179931640625, 45.228179931640625, 44.205665588378906, 42.15072250366211, 42.15072250366211, 42.15072250366211, 40.44664764404297, 40.44664764404297, 40.44664764404297, 40.44664764404297, 39.20145034790039, 38.768638610839844, 37.77400207519531, 37.77400207519531, 37.46626281738281, 35.3426513671875, 35.25535202026367, 35.25535202026367, 34.92656707763672, 33.9025993347168, 32.95458221435547, 32.797447204589844, 32.768531799316406, 32.768531799316406, 32.432090759277344, 32.15993881225586, 30.654056549072266, 30.654056549072266, 30.07424545288086, 29.419178009033203, 29.06308364868164, 29.06308364868164, 28.857336044311523, 28.337417602539062, 28.285768508911133, 27.830074310302734, 27.29556655883789, 27.29556655883789, 26.901241302490234, 26.70551300048828, 25.71588134765625, 24.750362396240234, 23.668601989746094, 23.180530548095703, 23.068151473999023, 22.628774642944336, 21.557605743408203, 21.373300552368164, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875, 21.020233154296875 ], "content": [ "I m an entry level unix engineer for HP-UX and recently experienced a crash event on important servers configured with serviceguard .", "I am new to NonStop systems but have worked on linux and unix HP-UX environment .", "Edit : This is HP-UX", "I m on HP-UX", "It was compiled by HP aCC and it s running on HP-UX PA-RISC .", "Target platforms are Solaris HP-UX and maybe others .", "I am building a .sl library using aCC in HP-UX 11.00 .", "Have you noted that the solutions found in that link are not for HP-UX but for Linux", "I guess the password command for HP-UX will not accept the option --stdin .", "I am trying to compile Ruby 1.9.1-p0 on HP-UX .", "Postgres package is available for HP-UX system can it be configured for OSS environment on Non Stop server", "I am using HP-UX server for code-coverage using bullseye .", "On HP-UX systems as xxd is not present I would need to use xd .", "I can t parse proc because it might be unavailable on HP-UX .", "PostgreSQL is pretty well behaved and reasonable to compile and there s a HP-UX ia64 buildfarm member http : buildfarm.postgresql.org cgi-bin show history.pl nm anole br HEAD so builds are tested on HP-UX .", "I have a hunch that for whatever reason g++ has decided to output 32-bit code on your HP-UX system .", "I m wondering why the C99 UNIX standard function fesetround FE TOWARDZERO http : pubs.opengroup.org onlinepubs 9699919799 functions fegetround.html isn t suitable for you - it s the same on all of these platforms including HP UX .", "According to HP-UX documentation on Itanium this is 256KB but when I checked the header-files it was only 4KB .", "I need get the patch list of HP-UX 11.31 for develop a automatic tools to check is this Server needs to be update .", "Ok so I need to translate a script from a nice linux bash configuration to ksh in hp-ux .", "I ve read the man date for HP-UX and it seems you just can t do date-arithmetic with it .", "I am developing C C++ cross-platform code and the last platform is Itanium based HP-UX .", "I have a server running HP UX 11 OS and i m trying to have I O statistics for File System not disk .", "HP-UX linker complains when I use -Bhidden def that std : : stuff is not exported but it is imported by my shared library e.g .", "I need to port some code written with a GCC compiler and inline-assembly to its HP Unix equivalent .", "What I would do would be to actually grab the source code for date from Linux and compile it under HP-UX as betterdate then just use that .", "I m trying to get stack size of current thread in my application running on HP-UX 11.31 .", "According to HP the compiler HP C aC++ B3910B A.06.26 support C99 .", "NonStop systems provides Open System Services OSS environment which is an open computing interface to the HP NonStop operating-system and is based on POSIX standards .", "i have simple C hello world program and i wanted to compile it on HP-UX ia64 11.31 but i get the following error", "You will almost certainly have to compile PostgreSQL - and possibly its dependencies depending on what s available pre-packaged for HP-UX - from source code .", "I am using HP-UX aCC compiler HP C aC++ B3910B A.06.26 to compile an old C Pro C application already compiled with an older version of aCC compiler .", "I want to perform a remote copy of data from a remote HP-UX server to my local file system using the sshj https : github.com hierynomus sshj library .", "I m be surprised to learn type long and time t are 4-byte sized in this HP-UX 11.31 IA64 .", "@Chris : I assumed it wouldn t be a GNU compatible date but since you didn t specify the Unix variant I simply guessed With HP-UX your options are a little more limited date doesn t have these options so Perl might be the best option .", "I am trying to compile a console C application on HP-UX machine using the aCC compiler HP C aC++ B3910B A.06.26 .The compilation always failing with the below error : .. . .. . However the Common.C file include already the library which contain normally the method snprintf .", "I still struggling to compile a C console-application the compiling procedure still failing with the error below : .. . .. . below the declaration of the extern method on the C code : .. . .. . I am using HP-UX aCC compiler HP C aC++ B3910B A.06.26 also I switched on the compilation flag -Ae to enable C99 support .", "But I do not know how to get the same results as with xxd -p . .. . .. . How could I adapt this command to run on HP-UX systems", "Thanks for the help everyone but since i m on HP-UX after all : the more you pay the less features you get.. . i ve had to resort to perl :", "The environment is Oracle RAC Real Application Cluster Server Release 11.1.0.6.0 - Production installed on a HP-UX machine and three nodes are available to access the database .", "Result of uname -smr : HP-UX B.11.31 ia64 .. . .. . Processor Model : Intel R Itanium R Processor 9340 .. . .. . Compiler -v : aCC : HP C aC++ B3910B A.06.28 .. . .. . Update : I was able to get Asm cmpxchg to compile but it doesn t seem to work the value remains unchanged .", "Is there is any similar command on other Unix environments", "On Solaris .. . .. . similar can be used on unix like systems .", "+1 just for not assuming that every UNIX question is on Linux .", "Environment : HP-UX 11.x C++ ProC aCC compiler Oracle 10g .. . .. . I am unable to execute the following command from my C++ Embedded SQL code .. . .. . The changes i m making are to an existing file .", "You may find some of the answers specifically the one related to libunwind from this question http : stackoverflow.com questions 975108 stack-unwinding-on-hp-ux-and-linux helpful .", "@paxdiablo : agreed but if no specific info is given than I personally assume that the GNU toolkit is an option The differences between HP-UX AIX Solaris and BSD are simply to great to guess the flavour .", "For Hp-UX only below command worked for me : .. . .. . TZ aaa24 date + Y m d .. . .. . you can use it as : .. . .. . ydate TZ aaa24 date + Y m d .. . .. . echo ydate", "Caveat is that the -yesterday flag may not be supported on posters version of unix", "I want to install postgres on HP NonStop J series server .", "Can anybody tell me how to activate RTTI in c++ when working on unix .", "on my unix environment how could i check whether RTTI is enabled or disabled", "You can also try the ksh script here http : www.unix.com unix-dummies-questions-answers 4870-days-elapsed-between-2-dates.html", "RTTI will be enabled or disabled when compiling your program via compiler-options - it s not something enabled or disabled in the Unix environment globally .", "Example : .. . .. . File 1 .. . .. . File 2 .. . .. . Converted file requirement .. . .. . All Files will have 10 fields .. . All Files shall use the same delimiter e.g .. . .. . Output should look like .. . .. . File 1 .. . .. . File 2 .. . .. . our environment : HP-UX", "If your HP-UX installation has Tcl installed you might find it s date-arithmetic very readable unfortunately the Tcl shell does not have a nice -e option like perl : .. . .. . This will handle all the daylight savings bother .", "For Linux Unix System you can use ps -ef grep process name to get full command-line .. . .. . On SunOS system if you want to get full command-line you can use usr ucb ps -auxww grep -i process name .", "@Alok : POSIX Unix doesn t track leap seconds all days are 86400 seconds but there is a corner case with DST see my comment on paxdiablo s answer http : stackoverflow.com questions 3517982 in-a-unix-shell-how-to-get-yesterdays-date-into-a-variable 3518086 3518086", "I am not developping the app we are just trying to compile it this is a bit strance because I succeded to compile the same code with an older version of the same HP compiler .", "You can use psutil https : github.com giampaolo psutil which works on Windows and UNIX : .. . .. . The code above on my machines prints :", "The situation is that HP CC compiler does not support the asm keyword and of course the syntax is completely different .", "Can someone please point me to some online resources about PA-RISC inline-assembly with the HP CC compiler", "I am running purify 7.0 on Hp-UX 11.11B with aCC 3.85.I set the environt variable as below : export PURIFYOPTIONS -max threads 4000 -enable-thread-stack-change yes .. . .. . But still I am getting the below error and the purify comes to an halt with the below error message : .. . .. . Purify : Error : Ran out of thread-local data space .", "The syntax of the trap command is .. . .. . trap command1 command2 command3 signal1 signal2 you can trap more signals in the same line .. . .. . If trapping SIGQUIT doesn t work please check if your terminal indeed sends SIGQUIT on Ctrl+d .. . .. . Some links that can be helpful are : .. . .. . http : www.tutorialspoint.com unix unix-signals-traps.htm .. . .. . http : www.ibm.com developerworks aix library au-usingtraps .. . .. . http : linuxcommand.org wss0160.php", "All the HP documentation I have found is about Itanium assembly language which is a completely different architecture from PA-RISC .", "As an alternative to rewriting the assembly in a different assembler format you could use gcc http : gcc.gnu.org install specific.html hppa-hp-hpux on your hpux .", "Despite combing through documentation and man pages of several Unix libc s including glibc I have yet to find how to achieve the same thing in other Unices .", ".. . Illegal instruction .. . .. . From googling this problem the Illegal instruction is just a signal that the system uses to kill the process and not related to the problem .", "Change system date to future date say 25th November 2018 .. . .. . 2 .", "Change system date back to previous date say 5th Aug 2016 .", "Now this may not work due to incompatibilities with API s and such but I d be looking at this as a first attempt .", "I have installed a package called PKG V5.0A00 package name used for an example in my HPUX ia64 system and currently working on producing a new package .", "HP-UX s libc has the function fesetflushtozero http : h21007.www2.hp.com portal download files unprot fp manpages fesetflushtozero.3M.htm to switch floating-point behavior between gradual underflow and flush to zero .", "On my system there is no proc filesystem : any other solution", "So on a modern not older than 30 years system it will expand to int int .. . on old systems to .", "I want to change the color-scheme to red when someone logs into the prod system .", "You can change the build environment with the -mlp64 flag http : gcc.gnu.org onlinedocs gcc-3.4.6 gcc IA 002d64-Options.html like so : .. . .. . If you re using aCC you use +DD64 http : publib.boulder.ibm.com infocenter db2luw v9 index.jsp topic 2Fcom.ibm.db2.udb.apdv.embed.doc 2Fdoc 2Fr0007659.htm : .. . .. . The object format for HP-UX 11i v2 is ELF so you can use the +DD64 option to generate LP64 code .", "But problem is when I for example login to a prod system from a non prod the color-scheme changes to red as expected however if I use ctrl+d to logout the color-scheme doesn t change even though I am now logged out in the non-prod system .", "Linux and most proprietary unixen are POSIX-compliant standard operating systems .", "100 000 days ago it was 1 30 1738 though my system took 28 seconds to figure that out .", "Furthermore : in my tests the pgrep way has been the only system that worked to obtain the full path for scripts running inside CygWin s python .", "rsh and remsh are very insecure - the transmit data in cleartext and are based on IP address authentication .", "For posix based use proc .", "If you don t tell it explicitly what type of file you re handing it the compiler driver will make a guess usually based on the file extension .", "pid p maxof ofiles p comm .. . .. . .. . .. . 15007 8192 10 cmclconfd cwd vnode 0xd04e3cc0 : VVXFS VDIR v data 0xaa638000 fd 0 file 0xfe528700 vnode 0xd11411c8 : VNFS SPEC VCHR v data 0xd11411c0 v rdev 0x03000002 null .. . .. . fd 1 file 0xfe528700 vnode 0xd11411c8 : VNFS SPEC VCHR v data 0xd11411c0 v rdev 0x03000002 null .. . .. . fd 2 file 0x185b0a5c0 vnode 0xd11411c8 : VNFS SPEC VCHR v data 0xd11411c0 v rdev 0x03000002 null .. . .. . fd 3 file 0x1bb106a40 socket 0xfb397200 : AF INET6 STREAM sth 0x126c48c00 tcp t 0x17b6c2600 L 172.31.38.55 : 5302 R 172.31.38.53 : 49529 ESTABLISHED ip6 ipc t 0xfe243c00 .. . .. . fd 4 file 0x18e2a57c0 socket 0x125692e40 : AF UNIX DGRAM R S-Q 0 0 .. . .. . Inode 0x17abf2580 Addr var spool sockets pwgr client15007 .. . .. . fd 5 file 0x18e2a53c0 vnode 0x2428773c8 : PIPES VFIFO v data 0x2428773c0 .. . .. . fd 6 file 0xefe7db40 vnode 0x2428773c8 : PIPES VFIFO v data 0x2428773c0 .. . .. . fd 7 file 0x18e2a5440 vnode 0xd0f591c8 : VNFS SPEC VCHR v data 0xd0f591c0 v rdev 0xe3000000 kepd .. . .. . fd 8 file 0x18e2a5b40 vnode 0xd0f2e648 : VNFS SPEC VBLK v data 0xd0f2e640 v rdev 0x022e0000 c46t0d0 .. . .. . fd 9 file 0x18e2a5540 vnode 0xd1b68048 : VNFS FIFO VFIFO v data 0xd1b68040 log .. . .. . tid 4343762 : cwd vnode 0xd04e3cc0 : VVXFS VDIR v data 0xaa638000 .. . .. . Could anyone give me any ideas to interpret this output mainly on fd file-descriptor area", "I suspect its definition looks somewhat like this .. . .. . I believe type-safe function-prototypes is one of the first language features that C adopted from C++ .", "I am able to build it and then link it to the application also successfully .", "But when I execute the exe it gives the below error .. . .. . usr lib dld.sl : Unresolved Symbol : shlinit code from mylib.sl .. . .. . Any pointers towards resolving this problem will be helpful", "Is mylib.sl your library I take it", "Is your library perhaps calling a function called shlinit at any point", "If not more probably another library function that your code or the application code is calling then goes on to call shlinit .", "shlinit is obviously implemented in another library that you do not have installed or is not installed in the correct place or somewhere your dynamic link path points to .", "You need to find which library implements that function and ensure it is correctly installed .", "A quick Google search gives the following link which may be useful but now I have to go : .. . .. . unresolved symbol : shlinit during shlload http : www.google.co.uk url sa t source web cd 3 ved 0CCUQFjAC url http 3A 2F 2Fforums11.itrc.hp.com 2Fservice 2Fforums 2Fquestionanswer.do 3FthreadId 3D132021 rct j q shlinit ei cdQmTYbTIcubhQfCg52GAg usg AFQjCNFfCkGDt04UEetkmgdvB2BXrTF0xg cad rja", "any idea to solve this isse plz", "Thanks in advance for all", "snprintf http : en.cppreference.com w c io fprintf was introduced in C99 and is defined in stdio.h so your compiler must support that version of the C standard .", "If it does not support C99 then use sprintf instead .", "This is version 6 of the compiler which is documented to support C99 .", "@paxdiablo I am unfamiliar with that compiler any required compiler switches like gcc" ] }
{ "confidence": [ 88.50343322753906, 78.2348861694336, 70.28602600097656, 70.00564575195312, 68.5235595703125, 67.11324310302734, 65.94461059570312, 63.70979309082031, 63.388607025146484, 62.55582809448242, 61.84959411621094, 61.3871955871582, 60.914695739746094, 60.29621124267578, 59.28660583496094, 59.0007209777832, 59.0007209777832, 59.0007209777832, 59.0007209777832, 59.0007209777832 ], "content": [ "Question : I want to install postgres on HP NonStop J series server . Can someone who is having experience on similar configuration help me out I did not found any postgres libraries installation packages patches for NonStop servers . I am new to NonStop systems but have worked on linux and unix HP-UX environment . NonStop systems provides Open System Services OSS environment which is an open computing interface to the HP NonStop operating-system and is based on POSIX standards . Postgres package is available for HP-UX system can it be configured for OSS environment on Non Stop server Comment : No idea but your best bet is probably building postgresql from source . .. . Answer : You will almost certainly have to compile PostgreSQL - and possibly its dependencies depending on what s available pre-packaged for HP-UX - from source code . See installation from source code http : www.postgresql.org docs current static installation.html in the docs . PostgreSQL is pretty well behaved and reasonable to compile and there s a HP-UX ia64 buildfarm member http : buildfarm.postgresql.org cgi-bin show history.pl nm anole br HEAD so builds are tested on HP-UX . Comment : I have downloaded the source code from postgres site copied it to osh environment in tandem but not able to untar it . Sometimes it shows permission problems and if I try to untar the file from super.super login then it shows error that tar this does not seem to be valid tar archive and skips all other files . i.e . tar is partially extracted . Is There any other way to extract the tar . I have used tar -xvf command to extract files from tar . Comment : @Ashsh Use GNU tar . You ll also need to use gnu-make gmake to compile .", "Question : I ve got a shell script which does the following to store the current day s date in a variable dt : .. . .. . How would i go about getting yesterdays date into a variable Basically what i m trying to achieve is to use grep to pull all of yesterday s lines from a log file since each line in the log contains the date in Mon 01 02 2010 format . Thanks a lot Comment : Perl is an option if necessary.. . Comment : Edit : This is HP-UX .. . Answer : If you are on a Mac or BSD or something else without the --date option you can use : .. . .. . Update : or perhaps.. . Comment : That would be less awkward using instead of . ksh has Comment : +1 just for not assuming that every UNIX question is on Linux . Some of us have to work with other styles as well . Comment : @paxdiablo : agreed but if no specific info is given than I personally assume that the GNU toolkit is an option The differences between HP-UX AIX Solaris and BSD are simply to great to guess the flavour . Comment : Could this fail in weird corner-cases Like when there is a leap-second Comment : @Alok : POSIX Unix doesn t track leap seconds all days are 86400 seconds but there is a corner case with DST see my comment on paxdiablo s answer http : stackoverflow.com questions 3517982 in-a-unix-shell-how-to-get-yesterdays-date-into-a-variable 3518086 3518086", "Question : HP-UX s libc has the function fesetflushtozero http : h21007.www2.hp.com portal download files unprot fp manpages fesetflushtozero.3M.htm to switch floating-point behavior between gradual underflow and flush to zero . Despite combing through documentation and man pages of several Unix libc s including glibc I have yet to find how to achieve the same thing in other Unices . I m particularly interest in Linux glibc Solaris and AIX . .. . Answer : I m wondering why the C99 UNIX standard function fesetround FE TOWARDZERO http : pubs.opengroup.org onlinepubs 9699919799 functions fegetround.html isn t suitable for you - it s the same on all of these platforms including HP UX . Platform-specific you have : .. . .. . Linux glibc has the convenience function fesetflushtozero : .. . http : www.gnu.org software libc manual html node Rounding.html .. . Solaris libm has a function nonstandard arithmetic to switch to zero-rounding : .. . http : docs.oracle.com cd E19957-01 806-3568 ncg lib.html 2219 .. . .. . Couldn t find anything for AIX other than fesetround as per above . Comment : round-toward-zero and flush-to-zero have entirely different semantics . Comment : Thanks for the Solaris function which does what I need but I think the rest of your answer confuses rounding mode and flush-to-zero", "Question : I ve got a shell script which does the following to store the current day s date in a variable dt : .. . .. . How would i go about getting yesterdays date into a variable Basically what i m trying to achieve is to use grep to pull all of yesterday s lines from a log file since each line in the log contains the date in Mon 01 02 2010 format . Thanks a lot Comment : Perl is an option if necessary.. . Comment : Edit : This is HP-UX .. . Answer : Comment : +1 for answering the question precisely . Caveat is that the -yesterday flag may not be supported on posters version of unix Comment : -d yesterday for short syntax .", "Question : I ve got a shell script which does the following to store the current day s date in a variable dt : .. . .. . How would i go about getting yesterdays date into a variable Basically what i m trying to achieve is to use grep to pull all of yesterday s lines from a log file since each line in the log contains the date in Mon 01 02 2010 format . Thanks a lot Comment : Perl is an option if necessary.. . Comment : Edit : This is HP-UX .. . Answer : You have atleast 2 options .. . .. . 1 . Use perl : .. . .. . perl -e @T localtime time-86400 printf 02d 02d 02d T 4 +1 T 3 T 5 +1900 .. . .. . .. . 2 . Install GNU date it s in the sh utils package if I remember correctly .. . .. . date --date yesterday + a d m Y read dt .. . echo dt .. . .. . .. . 3 . Not sure if this works but you might be able to use a negative timezone . If you use a timezone that s 24 hours before your current timezone than you can simply use date . Comment : Sorry I m on HP-UX Comment : @Chris : I assumed it wouldn t be a GNU compatible date but since you didn t specify the Unix variant I simply guessed With HP-UX your options are a little more limited date doesn t have these options so Perl might be the best option . Comment : Not that it matters but you don t need to add 1900 to the year if you re then going to 100 the result : - Comment : @paxdiablo : fair point Perl is obviously not one of my strong points I ll +1 your answer instead .", "Question : Ok so I need to translate a script from a nice linux bash configuration to ksh in hp-ux . Each and every command expects a different syntax and i want to kill myself . But let s skip the rant . This is part of my script .. . .. . I basically need to get a past date in format 201002 . Never mind the thing that in the new environment 0m means no zeroes while actually in the other one it means yes please put that zero on my string . It doesn t even accept the 1 month ago . I ve read the man date for HP-UX and it seems you just can t do date-arithmetic with it . I ve been looking around for a while but all i find are lengthy solutions . I can t quite understand that such a typical administrative task like adding dates needs so much fuss . Isn t there a way to convert my one-liner to well i don t know another one Come on i ve seen proposed solutions that used bc had thirty plus lines and magic number all over the script . The simplest solutions seem to use perl.. . but i don t know how to modify them as they re quite arcane . Thanks .. . Answer : since yours is simple case of year and month you could always craft your own date arrays . eg .. . .. . But note that it is only simple and serves to produce only previous 1 month . You can also try the ksh script here http : www.unix.com unix-dummies-questions-answers 4870-days-elapsed-between-2-dates.html", "Question : null .. . Answer : I am trying to write a shell script to reset a user password . It will accept 2 arguments 1 old password and the new password . I have used expect and the script works . However my tech folks do not allow me to install expect in the production servers . Any suggestions on how to script this I tried the methods suggested by this article but it does not work : http : en.kioskea.net faq 790-changing-password-via-a-script Comment : Have you noted that the solutions found in that link are not for HP-UX but for Linux I guess the password command for HP-UX will not accept the option --stdin . Comment : Yeap I realised that as well . Just to put it out there... .", "Question : Several processes with the same name are running on host . What is the cross-platform way to get PIDs of that processes by name using python or jython 1 . It s like pidof but in python I don t have pidof anyway . 2 . I can t parse proc because it might be unavailable on HP-UX . 3 . I do not want to run os.popen ps and parse the output because I think it is ugly field sequence may be different in different OS . 4 . Target platforms are Solaris HP-UX and maybe others . .. . Answer : First Windows in all it s incarnations is a non-standard OS . Linux and most proprietary unixen are POSIX-compliant standard operating systems . The C libraries reflect this dichotomy . Python reflects the C libraries . There is no cross-platform way to do this . You have to hack up something with ctypes http : www.python.org doc 2.5.2 lib module-ctypes.html for a particular release of Windows XP or Vista Comment : an example would be welcome as well as links to docs", "Question : null .. . Answer : First time posting here long time lurker . I have a command which is very handy at work . It searches for a certain STRING inside some hex raw files with FILENAME . The command which I always used in Linux systems is : .. . .. . I did not build this command . On HP-UX systems as xxd is not present I would need to use xd . But I do not know how to get the same results as with xxd -p . .. . .. . How could I adapt this command to run on HP-UX systems Thanks in advance . Comment : Try unix.stackexchange.com for questions like this .", "Question : Several processes with the same name are running on host . What is the cross-platform way to get PIDs of that processes by name using python or jython 1 . It s like pidof but in python I don t have pidof anyway . 2 . I can t parse proc because it might be unavailable on HP-UX . 3 . I do not want to run os.popen ps and parse the output because I think it is ugly field sequence may be different in different OS . 4 . Target platforms are Solaris HP-UX and maybe others . .. . Answer : You can use psutil https : github.com giampaolo psutil which works on Windows and UNIX : .. . .. . The code above on my machines prints : Comment : You ve made very useful module . Thank you . Comment : Few clicks and I m done even in Windows . Great . Comment : Unfortunately OS X does not allow you to access many attributes of a process name exe cmdline even if you only try to access those processes that are created by you . Unless you run the interpreter script with sudo that is . Comment : Yes that s a limitation of OSX and it s the only platform behaving like that . There s nothing you can do about it except using sudo setuid . Comment : Update - this is now fixed for different methods see : code.google.com p psutil issues detail id 297 https : code.google.com p psutil issues detail id 297", "Question : Several processes with the same name are running on host . What is the cross-platform way to get PIDs of that processes by name using python or jython 1 . It s like pidof but in python I don t have pidof anyway . 2 . I can t parse proc because it might be unavailable on HP-UX . 3 . I do not want to run os.popen ps and parse the output because I think it is ugly field sequence may be different in different OS . 4 . Target platforms are Solaris HP-UX and maybe others . .. . Answer : I don t think you will be able to find a purely python-based portable solution without using proc or command-line utilities at least not in python itself . Parsing os.system is not ugly - someone has to deal with the multiple platforms be it you or someone else . Implementing it for the OS you are interested in should be fairly easy honestly .", "Question : I ve got a shell script which does the following to store the current day s date in a variable dt : .. . .. . How would i go about getting yesterdays date into a variable Basically what i m trying to achieve is to use grep to pull all of yesterday s lines from a log file since each line in the log contains the date in Mon 01 02 2010 format . Thanks a lot Comment : Perl is an option if necessary.. . Comment : Edit : This is HP-UX .. . Answer : Thanks for the help everyone but since i m on HP-UX after all : the more you pay the less features you get.. . i ve had to resort to perl :", "Question : Ok so I need to translate a script from a nice linux bash configuration to ksh in hp-ux . Each and every command expects a different syntax and i want to kill myself . But let s skip the rant . This is part of my script .. . .. . I basically need to get a past date in format 201002 . Never mind the thing that in the new environment 0m means no zeroes while actually in the other one it means yes please put that zero on my string . It doesn t even accept the 1 month ago . I ve read the man date for HP-UX and it seems you just can t do date-arithmetic with it . I ve been looking around for a while but all i find are lengthy solutions . I can t quite understand that such a typical administrative task like adding dates needs so much fuss . Isn t there a way to convert my one-liner to well i don t know another one Come on i ve seen proposed solutions that used bc had thirty plus lines and magic number all over the script . The simplest solutions seem to use perl.. . but i don t know how to modify them as they re quite arcane . Thanks .. . Answer : What I would do would be to actually grab the source code for date from Linux and compile it under HP-UX as betterdate then just use that . I haven t used HPUX since version 9 but it was getting a bit long in the tooth even way back then . The great advantage with open-source is that you can just recompile it under the target-platform . Now this may not work due to incompatibilities with API s and such but I d be looking at this as a first attempt . The work that date has to do is fairly simple in terms of what APIs it would need to call . Then you have the full power of Linux date at your disposal . Comment : This would be the best solution especially for the rest of the world : but the client won t accept it . Comment : What will they accept Are you allowed to compile any C Can you use the other standard tooling awk sed grep et al Or does it have to be ksh on its own presumably date is okay Comment : It has to be a script it s out of the question to start an homologation proccess for a third-party program.. .", "Question : I am trying to compile a console C application on HP-UX machine using the aCC compiler HP C aC++ B3910B A.06.26 .The compilation always failing with the below error : .. . .. . However the Common.C file include already the library which contain normally the method snprintf . any idea to solve this isse plz Thanks in advance for all .. . Answer : snprintf http : en.cppreference.com w c io fprintf was introduced in C99 and is defined in stdio.h so your compiler must support that version of the C standard . If it does not support C99 then use sprintf instead . Comment : This is version 6 of the compiler which is documented to support C99 . Comment : @paxdiablo I am unfamiliar with that compiler any required compiler switches like gcc Comment : According to HP the compiler HP C aC++ B3910B A.06.26 support C99 . I am not developping the app we are just trying to compile it this is a bit strance because I succeded to compile the same code with an older version of the same HP compiler . Thanks Comment : @jamel are there any compiler switches to enable C99 support For example gcc -std c99 is required for the GNU C compiler . Comment : Yes this version support C99", "Question : I am trying to compile Ruby 1.9.1-p0 on HP-UX . After a small change to ext pty.c it compiles successfully albeit with a lot of warning messages about 5K . When I run the self-tests using make test it crashes and core-dumps with the following error : .. . .. . sendsig : useracc failed . 0x9fffffffbf7dae00 0x00000000005000 .. . .. . Pid 3044 was killed due to failure in writing the signal context - possible stack-overflow . .. . Illegal instruction .. . .. . From googling this problem the Illegal instruction is just a signal that the system uses to kill the process and not related to the problem . It would seem that there is a problem with the re-establishing the context when calling the signal handler . Bringing the core up in gdb doesn t show a particularly deep stack so I don t think the possible stack-overflow is right either . The gdb stack backtrace output looks like this : .. . Answer : Answering my own question : .. . .. . The problem was that the stack being allocated was too small . So it really was a stack-overflow . The sendsig function was preparing a context structure to be copied from kernel space to user space . The useracc function checks that there s enough space at the address specified to do so . The Ruby 1.9.1-p0 code was using PTHREAD STACK MIN to allocate the stack for any threads created . According to HP-UX documentation on Itanium this is 256KB but when I checked the header-files it was only 4KB . The error message from useracc indicated that it was trying to copy 20KB . So if a thread received a signal it wouldn t have enough space to receive the signal context on its stack .", "Question : I m trying to get stack size of current thread in my application running on HP-UX 11.31 . On Linux I used pthread getattr np on Solaris I can use thr stksegment . Help me please find a way to know threads stack size please on C . Comment : You may find some of the answers specifically the one related to libunwind from this question http : stackoverflow.com questions 975108 stack-unwinding-on-hp-ux-and-linux helpful . .. . Answer : I found a solution for this problem in webkit sources http : qt.gitorious.org qt webkit blobs ee0a43fee20cc398b505eb65218ebed56dfc8f39 src 3rdparty webkit JavaScriptCore runtime Collector.cpp . But this solution not suitable if high performance of application is very important to you because creating and suspending threads are expensive operations . I replace base word with size because in webkit sources we are looking for stack base not size . Example code :", "Question : I ve got a shell script which does the following to store the current day s date in a variable dt : .. . .. . How would i go about getting yesterdays date into a variable Basically what i m trying to achieve is to use grep to pull all of yesterday s lines from a log file since each line in the log contains the date in Mon 01 02 2010 format . Thanks a lot Comment : Perl is an option if necessary.. . Comment : Edit : This is HP-UX .. . Answer : If your HP-UX installation has Tcl installed you might find it s date-arithmetic very readable unfortunately the Tcl shell does not have a nice -e option like perl : .. . .. . This will handle all the daylight savings bother .", "Question : I ve got a shell script which does the following to store the current day s date in a variable dt : .. . .. . How would i go about getting yesterdays date into a variable Basically what i m trying to achieve is to use grep to pull all of yesterday s lines from a log file since each line in the log contains the date in Mon 01 02 2010 format . Thanks a lot Comment : Perl is an option if necessary.. . Comment : Edit : This is HP-UX .. . Answer : For Hp-UX only below command worked for me : .. . .. . TZ aaa24 date + Y m d .. . .. . you can use it as : .. . .. . ydate TZ aaa24 date + Y m d .. . .. . echo ydate", "Question : Several processes with the same name are running on host . What is the cross-platform way to get PIDs of that processes by name using python or jython 1 . It s like pidof but in python I don t have pidof anyway . 2 . I can t parse proc because it might be unavailable on HP-UX . 3 . I do not want to run os.popen ps and parse the output because I think it is ugly field sequence may be different in different OS . 4 . Target platforms are Solaris HP-UX and maybe others . .. . Answer : Give all pids of YourProcess.exe Comment : I hold no stake either way I often hear people rant that List Comprehension is always the best way to filter a list because its faster . eg process proc for proc in psutil.process iter if proc.name YourProcess.exe .", "Question : Several processes with the same name are running on host . What is the cross-platform way to get PIDs of that processes by name using python or jython 1 . It s like pidof but in python I don t have pidof anyway . 2 . I can t parse proc because it might be unavailable on HP-UX . 3 . I do not want to run os.popen ps and parse the output because I think it is ugly field sequence may be different in different OS . 4 . Target platforms are Solaris HP-UX and maybe others . .. . Answer : For jython if Java 5 is used then you can get the Java process id as following : .. . .. . from java.lang.management import .. . pid ManagementFactory.getRuntimeMXBean .getName Comment : that works but I want to get PID of another process like pidof do but without using pidof" ] }
[ "yes-answer-long", "yes-answer-short" ]
operating-system
UNK_RELATION
drone@docker@62
drone -- drone is a continuous-integration platform built on @placeholder written in go .
{ "confidence": [ 42.15206527709961, 41.75419616699219, 40.65890121459961, 39.91965866088867, 39.524227142333984, 38.876461029052734, 38.34564971923828, 37.90913772583008, 37.90913772583008, 37.90913772583008, 37.90913772583008, 37.88919448852539, 36.980472564697266, 36.980472564697266, 36.69462966918945, 36.69462966918945, 36.69462966918945, 36.69462966918945, 36.69462966918945, 36.41901397705078, 35.76860809326172, 35.5010986328125, 35.390235900878906, 35.390235900878906, 35.390235900878906, 35.320064544677734, 35.320064544677734, 34.28659439086914, 34.224769592285156, 33.909339904785156, 33.877479553222656, 33.73921585083008, 33.73921585083008, 33.73921585083008, 33.73921585083008, 33.73921585083008, 33.73921585083008, 33.73921585083008, 32.74668884277344, 32.74668884277344, 32.74668884277344, 32.6439208984375, 32.6439208984375, 32.6439208984375, 32.54852294921875, 32.417015075683594, 32.17591094970703, 31.40930938720703, 31.40930938720703, 31.40930938720703, 31.40930938720703, 31.40930938720703, 31.40930938720703, 31.40930938720703, 31.40930938720703, 31.331180572509766, 31.080615997314453, 31.080615997314453, 30.080350875854492, 30.080350875854492, 29.791275024414062, 29.791275024414062, 29.791275024414062, 29.791275024414062, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 29.758289337158203, 28.972896575927734, 28.972896575927734, 28.71219825744629, 28.662994384765625, 28.662994384765625, 28.662994384765625, 28.662994384765625, 28.662994384765625, 28.662994384765625, 28.662994384765625 ], "content": [ "I am not familiar with drone .", "The script starting drone : .. . .. . etc drone dronerc : .. . .. . a build log :", "The repository must be public : https : github.com drone drone issues 860", "I found that self hosted Drone is awesome enough to have a Go plugin that supports Continuous Deployment .", "I m trying install and configure drone.io https : github.com drone drone on my server following some tutorials https : www.digitalocean.com community tutorials how-to-perform-continuous-integration-testing-with-drone-io-on-coreos-and-docker from digital-ocean .", "I use arquillian with drone and selenium .", "I m hosting my own Drone instance .", "Successful interactive container login : .. . .. . Failed Drone container login : .. . .. . So it looks like my key is not sent by the Drone container .", "It s not the full drone server just enough tooling to run your drone build locally .", "If I do locally drone exec it works but it s not working on hosted drone and I want to see logs of service myapi .", "Can someone please guide me how to connect with real drone from python drone api .", "Browsing drone issues I found this one https : github.com drone drone issues 993 that mentions that I need to add open true to the query-string so drone is able to create the github application .", "Given the short timeframe for your project I would recommend node-ar-drone https : github.com felixge node-ar-drone using Javascript to control the drone : .. . .. . 1 .", "For example ar-drone-rest https : github.com andrew ar-drone-rest webflight http : eschnou.github.io ardrone-webflight ar-drone-autonomy http : eschnou.github.io ardrone-autonomy .", "I have a drone host and a CoreOS cluster with fleet .", "The drone is started with -v etc ssl : etc ssl : ro .", "My organisation has a drone server ready and working .", "Drone currently does not support an interactive shell .", "This is besides the app for coordination DJI currently uses for their drone .", "http : i.stack.imgur.com fxLnZ.png .. . .. . Steps that I am doing : .. . .. . Get imagem from drone .. . .. . SmoothGausian 3 .. . .. . Use HSV to threshold .. . .. . Erode 3 .. . .. . Dilatate 9 .. . .. . SmoothGaussian 15 .. . .. . Basically the drone code is : .. . .. . If centroid is on the left right side drone moves left right .. . .. . if centroid is on upper bottom drone moves upper bottom .. . .. . If object area pretended area drone moves forward .. . .. . else drone moves back .. . .. . Is there a better alternative to implement this code", "I just need a simple guide on how to setup SSH continuous-deployment with a self hosted Drone CI .", "I m trying to set up a local drone.io server https : github.com drone drone for CD with my github account .", "Well I have a line in the floor and a camera on my drone .", "I will be using Parrot AR but I would like to use any drone .", "I had the same problem and I resolved it updating the drone version .", "When I put the Drone on video-recording mode I loose the live-video and I can not see what my drone sees .", "This is an example of my .drone.yml .. . .. . Edit : Apparently drone : 0.5 shows logs from all services and drone : 0.4 shows only logs of the build container .", "In blackbox testing space there are Graphene and Drone extensions .", "Digging though the code https : github.com drone drone blob master server handler repo.go I ve found something I can t believe .", "I have drone DJI Phantom 3 and in order to fly it correctly DJI provides an App for IOS and Android DJI Go .", "What is the best way to leverage drone using the mono repository pattern multiple-projects one repository 2 .", "I m trying to integrate the Drone CI server with the GOGS Git server .", "The drone now have only unix : var run docker.sock in the nodes menu .", "You can use AR DRone APi from developer.parrot.com http : developer.parrot.com", "I am trying to write a drone app for my university project .", "I ve wanted the servo to work when I ve connected the drone .", "You could run the apps on any Android phone and test without the drone .", "I wonder which API is better to send command to the drone .", "With Arquillian Drone and plain Selenium WebDriver i.e .", "The dependency org.jboss.arquillian.extension : arquillian-drone-webdriver-depchain : pom is not needed .", "It appears as though Drone is ignoring the configuration in the arquillian.xml file .", "My goal : Tracking a drone in a room and plot the position in 3D .", "I ve successfully logged into the drone but I don t know where the logs are stored .", "I ve checked var log but couldn t find anything related to drone .", "There s a drone-wide environment option named DRONE YAML that can be set the default-value is .drone.yml so given you d want to move it to a subdirectory build then add this to the dronerc file : .. . .. . DRONE YAML build .drone.yml .. . .. . Untested deduced from the drone source code", "I know that Drone.io offers continuous-deployment in many ways SSH Heroku AppEngine Amazon S3 ...etc but what about self hosted Drone CI", "Drone gives you the ability to run your build locally on your personal computer without a Drone server I do not need to get drone.io running locally .", "i want to remove github repo from my drone ci v0.3 standalone but i have a problem with authorizing with github .", "We are using an ardu-pilot Mega 2.5 to control our drone but only the left stick responds .", "I would like to develop a program to manage a drone using opencv to fly indoor over a line .", "So do you recommend me this over node-ar-drone mission planner 3dr jdi.. . and all the existing sdks", "I m using the nodecopter nodeJS library to program the parrot AR drone 2.0 although I m not sure how relevant that is .", "My thought is to start with the motor encoders on the drone but I m not sure exactly how to implement this .", "I installed drone 0.4 version to aws and integrated with my private bitbucket repositories .", "Possible issues off the top of my head are if you have multiple instances of Drone behind an ELB or possible caching .", "Ideally I need coordinates of the captured image s corners relative to the drone .", "I ve set up a test repository with the following structure : .. . .. . The contents of my .drone.yml file is as follows : .. . .. . Drone was started with the following environment-variables passed with the -e flag of docker run since both Drone and Gogs are running containerized .", "btw does anyone know how to use JAVA SCRIPT file github.com felixge node-ar-drone https : github.com felixge node-ar-drone in c visual-studio project", "In 0.3 version you could did with . drone delete github.com foo bar but i get such error .. . .. . . drone delete github.com foo bar Unauthorized .. . .. . The problem is that 0.3 version is outdated and documentation is locked http : readme.drone.io api authentication .. . .. . If you know how configure authentication please help .", "It has a good user-interface which you can see the both cameras record and replay the videos control the drone by clicking on buttons you can see the metrics and configuration of the drone and you have also a way to send commands in a queue .", "That s a good question I ve not seen anything related to SSL for Drone .", "The ProtocolMetaData is subsequently used by Arquillian Graphene Drone to access the web page .", "Including the whole Drone web driver depchain will solve the issue .", "Unfortunately there seems to be very little documentation on using Arquillian Drone with Selenium Grid .", "At present I have a ublox LEA-6T that I hope to mount on my drone .", "I have been using Arquillian Drone + Graphene for few months I absolutely love it .", "There were two releases of Graphene in May and Drone reached 2.0.0.Final earlier this year .", "I could think of the following solutions : .. . .. . Expose docker uris in the CoreOS cluster nodes and configure all of them directly in drone .", "While connected to the drone Parrot AR 2.0 via wifi it still targets my webcam on my laptop .", "In your case you would need to use an api to access the drone camera in Java and then send it to your OpenCV code .", "It is available in the link https : github.com mapbox drone-feedback tree master sources geojson", "I know the drone container knows this certificate as it solved the problem of not being able to login because certificate problem in oauth .", "First of all i am very beginner in this drone and docker stuffs so please be kind on me .", "When I log in into the drone server I can see all my android repositories .", "There is repository named DockerTesting which I have made just to set up the drone for Android build .", "Attached is a snippet of my drone v0.4 build log when I trigger a build by pushing my project to master .", "I really would like to build a drone by myself in an arduino or raspberry does anyone know a good and complete guide to follow", "At the moment DJI Mobile SDK does not allow connection to multiple drones as the phone connects only to one remote controller drone .", "You could write your own simple mobile app that takes drone commands from a swarm server over the network .", "I have a ruby-on-rails application which I am building using drone .", "Is there a way I can get these rspec logs to show up in colors on the drone console", "PS : I am running a drone docker-container on my build machine and I am not using hosted drone.io", "You can run : .. . .. . It requires the drone cli tools : http : readme.drone.io devs cli", "I would like to know if it s possible to control an actuator using drone-kit python .", "Now i want to execute these dronekit scripts on my real drone which is Parrot Ar 2.0 .", "I m trying to see if there s a way to communicate with the Drone with a specific protocol in order to accept a set of procedures .", "How is the communication via SDK done - is smartphone directly communicating with drone or is going via remote controller", "I have found Android support is available by Flyver here - http : flyver.co drone-api-sdk .", "In addition I have to develop an Android app to draw the trajectory the drone is going to follow so now everything is a matter of time .", "Can someone clarify how to make a drone fly using the DroneProxy API class", "What would be the best SDK you would recommend me to use in order to manage the drone not using the GPS points but relative locations or SLAM", "An example build log would be helpful however if it s showing as successful on Drone and the badge is displaying correctly in Bitbucket it seems odd it wouldn t show .", "Well we would like to be able to check our .drone.yml into just our-project but it appears Drone wants the configuration file at the root of the project which is ok we can work with that by changing the commands section of our builds .", "I am trying to install nano on my AR Drone to edit some code .", "On google I found nothing about this so I decided to take a ARM build for Android and install it on the drone .", "I made a micro-webserver uploaded the tar.gz on the server and wget ted to the drone extracted it and moved it into bin nano .", "I m setting up a self-hosted Drone CI server that integrates with a self-hosted Gogs server .", "docker exec drone echo git --version returns git version 1.9.1 so it seems as though this isn t the problem .", "I want to run a bat file which writes a mission to my drone using MAVProxy .", "Next I want to wait a minute to make sure MAVProxy has a connection with the drone ." ] }
{ "confidence": [ 56.9228515625, 55.946414947509766, 54.58591079711914, 48.91365051269531, 47.218170166015625, 46.17573165893555, 45.470035552978516, 45.153533935546875, 44.54670715332031, 44.40433120727539, 44.40433120727539, 44.40433120727539, 44.379581451416016, 44.34646987915039, 43.61866760253906, 43.60676574707031, 43.341278076171875, 43.341278076171875, 43.329124450683594, 43.169559478759766 ], "content": [ "Question : I m trying install and configure drone.io https : github.com drone drone on my server following some tutorials https : www.digitalocean.com community tutorials how-to-perform-continuous-integration-testing-with-drone-io-on-coreos-and-docker from digital-ocean . However when I try to authorize my account xxx.xxx . : 8080 login I get a blank webpage which throws with http 400 status code The final url that I m redirected to looks like this : xxx.xxx.xxx.xxx : 8080 api-auth github.com code 28c9ea949a200523edasdaae state V5dsadaKLDQC4MASSMFUH2MLF5ZVSNCWNOIDEQ7JSVR4HLAW7EMGX4NJA 3D 3D 3D 3D . How can I debug why this is failing I ve successfully logged into the drone but I don t know where the logs are stored . I ve checked var log but couldn t find anything related to drone . Digging though the code https : github.com drone drone blob master server handler repo.go I ve found something I can t believe . Are the all errors just ignored .. . Answer : You can see the log of your container as follow : .. . .. . Go to the server where drone.io is running and view the id of the container .. . .. . To view the log of your container . see the docker documentation for more info . https : docs.docker.com engine reference commandline logs", "Question : I just need a simple guide on how to setup SSH continuous-deployment with a self hosted Drone CI . Is it possible to do that I know that Drone.io offers continuous-deployment in many ways SSH Heroku AppEngine Amazon S3 ...etc but what about self hosted Drone CI .. . Answer : I found that self hosted Drone is awesome enough to have a Go plugin that supports Continuous Deployment . It s really simple as this :", "Question : I m trying install and configure drone.io https : github.com drone drone on my server following some tutorials https : www.digitalocean.com community tutorials how-to-perform-continuous-integration-testing-with-drone-io-on-coreos-and-docker from digital-ocean . However when I try to authorize my account xxx.xxx . : 8080 login I get a blank webpage which throws with http 400 status code The final url that I m redirected to looks like this : xxx.xxx.xxx.xxx : 8080 api-auth github.com code 28c9ea949a200523edasdaae state V5dsadaKLDQC4MASSMFUH2MLF5ZVSNCWNOIDEQ7JSVR4HLAW7EMGX4NJA 3D 3D 3D 3D . How can I debug why this is failing I ve successfully logged into the drone but I don t know where the logs are stored . I ve checked var log but couldn t find anything related to drone . Digging though the code https : github.com drone drone blob master server handler repo.go I ve found something I can t believe . Are the all errors just ignored .. . Answer : I had a similar issue and in the end it was that my github app authorization url was not the same or that I was using the wrong api url . For that last error make sure you are using the one in the api docs and not the one in the tutorial it was wrong at the time .", "Question : I am working on a project about autonomous flight and I am using an ARDrone 2.0 . I wonder which API is better to send command to the drone . I have seen that I am able to use NodeJS or the ROS platform but I would like that someone with experience can help me to make a wise decision . The most important thing for me is stability about reading data from sensors and receiving data from a laptop . I do not have trouble if I have to learn a programming language or a library . .. . Answer : Given the short timeframe for your project I would recommend node-ar-drone https : github.com felixge node-ar-drone using Javascript to control the drone : .. . .. . 1 . It s very easy--You don t need to learn a robotics framework just a relatively simple API . 2 . It has users : There are at least 3 or 4 people actively posting and responding to issues on the github repository . 3 . There are lots of projects showing how to use the library ranging from simple to complex . For example ar-drone-rest https : github.com andrew ar-drone-rest webflight http : eschnou.github.io ardrone-webflight ar-drone-autonomy http : eschnou.github.io ardrone-autonomy .", "Question : null .. . Answer : I m trying to use go install inside a drone build with caching whole GOPATH see http : readme.drone.io usage caching and it works but go install rebuilds all packages doesn t matter what I do with the cache I checked and cache store restore seems to work correct - all .a files inside pkg are present .. . .. . How does go install find out what to rebuild edit : sigh.. . it must be caused by timestamps change for some reason drone does not preserve them access modify change change .. . .. . edit2 : I found out I could use drone volumes for the same purpose I did so and file-access times as well as structure contents are perfectly the same across builds - still go install ignores everything and rebuilds.. . What s the trick", "Question : null .. . Answer : I am trying to develop an algoritm to make the quadcopter hover in front of the circle moving the least possible . But I don t think this is either robust or worked well . http : i.stack.imgur.com fxLnZ.png .. . .. . Steps that I am doing : .. . .. . Get imagem from drone .. . .. . SmoothGausian 3 .. . .. . Use HSV to threshold .. . .. . Erode 3 .. . .. . Dilatate 9 .. . .. . SmoothGaussian 15 .. . .. . Basically the drone code is : .. . .. . If centroid is on the left right side drone moves left right .. . .. . if centroid is on upper bottom drone moves upper bottom .. . .. . If object area pretended area drone moves forward .. . .. . else drone moves back .. . .. . Is there a better alternative to implement this code Any ideas", "Question : I really would like to build a drone by myself in an arduino or raspberry does anyone know a good and complete guide to follow with materials to buy and everything . Thank you .. . Answer : Also consider to have a look such a board as CRIUS AIO PRO V2 that basically is an Arduino compatible board with all the sensors built-in you need to run a drone gyro barometer magnetometer etc .. . .. . http : www.multiwii.com forum viewtopic.php f 6 t 5842 http : www.multiwii.com forum viewtopic.php f 6 t 5842", "Question : Is there a way to change the location of the .drone.yml file . We would like to have it placed in a sub-directory of our parent project . .. . Answer : There s a drone-wide environment option named DRONE YAML that can be set the default-value is .drone.yml so given you d want to move it to a subdirectory build then add this to the dronerc file : .. . .. . DRONE YAML build .drone.yml .. . .. . Untested deduced from the drone source code", "Question : io team and lovers . I tested Drone.io in a locally way and I like it . Is there a way to use Drone.io locally without pushing to a repository . I would like to use it on developer environments that means the developers can test their code before pushing to the repository . It s possible to do that .. . Answer : You can run : .. . .. . It requires the drone cli tools : http : readme.drone.io devs cli Comment : readme.drone.io devs cli http : readme.drone.io devs cli local-testing : b659b046131d4024ab5e2d3675716bf0 Comment : Drone gives you the ability to run your build locally on your personal computer without a Drone server I do not need to get drone.io running locally . Comment : It s not the full drone server just enough tooling to run your drone build locally . It can use your secrets and an optional SSH key if needed . This doesn t run any deploy or hook steps just the build .", "Question : null .. . Answer : I m using the nodecopter nodeJS library to program the parrot AR drone 2.0 although I m not sure how relevant that is . In essence I m trying to write a node program that I can run while remote controlling the drone via a Logitech controller and a node library I made that will save the flight done via remote control as a file autonomous program I can run to approximately duplicate the same flight but I m not sure how to do this . My thought is to start with the motor encoders on the drone but I m not sure exactly how to implement this . Help", "Question : null .. . Answer : I installed drone 0.4 version to aws and integrated with my private bitbucket repositories . Everyting is working as it should be . There is my .drone.yml file .. . .. . My commits are successfully build with unit tests but my badges always looks like build none . Do I have to add anything else for that . Thanks for help Comment : An example build log would be helpful however if it s showing as successful on Drone and the badge is displaying correctly in Bitbucket it seems odd it wouldn t show . Possible issues off the top of my head are if you have multiple instances of Drone behind an ELB or possible caching .", "Question : I m hosting my own Drone instance . My .drone.yml is as follows : .. . .. . However whenever it runs it spits out the error : .. . .. . with no context whatsoever . What could possibly be going wrong this early in the build Comment : I am not familiar with drone . But if the parent docker image is actually missing it won t begin building . Does running docker image on the command-prompt reveal the list of docker images in your setup .. . Answer : I had the same problem and I resolved it updating the drone version . It seems that the 0.3 doesn t support build : .. . .. . You can use the following syntax : .. . .. . I highly recommend to use the latest version .", "Question : I have a ruby-on-rails application which I am building using drone . I am running rspec as part of my builds . However the console logs show the output of the rspec only in a plain format . Is there a way I can get these rspec logs to show up in colors on the drone console PS : I am running a drone docker-container on my build machine and I am not using hosted drone.io .. . Answer : Drone currently does not support an interactive shell . You ll need to add the --tty option along with --color", "Question : I m setting up a self-hosted Drone CI server that integrates with a self-hosted Gogs server . I ve set up a test repository with the following structure : .. . .. . The contents of my .drone.yml file is as follows : .. . .. . Drone was started with the following environment-variables passed with the -e flag of docker run since both Drone and Gogs are running containerized . When pushing to the new repository the build is triggered but fails with the following output : .. . .. . What is going on here Do I need to specify credentials in the yaml file .. . Answer : The repository must be public : https : github.com drone drone issues 860", "Question : null .. . Answer : I am able to write my script in python and then run against simulators . Now i want to execute these dronekit scripts on my real drone which is Parrot Ar 2.0 . Problem is i am unable to connect vehicle connect IP and Port Wait ready True . Can someone please guide me how to connect with real drone from python drone api .", "Question : I am trying to write a drone app for my university project . My project is about swarm drones . So I use DJI SDK for its easy to use but could not figure out whether DJI SDK allows to connect and control multiple DJI Drones through the same app Thank you Comment : Share your workaround code . Comment : I am still in research stage for which platform I can use to connect and control multiple drones . When I searched for DJI apps I did not see any app controls multiple DJI Drones with the same app . It occured to me that DJI SDK does not allow this feature yet . Is it true .. . Answer : At the moment DJI Mobile SDK does not allow connection to multiple drones as the phone connects only to one remote controller drone . You could write your own simple mobile app that takes drone commands from a swarm server over the network . Also If you are in the US please refer to FAA rules regarding swarms . FAA rule expects there should be one operator per UAV .", "Question : I am trying to use my drones camera instead of my webcam . I am using the YADrone API and OpenCV in java in Eclipse . While connected to the drone Parrot AR 2.0 via wifi it still targets my webcam on my laptop . How should i target the drones camera instead of the webcam on my laptop Any help will be greatly appreciated : Comment : VideoCapture 0 opens the default camera . Try with other device id or with the proper connection-string .. . Answer : here you have an example in NodeJs . https : github.com paulhayes copterface The main idea is to capture the video with the API Node Ar Drone in this case and send the image frame to OpenCV . In your case you would need to use an api to access the drone camera in Java and then send it to your OpenCV code . You can use AR DRone APi from developer.parrot.com http : developer.parrot.com", "Question : I want to see logs of my api that is added as a service container . Right now my app cannot connect to myapi . If I do locally drone exec it works but it s not working on hosted drone and I want to see logs of service myapi . This is an example of my .drone.yml .. . .. . Edit : Apparently drone : 0.5 shows logs from all services and drone : 0.4 shows only logs of the build container . .. . Answer : For us adding DEBUG true to the drone.rc helped to see the child containers messages see http : readme.drone.io setup overview troubleshooting : 68f80267fa3a50980dbb745a782b8dca Comment : I m marking this as accepted answer I don t think we ll get more correct answer because new version of drone.io is coming .", "Question : null .. . Answer : Our project is nested inside a mono-repository . Imagine this we have a project in a projects folder . For example projects our-project . Well we would like to be able to check our .drone.yml into just our-project but it appears Drone wants the configuration file at the root of the project which is ok we can work with that by changing the commands section of our builds . The trouble we are running into is that we only want to run the builds when something in our-project changes . I can t find a way to do that precisely with Drone so our next closest bet is conditions http : readme.drone.io usage build test conditions : fb92aa3346185c57f15afda861d465a3 I figure we can make namespace all branches for our-project like this our-project some-branch . Then we could set up a condition to only run builds on our-project some-branch and master this would limit the number of fake builds we are running from other projects branches : .. . .. . The trouble is when we try to pull request from a our-project branch to master the build won t run I m guessing because its being run on a merge commit which isn t in master or our-project .. . .. . My question is two fold : 1 . What is the best way to leverage drone using the mono repository pattern multiple-projects one repository 2 . If Drone doesn t have support for that pattern or isn t designed for it what is the best work-around to limit fake builds .. . .. . Note : We could at the beginning of our build check for changes in our sub-folder and return a green if there aren t any . I this a recommended approach Comment : Hey did you solve this issue I need the same. . run step on master branch and on pull requests .", "Question : Maybe I have t looked hard enough but I spent yesterday googling for a bit and found no relevant projects on hacking the DJI Phantom Drone in order to create new coordinating apps . This is besides the app for coordination DJI currently uses for their drone . I m trying to see if there s a way to communicate with the Drone with a specific protocol in order to accept a set of procedures . Any help would be awesome Thanks . Comment : I am also looking for it . Comment : so it s a common issue . Hopefully someone can spread some light on this . .. . Answer : This post is old but I think it is good to leave a foot print for others : .. . .. . There is this new company called NVdrones which created a peace of hardware that you can attach to any drone you need physical access to the flight controller and once you do that you can use their SDK Arduino Java Android and Javascript to write your app without the need of hacking soldering or anything else . It is just plug and play . Another benefit is that you are not locked with a specific drone DJI SDK or 3DRobotics SDK you can use the board on anything you want . Which gives lots of flexibility . The developer site is http : developers.NVdrones.com .. . .. . Hope this helps ." ] }
[ "yes-answer-long", "yes-answer-short" ]
docker
UNK_RELATION
looper@carousel@31
looper -- a jquery plugin for @placeholder .
{ "confidence": [ 26.437541961669922, 25.30113983154297, 25.194379806518555, 24.985883712768555, 24.859310150146484, 24.859310150146484, 24.859310150146484, 24.748626708984375, 24.748626708984375, 24.748626708984375, 24.519245147705078, 24.42597198486328, 24.42597198486328, 24.254791259765625, 24.254791259765625, 24.254791259765625, 24.120725631713867, 24.034439086914062, 23.933368682861328, 23.933368682861328, 23.854389190673828, 23.854389190673828, 23.69611167907715, 23.69611167907715, 23.59012794494629, 23.47109031677246, 23.47109031677246, 23.47109031677246, 23.47109031677246, 23.27027702331543, 23.27027702331543, 23.249868392944336, 23.249868392944336, 23.249868392944336, 23.249868392944336, 23.09178924560547, 23.004451751708984, 23.004451751708984, 22.55646514892578, 22.55646514892578, 22.55646514892578, 22.507675170898438, 22.507675170898438, 22.507675170898438, 22.505569458007812, 22.505569458007812, 22.466167449951172, 22.466167449951172, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.418575286865234, 22.27042007446289, 21.999530792236328, 21.999530792236328, 21.999530792236328, 21.755483627319336, 21.755483627319336, 21.753536224365234, 21.55154037475586, 21.413650512695312, 21.413650512695312, 21.413650512695312, 21.413650512695312, 21.413650512695312, 21.413650512695312, 21.413650512695312, 21.330245971679688, 21.261741638183594, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344, 20.992881774902344 ], "content": [ "Take note : Every Handler is bundle with one Looper which only one Looper may be created per thread .", "What is Looper", "you are using .looper .looper but you dont need to because you are already using data-looper go in your div .", "But Looper.prepare prepares Looper in current thread .", "Android docs on Looper are not clear in stating whether we shall use Looper or not .", "It will hang the Looper associated with myHandler until the Looper spawned in the Runnable exits .", "Looper : .. . .. . Looper is a class which is used to execute the Messages Runnables in a queue .", "As I read this in the source code of Looper .", "One of the messages to the looper causes the draw .", "Draw is a special message sent to that looper .", "Things i know is Looper is what im using is main ui threads Looper .", "So you can create an Handler instance by constructor of Handler Looper .", "Handler uses the current thread and throws an exception if the current thread is not a Looper .", ".. . .. . There is prepare method to prepare the Looper .", "And how about Looper .", "How the looper start and stop", "http : stackoverflow.com questions 7597742 what-is-the-purpose-of-looper-and-how-to-use-it .. . .. . Then take a look on this : java.lang.RuntimeException : Only one Looper may be created per thread http : stackoverflow.com questions 23038682 java-lang-runtimeexception-only-one-looper-may-be-created-per-thread for finding the answer for your question .", "The problem I noticed is that you are using .looper .looper but you don t need to because you are already using data-looper go in your div .", "The difference is that Looper.prepareMainLooper prepares looper in main UI thread .", "This fails because X s looper is already prepared .", "An important character of Looper is that it s associated with the thread within which the Looper is created .", "A Handler is always bound to a Looper and subsequently bound to the thread associated with the Looper .", "Actually the Looper in the main thread is what allows drawing .", "When the Looper processes that message the actual drawing occurs .", "Very easy : the Looper of the current Thread if you don t specify it but you can use the constructor with a Looper : new Handler Looper looper http : developer.android.com reference android os Handler.html Handler android.os.Looper and in this case the handler is associated with looper in argument .", "Looper is made to do 2 things .", "prepare initializes the current Thread as a Looper .", "Or any example showing working of a looper. .", "You don t create a handler in the looper .", "Not sure what you re trying to accomplish and I m not at all too familiar with Looper and threads but here are a few articles I read about Looper .", "Generally you want to construct a looper like this : .. . .. . I m assuming your thread pool is then a pool of MyThread threads each of which have their own Looper .", "Let s start with the Looper .", "It resides inside a Looper and that s it .", "Looper is not a generally known thing .", "i have a problem with a looper.. .", "Looper myLooper .", "Also what are the effects of running the Handler on main looper and local looper will it determine the thread that the above callback is executed on", "To create a Looper for a thread and dedicate that thread to process messages serially from a message loop you can use the Looper class .", "Here is an Article which explains Looper life cycle how to use it and usage of Looper in Handler- http : prasanta-paul.blogspot.kr 2013 09 android-looper-and-toast-from.html Hope it helps .", "You cannot use a Looper inside a AsyncTask because Only one Looper may be created per thread .. . .. . On second thought why are you using this Looper anyway", "That is the real reason you can pass a Looper instance to a Handler ...if you pass no Looper then the Handler will execute code on the thread in which it was created which must also be a Looper thread .", "The Looper object is tied to a thread-local which hosts the message-queue .", "On the other hand if you wish to associate your Handler with a particular looper ie .", "Any attempt to deliver to an uninitialized Looper will result in a runtime exception .", "I think that you should take a look on this to understand about the lopper : What is the purpose of Looper and how to use it", "Yes Handler will bundled with the Looper created by the Thread on which showDialog String message run .", "This is all about Looper Handler and MessageQueue .", "Looper has nothing to do with for loops .", "myLooper .. . .. . Return the Looper object associated with the current thread .", "Returns null if the calling thread is not associated with a Looper .", "The looper on androids main thread is already prepared .", "So shall we ever use Looper or not", "The looper can then be used to create handler classes .", "With a service you not have to deal with Looper s lifetime .", "That is the background3 s Looper isn t really being used .", "Where we can use Looper class", "Here is the code by which you can prepare the Looper .", "Looper allows tasks to be executed sequentially on a single thread .", "how can i quite from looper.. .", "This only works for threads that have a Looper prepared though .", "So what basically differs a service and a looper.. .", "If our app is crashed will looper also get crashed. .", "The Looper is the object that waits for the messages in a while true loop .", ".. . .. . A Looper is an Object associated with the Thread from which it is created .", "A Handler is always associated with a Looper which one", "Sources : .. . What is the purpose of Looper and how to use it", "Edit .. . .. . I enabled logging for the main Looper .", "Is there a way to change the looper the handler use without accessing it", "When a view is invalidated a message is passed to the main Looper telling it that a draw was requested .", "You can understand the relationship between Looper Handler and MessageQueue more easily when you understand what Looper is .", "It s the Looper s job to deal with new incoming Message or Runnable objects sent to the Handler which is bound to the Looper .", "a Looper but I don t see which part of your code that would require a Looper .", "What is the right way to shut down the Looper in an application with multiple activities and where Handler s created on this Looper have lifecycle different from ones of the activities .", "Here s an example of how to Create Looper thread and send a Message to it http : stackoverflow.com questions 4838207 how-to-create-a-looper-thread-then-send-it-a-message-immediately .", "you are not constructing the Handler within a thread like above then you should be passing the Looper thread in to the constructor like : .. . .. . If you don t specify that then the handler uses the thread in which it was created to grab that thread s Looper from the ThreadLocal object .", "no a Looper is created in Looper.prepare method so there is only one Looper if you start that Thread multiple times you will have multiple Looper s but each one is associated with its corresponding Thread", "As we know there is a message-queue associated with Looper .", "But how can I achieve without using Looper", "After the examination a new Looper is created and saved in ThreadLocal .", "The relationships between Looper Handler and MessageQueue is shown below : .. . .. .", "Looper class has a member variable of MessageQueue .", "The Looper is the part of the Android system that controls the UI thread .", "The general recommendation is to not associate Looper -instances with AsyncTask -threads .", "When using Handler to create one instance the default Looper is from the Main UI Thread on which current Activity s run .", "HandlerThread Looper is initialized in HandlerThread run .", "Considering the following snippet of code : .. . .. . The internals of doAsync are using a handler and the main looper .", "It is usually used as follows : .. . .. . Looper.myLooper is api to get looper attached to current thread", "Are you suggesting to use Service for managing Looper s lifetime", "Creating a Looper for a Thread means that other Thread s can post to it .", "I want to know what the Looper class does and also how to use it .", ".. . .. . Looper is a class which is used to execute the Messages Runnables in a queue .", "You can better understand what Looper is in the context of GUI framework .", "Android Looper is a wrapper to attach MessageQueue to Threads and it manages Queue processing .", "A Looper has a synchronized MessageQueue that s used to process Messages placed on the queue .", "Only one Looper Thread Key methods include prepare loop and quit .", "Looper is a class which is used to execute the Messages Runnables in a queue .", "But I still feel that how to decide whether to use looper or asynctask class. .", "If I put it withing the looper it is still only run once .", "I m trying to get a looper thread to work but despite all attempts it crashes ." ] }
{ "confidence": [ 29.82537078857422, 29.50776481628418, 27.859853744506836, 27.745346069335938, 27.568309783935547, 27.563152313232422, 26.97555923461914, 26.93502426147461, 26.92120933532715, 26.639856338500977, 26.548892974853516, 26.520465850830078, 26.303491592407227, 26.303491592407227, 26.303491592407227, 26.006790161132812, 25.847354888916016, 25.662464141845703, 25.640827178955078, 25.640827178955078 ], "content": [ "Question : Hi all i am new in android technologies so here is my code which is make an headache for me .. . .. . after some time not exact scenario i have faced an error java.lang.RuntimeException : Only one Looper may be created per thread at android.os.Looper.prepare .. . .. . so anyone have any idea where i goes wrong .. . Answer : I think that you should take a look on this to understand about the lopper : What is the purpose of Looper and how to use it http : stackoverflow.com questions 7597742 what-is-the-purpose-of-looper-and-how-to-use-it .. . .. . Then take a look on this : java.lang.RuntimeException : Only one Looper may be created per thread http : stackoverflow.com questions 23038682 java-lang-runtimeexception-only-one-looper-may-be-created-per-thread for finding the answer for your question . Hope that help", "Question : Hi all i am new in android technologies so here is my code which is make an headache for me .. . .. . after some time not exact scenario i have faced an error java.lang.RuntimeException : Only one Looper may be created per thread at android.os.Looper.prepare .. . .. . so anyone have any idea where i goes wrong .. . Answer : Take note : Every Handler is bundle with one Looper which only one Looper may be created per thread . So you can create an Handler instance by constructor of Handler Looper . When using Handler to create one instance the default Looper is from the Main UI Thread on which current Activity s run . As for your codes above you defined showDialog String message in an Activity right So that means this method will be called on the Main UI Thread . Consequently when you create a Handler instance by constructor of Handler inside showDialog String message the Looper from the Main UI Thread will be bundled with the Handler instance by default . That means Looper.prepare is redundant and then removing Looper.prepare will solve your problem . Comment : Not exactly . Handler uses the current thread and throws an exception if the current thread is not a Looper . That s normally but not necessarily the main thread . Comment : Yes Handler will bundled with the Looper created by the Thread on which showDialog String message run . In this case showDialog String message run on the Main UI Thread .", "Question : I m now trying to resurrect one project . There was an exception on getMainLooper .. . I thought that may be there s a problem with MainLooper initialization and added Looper.prepareMainLoop before that . Exception telling me that there s already a looper for that object was thrown.. . .. . .. . Then I tried to replace getMainLooper with Looper.myLooper and it worked.. . But I didn t understand why .. . .. . In fact I don t get the difference between this two things . I think that on the place where getMainLooper was used in my project it s the best place for the true main looper of the application but I got what I got. . Please explain . Thank you for your attention .. . Answer : The difference is that Looper.prepareMainLooper prepares looper in main UI thread . Android applications normally do not call this function . As main thread has its looper prepared long before first activity service provider or broadcast receiver is started . But Looper.prepare prepares Looper in current thread . After this function is called thread can call Looper.loop to start processing messages with Handler s . So in your case you had two threads - X and Y . The X thread is the main UI thread that has its looper already prepared by Android . When you are in Y thread and you re calling Looper.prepareMainLooper you re trying to prepare looper in X thread main thread . This fails because X s looper is already prepared . But when you call Looper.prepare in Y thread you re actually preparing looper in Y thread and therefore ready to call Looper.loop .", "Question : Today I read some blogs and source code about how Handler Looper work together . Based on what I ve learnt we can have only one Looper on each thread by using the ThreadLocal magic . Usually Handler is initiated in main thread or else you must manually start or saying prepare the Looper on a separate thread and then loop it up . What really confused me was the loop in main thread . As I read this in the source code of Looper . It s an endless loop to handle the message-queue and then dispatch messages for callbacks to handle . According to this http : stackoverflow.com a 5193981 2290191 Handler and it s Looper run in the same thread . If there is an endless loop on the main thread wouldn t it block the entire UI system I know that I must be so silly to miss something . But it would be lovely for someone to reveal the secret behind this . .. . Answer : Actually the Looper in the main thread is what allows drawing . When a view is invalidated a message is passed to the main Looper telling it that a draw was requested . When the Looper processes that message the actual drawing occurs . The reason other activity that holds up the UI thread holds up drawing is that it prevents the Looper from processing that draw message . This is more or less how drawing works in any event based system from Windows to Mac to Android . Why not draw immediately instead of sending a message Performance . Drawing is slow . If you do multiple changes in response to an event you don t want to redraw the screen for each one . Doing it this way means you bunch all of your redraws for handling a single event into 1 redraw . For example if you set the text of 1 view and the image of another they ll both be redrawn at the same time and only once . Comment : I don t think you read my question carefully . I mean if there is for-loop on main thread how is that possible to send messages to draw the UI Comment : I did I don t think you understood my answer . One of the messages to the looper causes the draw . Draw is a special message sent to that looper . Comment : Or put another way- what you re thinking of as the main thread is actually that Looper processing messages and calling your code in response to it . That s a technique called an event-loop or message loop which is common in event-driven programming . Here s a detailed explanation of Android s mattias.niklewski.com 2012 09 android-event loop.html http : mattias.niklewski.com 2012 09 android-event loop.html Comment : Thanks @Gabe Sechan that blog really explains everything . I used to figure all this out with a multi-thread model . Like the events must be sending from another thread and the main thread waits for events to handle . How foolish", "Question : can any on explain why button is getting displayed . xml .. . .. . MainActivity .. . .. . For above code out put is .. . .. . enter image description here http : i.stack.imgur.com LY2lo.png .. . .. . For above code out put is when i uncomment Looper.loop enter image description here http : i.stack.imgur.com a1kOo.png .. . .. . can any one explain this . What Looper.loop is doing to not display the button on ui . Things i know is Looper is what im using is main ui threads Looper . i know Looper is already running looping over the messages and im calling Looper.loop I just want to know what is does that button drawing wont happen on the ui-thread means does that Looper get reset or removes some message . exactly what happen when we call Looper.loop on a thread looper when its already looping . .. . Answer : Looper.loop is an infinite-loop so when you re running this off the main UI thread the code execution basically stops there preventing the UI from being displayed . Not sure what you re trying to accomplish and I m not at all too familiar with Looper and threads but here are a few articles I read about Looper . http : mindtherobot.com blog 159 android-guts-intro-to-loopers-and-handlers http : corner.squareup.com 2013 10 android-main-thread-1.html Comment : ur post is very relevant to the answer but not completely . i know Looper is already running looping over the messages and im calling Looper.loop I just want to know what is does that button drawing wont happen on the ui-thread means does that Looper get reset or removes some message . exactly what happen when we call Looper.loop on a thread looper when its already looping . Comment : @sush because when you call Looper.loop you are blocking the rest of the code . In other words you re blocking the main thread from continuing . It won t ever get to onStart and onResume of the activity because the Looper.loop call you made is waiting for messages . The reason you get your Toast message is that you created a message to display the Toast then you called Looper.loop and now all it is doing is waiting and will pick up your Toast to display after 10 seconds and then keeps on waiting . Comment : @sush so one way to visualize this is add an onResume override in your activity and put a debug breakpoint in it . When you debug your app you will never hit the onResume as the code execution is still on your Looper.loop line .", "Question : Consider the following snippet : .. . .. . A little background : I m doing some processing on the UI thread where I will need to ping a large about of devices and do something with the result . I need to perform the requests in parallel to be efficient . Question : If one of these use cases somehow executed fast enough and made a callback before I was able to hit Looper.loop would the message be queued or just lost Callbacks are being posted back to this thread by the handler posting a runnable to the original thread . .. . Answer : Assuming you have invoked Looper.prepare prior to your useCaseProvider delivering results you should be fine . If Looper.prepare was not called you should be seeing RuntimeException being thrown . The Looper object is tied to a thread-local which hosts the message-queue . The Looper.prepare function will construct this message-queue at which point you can begin queuing up messages . Once you fire Looper.loop that s when those pending messages will begin to execute . Looking at the snippet I m not too sure how things are tied together . Generally you want to construct a looper like this : .. . .. . I m assuming your thread pool is then a pool of MyThread threads each of which have their own Looper . The thread pool should initialize your threads so once you deliver a Runnable to be executed by your thread the run method should have the Looper initialized . On the other hand if you wish to associate your Handler with a particular looper ie . you are not constructing the Handler within a thread like above then you should be passing the Looper thread in to the constructor like : .. . .. . If you don t specify that then the handler uses the thread in which it was created to grab that thread s Looper from the ThreadLocal object . Lastly if your intentions are to have messages delivered on the Handler which is associated with the UI thread then you should not be concerned about calling Looper.prepare or Looper.loop . This is handled by the Activity . Comment : So basically in his snippet processing messages on the MessageQueue will be delayed by the execution-time of the for-loop . Comment : Pretty much . Any attempt to deliver to an uninitialized Looper will result in a runtime exception . Depending on what s required an IntentService might be a better way to go .", "Question : I need to understand about the Looper . Looper will consult appropiate handler to to send and process Message and Runnable objects associated with a thread s MessageQueue . By default a thread does not have a message loop associated with it hence doesn t have a Looper either . To create a Looper for a thread and dedicate that thread to process messages serially from a message loop you can use the Looper class . The following is my code I don t invoke Looper explicitly .. . .. . Does it mean that the task runnable is not put in the queue what s the difference of above code with this .. . .. . both of them accessing a same handler . They both work fine . Comment : A Thread does not need a Looper to post to another Thread s Handler if that s what you re asking . The Handler s in your examples are for other Thread s whichever Thread s you re creating them on . Comment : Hello I m confused now so what s the difference on my second example there I m invoking Looper.prepare explicitly but without it it still works Comment : Creating a Looper for a Thread means that other Thread s can post to it . The Looper in your example isn t really doing anything since you re not posting anything to a Handler created there which is why you don t see a difference . Comment : Mike whats that other Threads can post to it in this context could you put it as answer please Comment : Well there are plenty of answers here that already cover this so I d rather find a duplicate than post a repeat answer . Anyway in your second example since you re starting a Looper in that Thread you could create a Handler for that Looper pass it to another Thread and then that other Thread can post to it . Your example Thread s are posting Runnable s to whichever other Thread the Handler s are created for . They re not posting them to themselves . .. . Answer : Creating a Looper for a Thread means you re setting up that Thread to receive messages from other Thread s . Both of your examples are behaving exactly the same because the you re not sending anything to the Thread in the second example . That is the background3 s Looper isn t really being used . In both examples you re posting a Runnable to a Handler that was created for the main Thread s Looper . You re not creating that Handler for e.g . background2 . That Handler belongs-to the main Thread and its Looper and anything you post to it will be put into the main queue and run on the main Thread . The only difference in your examples is that the second Thread has a Looper and you could post to it if you wanted to . To do that you would create another Handler that belonged to background3 s Looper and post to that . You re not doing that though so the second Thread just continues to run without doing anything else . A Thread doesn t need a Looper simply to post to another Thread s Handler which is really all that your examples are doing . That other Thread - the main Thread in this case - has already prepared and started its Looper . You re just sending Runnable s to it and you don t need a Looper of your own to do that . Comment : Lemme know if I didn t adequately explain anything . Comment : Thank you very much Mike I get it know . The other posts you posted on the comment explains Looper too general as a kind of manager thread . But your answer is making it clear . Comment : Ah good . Glad I could help . Cheers", "Question : I am new to Android . I want to know what the Looper class does and also how to use it . I have read the Android Looper class documentation http : developer.android.com reference android os Looper.html but I am unable to completely understand it . I have seen it in a lot of places but unable to understand its purpose . Can anyone help me by defining the purpose of Looper and also by giving a simple example if possible Comment : I just found an extraordinarily thorough and clear explanation of Looper and its use on Safari Books Online . Unfortunately I suspect access if free for only a limited time . safaribooksonline.com library view efficient-android-threading https : www.safaribooksonline.com library view efficient-android-threading 9781449364120 ch04.html Comment : Android articles and reference pages require you to have and understanding of a previous article before you can grasp the current one . I suggest you read the Activity and Service articles in the Api guides and then read Handler and Looper . It also helps if you have an understanding of what a thread is not an android thread but a thread in general...e.g . POSIX . .. . Answer : What is Looper .. . .. . Looper is a class which is used to execute the Messages Runnables in a queue . Normal threads have no such queue e.g . simple thread does not have any queue . It executes once and after method execution finishes the thread will not run another Message Runnable . Where we can use Looper class .. . .. . If someone wants to execute multiple messages Runnables then he should use the Looper class which is responsible for creating a queue in the thread . For example while writing an application that downloads files from the internet we can use Looper class to put files to be downloaded in the queue . How it works .. . .. . There is prepare method to prepare the Looper . Then you can use loop method to create a message loop in the current thread and now your Looper is ready to execute the requests in the queue until you quit the loop . Here is the code by which you can prepare the Looper . Comment : So looper could be used to update the main thread with lets say.. . a download percentage 10 20 30 .. . etc . Essentially feedback which you could feed into a progressbar Comment : An AsyncTask is better for that purpose and less complex as it encapsulates all the thread managing . Comment : Should have @Override annotations before the run and handleMessage methods Comment : The documentation indicates that you must call looper.quit . In your code above Looper.loop will block indefinitely . Comment : I think it would be better to use HandlerThread http : developer.android.com reference android os HandlerThread.html which is a convenient class for a thread with a looper .", "Question : Any one could please explain whether the Handler is a Thread or not . If yes how can we update the UI from this Handler thread . If we use the Looper concept it may possible in this case does it apply to any threads I am very much confuced about this Thread Handler and Looper . Any one please explain with example. . .. . .. . That question What is the difference between a Thread and a Handler is about only Handler and Thread but didnt explain about Looper and its behavior . And the accepted answer says Handlers on the other hand are background threads that allow you to communicate with the UI thread update the UI . but actually the Handler is not a Thread from below post by ben75 . So I think it is not the duplicate of that question . Thanks. . Comment : developer.android.com reference android os Handler.html http : developer.android.com reference android os Handler.html Comment : That question is about only Handler and Thread but didnt explain about Looper and its behavior . Comment : @jettimadhuChowdary - Take a look at the answers and see if they have adequately answered your question before voting to reopen . .. . Answer : premise : A Handler is not a Thread . .. . .. . A Looper is an Object associated with the Thread from which it is created . As you can guess by it s name a Looper is going to loop over something but looping over what Over a message-queue also associated with the same thread . Next question is : How can I put something in this message-queue And here is the Handler . A Handler is always associated with a Looper which one we will see it later . The Handler can play 2 roles and that s maybe why it is confusing .. . .. . First role of the Handler : you must use it to post messages to it s associated Looper in fact to it s message-queue . You can use one of the various Handler.sendMessage or Handler.post methods to do that . and note the sendMessageDelayed postDelayed methods allowing you to post a Message http : developer.android.com reference android os Message.html Runnable http : developer.android.com reference java lang Runnable.html to be handled in future .. . .. . What is the Looper associated with a Handler Very easy : the Looper of the current Thread if you don t specify it but you can use the constructor with a Looper : new Handler Looper looper http : developer.android.com reference android os Handler.html Handler android.os.Looper and in this case the handler is associated with looper in argument . At this point we know that : .. . .. . a Looper is associated with one and only one Thread .. . a Looper loops over it s associated message-queue .. . as a consequence : there is one message-queue associated with one Thread as soon as we have a Looper for the Thread .. . a Handler is always associated with one Looper .. . a Handler can be used to post message to the message-queue .. . .. . .. . .. . Now let s see the second part : the message processing message handling . First let s look at the Looper looping over it s message-queue . Is there is a message in the queue Yes i.e . at some point a Handler has posted it . Is it time to handle this message if it was posted with postDelayed http : developer.android.com reference android os Handler.html postDelayed java.lang.Runnable 20long If not wait a little . If it is time : let s dispatch this message . Remember that I told that the Handler have 2 roles.. . and here is the second role of the Handler : a Handler as indicated by it s name can handle messages . To be able to handle custom messages you must subclass the Handler class and implements the handleMessage Message http : developer.android.com reference android os Handler.html handleMessage android.os.Message method . So the Looper will simply call the handleMessage of the Handler who posted the message and it s job i.e . dispatching the messages is finished the Looper can move on to the next Message in the queue . At this point you may ask yourself : OK I see the interest of delayed messages but why should I use all this stuff for things to do immediatelly Remember that the Looper is associated with one Thread and the handleMessage will be called in this Thread . On the other hand the Handler.post can be called from another thread . So this mechanism is also very convenient to schedule a job in thread X from thread Y . particularly useful if the job is affecting the UI and MUST be run in the UI-Thread .. . .. . Final note .. . .. . UI-thread is a first class citizen : .. . .. . On Android there is a main Looper associated with the main Thread i.e . the UI-thread . You can get a reference to it with Looper.getMainLooper so you create a Handler associated with the main Looper with : .. . .. . and with that you can post a message from any thread to the UI-thread .. . .. . Should you really use messages and subclassing Handler to use this No not always .. . .. . You don t always need to create message explicitly to use this mechanism . You can easily post a Runnable http : developer.android.com reference java lang Runnable.html to a Handler and in this case you don t even need to override the handleMessage Message because the default implementation of the Handler will simply execute the Runnable under the hood : a message http : developer.android.com reference android os Message.html is created with the Runnable associated to it .. . .. . Looper must be prepared to receive messages .. . .. . By default there is no Looper on every thread by default there is only a prepared one in the UI-Thread . To prepare a Looper for the current thread : call Looper.prepare http : developer.android.com reference android os Looper.html prepare Comment : This is awesome.. . thank you @ben75 for making this lucid explanation", "Question : I have read that a service is different from thread because it is not affected by the current activity . But threads are . But Looper is also same like a service which doesn t get affected by the current activity and they both run in background . So what basically differs a service and a looper.. . Please help me out . I am totally confused in these topics . .. . Answer : Looper is a class which is used to execute the Messages Runnables in a queue . Normal threads do not have any queue . For example Simple threads do not have any queue . They are for one time execution and after the end of the code the thread will be stopped killed and it will not able to run another Message Runnable . Usage If you wants to execute multiple messages Runnables then you should use the Looper class which is responsible for creating a queue in the thread . For example . If you are writing an application which downloads files from the internet then you can use Looper class to put all the files in the queue to be downloaded . Service runs in a different process Say in an application if it gets crashed or the process in which application was running gets killed then Async Task looper will also be killed but not Service because service was running in a differnt process . Looper run in the same thread as of app unkike Service .Also Android Recommends to use Async task rather than Loopers . Comment : Can we use services in this case or AsyncTask class because AsyncTask class is also responsible for handling multiple tasks simultaneously. . Comment : The main difference is Service runs in a different process Say in an application if it gets crashed or the process in which application was running gets killed then Async Task will also be killed but not Service because service was running in a differnt process . Comment : And how about Looper . If our app is crashed will looper also get crashed. . Comment : Looper run in the same thread as of app unkike Service If the process in which app was running gets killed then looper will also be killed but service will remain running as service runs in a different process . Comment : I am absolutely clear about Services and thank you so much for that . But I still feel that how to decide whether to use looper or asynctask class. . do you have any website or blog. . Or any example showing working of a looper. .", "Question : I am new to Android . I want to know what the Looper class does and also how to use it . I have read the Android Looper class documentation http : developer.android.com reference android os Looper.html but I am unable to completely understand it . I have seen it in a lot of places but unable to understand its purpose . Can anyone help me by defining the purpose of Looper and also by giving a simple example if possible Comment : I just found an extraordinarily thorough and clear explanation of Looper and its use on Safari Books Online . Unfortunately I suspect access if free for only a limited time . safaribooksonline.com library view efficient-android-threading https : www.safaribooksonline.com library view efficient-android-threading 9781449364120 ch04.html Comment : Android articles and reference pages require you to have and understanding of a previous article before you can grasp the current one . I suggest you read the Activity and Service articles in the Api guides and then read Handler and Looper . It also helps if you have an understanding of what a thread is not an android thread but a thread in general...e.g . POSIX . .. . Answer : Android Looper is a wrapper to attach MessageQueue to Threads and it manages Queue processing . It looks very cryptic in Android documentation and many times we may face Looper related UI access issues . If we don t understand the basics it becomes very tough to handle . Here is an Article which explains Looper life cycle how to use it and usage of Looper in Handler- http : prasanta-paul.blogspot.kr 2013 09 android-looper-and-toast-from.html Hope it helps . Comment : This doesn t explain why one would use this class only how .", "Question : null .. . Answer : Android docs on Looper are not clear in stating whether we shall use Looper or not . I have seen many places saying not to use Looper with Handler but to use AsyncTask or some similar non-main thread methodology . So shall we ever use Looper or not If yes when me have to use it not must or should Only when passing UI update message from the thread to the main thread or there are some other cases as well Comment : some similar non-main thread methodology . Which is the key to answer your question : too much work on your main thread may cause crashes Comment : That was my idea years ago when I started learning Android . But now each time I am interviewed for a senior position I am asked do you use Looper why and when . Obviously all seniors in those companies are using it.. . which is the reason I asked the question . Comment : then answer those seniors : no i am always using a HandlerThread its docs say : Handy class for starting a new thread that has a looper . The looper can then be used to create handler classes . Note that start must still be called .", "Question : It seems that Looper at least the one that is created with HandlerThread never gets garbage collected even if not referenced by other code . I am aware of quit and quitSafely methods however in my application I am not sure who would be responsible for calling one of these methods . What is the right way to shut down the Looper in an application with multiple activities and where Handler s created on this Looper have lifecycle different from ones of the activities . It can t be onDestroy of any of the activities . If I don t shut it down and the process is not killed by OS - new Looper may be created on next app launch and this one will leak . Alternatively create once store in a static field never quit let it leak once . The last one seems to be the safest and easiest to implement so far . .. . Answer : What is the right way to shut down the Looper in an application with multiple activities and where Handlers created on this Looper have lifecycle different from ones of the activities .. . .. . Use a Service https : developer.android.com reference android app Service.html . It has own Looper own lifecycle can work in main thread like activity . You can use LocalBroadcastManager https : developer.android.com reference android support v4 content LocalBroadcastManager.html to get callback from it . Comment : Are you suggesting to use Service for managing Looper s lifetime If so as I said before - I don t even know when to shut it down . In this case Service should be roughly equivalent to my static field . Alternatively if you are suggesting to use Service to do work on the non-main thread I am particularly interested in Handler s sending Message s to each other . Comment : With a service you not have to deal with Looper s lifetime . You can just bind it to Service lifetime and let the System to manage it . If you really want to use Handler you can use a ResultReceiver http : stackoverflow.com questions 4510974 using-resultreceiver-in-android to handle Message s from Service .", "Question : I am new to Android . I want to know what the Looper class does and also how to use it . I have read the Android Looper class documentation http : developer.android.com reference android os Looper.html but I am unable to completely understand it . I have seen it in a lot of places but unable to understand its purpose . Can anyone help me by defining the purpose of Looper and also by giving a simple example if possible Comment : I just found an extraordinarily thorough and clear explanation of Looper and its use on Safari Books Online . Unfortunately I suspect access if free for only a limited time . safaribooksonline.com library view efficient-android-threading https : www.safaribooksonline.com library view efficient-android-threading 9781449364120 ch04.html Comment : Android articles and reference pages require you to have and understanding of a previous article before you can grasp the current one . I suggest you read the Activity and Service articles in the Api guides and then read Handler and Looper . It also helps if you have an understanding of what a thread is not an android thread but a thread in general...e.g . POSIX . .. . Answer : Looper allows tasks to be executed sequentially on a single thread . And handler defines those tasks that we need to be executed . It is a typical scenario that I am trying to illustrate in this example : .. . .. . Now we can use the handler in some other threads say ui-thread to post the task on Looper to execute . On UI thread we have an implicit Looper that allow us to handle the messages on ui-thread . Comment : it will not lock any UI Process is it true Comment : It wont since it managing by handler Comment : Thanks for including sample on how to post jobs to the queue Comment : SampleLooper extends Thread right Comment : how can i quite from looper.. .", "Question : I am new to Android . I want to know what the Looper class does and also how to use it . I have read the Android Looper class documentation http : developer.android.com reference android os Looper.html but I am unable to completely understand it . I have seen it in a lot of places but unable to understand its purpose . Can anyone help me by defining the purpose of Looper and also by giving a simple example if possible Comment : I just found an extraordinarily thorough and clear explanation of Looper and its use on Safari Books Online . Unfortunately I suspect access if free for only a limited time . safaribooksonline.com library view efficient-android-threading https : www.safaribooksonline.com library view efficient-android-threading 9781449364120 ch04.html Comment : Android articles and reference pages require you to have and understanding of a previous article before you can grasp the current one . I suggest you read the Activity and Service articles in the Api guides and then read Handler and Looper . It also helps if you have an understanding of what a thread is not an android thread but a thread in general...e.g . POSIX . .. . Answer : A Looper has a synchronized MessageQueue that s used to process Messages placed on the queue . It implements a Thread Specific Storage Pattern . Only one Looper Thread Key methods include prepare loop and quit . prepare initializes the current Thread as a Looper . Prepare is static method that uses the ThreadLocal class as shown below . prepare must be called explicitly before running the event-loop . loop runs the event-loop which waits for Messages to arrive on a specific Thread s messagequeue . Once the next Message is received the loop method dispatches the Message to its target handler quit shuts down the event-loop . It doesn t terminate the loop but instead it enqueues a special message .. . .. . A Looper can be programmed in a Thread via several steps", "Question : I am trying to implement Handlers listening on the same Looper from different threads . Below I have two Handlers one created in the main thread another in the child thread however both are initialized to listen on the Main Looper . But when I send a message like below only the child handler prints the message . The main handler does not receive the message . What am I doing wrong Thank you for reading . .. . Answer : Each Handler instance controls the Message target and there is no way to get them to share so every message or post sent to a Handler is only executed by that instance . The Looper indicates which thread the messages runnables sent will be executed on . In your code both Handlers will execute handleMessage on the main thread despite being created on separate threads . That is the real reason you can pass a Looper instance to a Handler ...if you pass no Looper then the Handler will execute code on the thread in which it was created which must also be a Looper thread . Furthermore because of this there isn t reason to create multiple Handlers to post data in this manner . A single Handler is designed to be sent messages from multiple threads and they are all serialized in a MessageQueue and executed on the chosen Looper thread . You can post directly to mMain from the background-thread to execute code on that thread . In this case passing the Looper is redundant at that code is already on the main thread . Comment : I see thanks Suppose if one day the Runnable was an outer class instead of an inner class I should pass an initialized Handler to it via its constructor right Comment : The architecture would be application dependent but you would need a reference to the Handler from wherever you plan to post messages to it . Comment : Why not just use one Handler this.getMainLooper in the Application context the class that extends Application Wouldn t this be cleaner than doing it in an Activity", "Question : I have checked the official Android documentation guide for Looper Handler and MessageQueue . But I couldn t get it . I am new to android and got very confused with these concepts . .. . Answer : It s widely known that it s illegal to update UI components directly from threads other than main thread in android . This android document Handling Expensive Operations in the UI Thread http : developer.android.com guide faq commontasks.html threading suggests the steps to follow if we need to start a separate thread to do some expensive work and update UI after it s done . The idea is to create a Handler http : developer.android.com reference android os Handler.html object associated with main thread and post a Runnable http : developer.android.com reference java lang Runnable.html to it at appropriate time . This Runnable will be invoked on the main thread . This mechanism is implemented with Looper http : developer.android.com reference android os Looper.html and Handler http : developer.android.com reference android os Handler.html classes . The Looper class maintains a MessageQueue http : developer.android.com reference android os MessageQueue.html which contains a list messages http : developer.android.com reference android os Message.html . An important character of Looper is that it s associated with the thread within which the Looper is created . This association is kept forever and can t be broken nor changed . Also note that a thread can t be associated with more than one Looper . In order to guarantee this association Looper is stored in thread-local storage and it can t be created via its constructor directly . The only way to create it is to call prepare http : developer.android.com reference android os Looper.html prepare 28 29 static method on Looper . prepare method first examines ThreadLocal http : developer.android.com reference java lang ThreadLocal.html of current thread to make sure that there isn t already a Looper associated with the thread . After the examination a new Looper is created and saved in ThreadLocal . Having prepared the Looper we can call loop http : developer.android.com reference android os Looper.html loop 28 29 method on it to check for new messages and have Handler to deal with them . As the name indicates the Handler class is mainly responsible for handling adding removing dispatching messages of current thread s MessageQueue . A Handler instance is also bound to a thread . The binding between Handler and Thread is achieved via Looper and MessageQueue . A Handler is always bound to a Looper and subsequently bound to the thread associated with the Looper . Unlike Looper multiple Handler instances can be bound to the same thread . Whenever we call post http : developer.android.com reference android os Handler.html post 28java.lang.Runnable 29 or any methods alike on the Handler a new message is added to the associated MessageQueue . The target field of the message is set to current Handler instance . When the Looper received this message it invokes dispatchMessage http : developer.android.com reference android os Handler.html dispatchMessage 28android.os.Message 29 on message s target field so that the message routes back to to the Handler instance to be handled but on the correct thread . The relationships between Looper Handler and MessageQueue is shown below : .. . .. . enter image description here http : i.stack.imgur.com h4z38.jpg Comment : Thanks but whats the point if the handler first post the message to the message-queue and then handle the message from the same queue why doesn t it just handle the message directly Comment : @Blake b c you are posting from one thread non looper thread but handling the message in another thread looper thread", "Question : In this example from the documentation https : developer.android.com guide components services.html ExtendingService we use the looper of a thread and we use it in the Service class and then the Service will be working as-if it was in a separate thread Thanks .. . Answer : The thread a HandlerThread is started in onCreate when you call thread.start then you get a reference to the Looper of that thread only one Looper is created per HandlerThread to create a Handler and the Handler is used to post messages to the thread . The Looper is the object that waits for the messages in a while true loop . Every time a command is sent to the Service the Service posts a message to the HandlerThread through the Handler . A closer look at the source code will help you understand better how it all works . There s an excelente post about Handler s and Looper s at Square Engineering Blog - A journey on the Android Main Thread - Part 1 http : corner.squareup.com 2013 10 android-main-thread-1.html . You can also use an IntentService http : developer.android.com reference android app IntentService.html to avoid instantiating your own threads . Comment : thanks rubenlop88 it makes more sense now thanks", "Question : I m working on a website and I have to implement a carousel of images . My choice fell on looper.js since it is simple and lightweight . But I m having problems in codeigniter : .. . - I imported the style sheet . - I imported the javascript file . - The carousel works . But problems comes when I want to implement the controls since I have a problem not recognizing prev and next . First do not put the arrows and then if I click it brings me to the carousel div instead of changing the slide . Here is the code I implemented : Comment : This seems to be working fine on my end.. . Now you are using multiple carousels . Do they all have different Ids . Comment : Another thing I noticed . in your website sample if you look at the console you get this error : Uncaught TypeError : Cannot read property looper of undefined but I do not have that on my local when I try it out . Would this maybe have to do with it Comment : Great no problem . I also noticed another problem . you are using .looper .looper but you dont need to because you are already using data-looper go in your div . Hope that helps as well . Comment : Ok thank you very much for your help @CodeGodie : D Comment : Youre welcome . Unfortunately I dont think theres a section where you can mark your Original Post OP as solved . What needs to happen is that you have to accept an answer . Do you want me to provide you with an answer so that you can accept it .. . Answer : The problem I noticed is that you are using .looper .looper but you don t need to because you are already using data-looper go in your div . Hope that helps . Comment : awesome . Thank you", "Question : I created a class extending Thread to retrieve user location through LocationManager in a non-ui thread . I implemented this as a thread because it has to be started on request and do its work just for a limited time . By the way I had to add a Looper object in the thread to be able to create the handler for the LocationManager onLocationChanged . This is the code : .. . .. . I would like the thread to start receive the user location data in this case just one time send the data to the main thread via a message to the handler and then die . The problem is that in my case the thread does not die anymore once the run method ended that should be fine because otherwise onLocationChanged would not receive the new locations . But in this way assuming that thread s stop and suspend methods are deprecated what would be a good way in this case at least to make a thread with a looper die Thanks in advance .. . Answer : You can explicitly quit from Looper s loop using Handler : Comment : In my case handler is a Handler object passed to this thread from the calling thread to be used to pass the collected data from one to another . Thus I cannot call handler.getLooper .quit because it refers to the activity thread and not to the userLocationThread . Note that onLocationChanged is inside the new thread and that Looper is required to let this callback method to be called when the locationManager receives a location . Comment : When you call Looper.myLooper you get Looper associated with current thread . When you call handler.getLooper you get Looper associated with specific handler . Comment : But if the handler is associated with the same thread the returned Looper should be the same doesn t it Comment : Yes if you create handler in the same thread where you call Looper.myLooper they should be the same . Comment : Oh I see what you mean : No in your original code you call Looper.myLooper .quit after you call Looper.mylooper .loop . The loop function does not return unless you call quit . And you call quit after loop . So basically you never reach your quit and end up in infinite-loop :" ] }
[ "yes-answer-long", "yes-answer-short" ]
carousel
UNK_RELATION
listpicker@silverlight-toolkit@45
listpicker -- the listpicker is part of the @placeholder for windows-phone .
{ "confidence": [ 60.5302734375, 60.51689910888672, 57.235286712646484, 55.92835235595703, 47.664527893066406, 47.664527893066406, 46.131439208984375, 44.19158935546875, 43.91382598876953, 41.07380294799805, 40.969512939453125, 40.334564208984375, 40.334564208984375, 40.0283203125, 39.6490478515625, 39.6490478515625, 39.6490478515625, 39.24411392211914, 38.33671569824219, 38.249088287353516, 38.224822998046875, 38.224822998046875, 38.1159553527832, 38.1159553527832, 38.1159553527832, 38.0355224609375, 38.0355224609375, 37.36979293823242, 36.945072174072266, 36.945072174072266, 36.945072174072266, 36.945072174072266, 36.945072174072266, 36.945072174072266, 36.91789245605469, 36.91789245605469, 36.91789245605469, 36.58711242675781, 36.58711242675781, 36.58711242675781, 36.58711242675781, 36.42318344116211, 36.404090881347656, 36.404090881347656, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.63814163208008, 35.40906524658203, 35.384803771972656, 35.384803771972656, 35.384803771972656, 34.92133331298828, 34.92133331298828, 34.92133331298828, 34.92133331298828, 34.82147216796875, 34.82147216796875, 34.82147216796875, 34.18973159790039, 34.18973159790039, 34.10504913330078, 34.10504913330078, 34.10504913330078, 34.10504913330078, 34.10504913330078, 34.10504913330078, 34.10504913330078, 33.83088684082031, 33.83088684082031, 33.83088684082031, 33.83088684082031, 33.83088684082031, 33.83088684082031, 33.83088684082031, 33.83088684082031, 33.18934631347656, 33.16413116455078, 33.10757827758789, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125, 32.523956298828125 ], "content": [ "In my Windows Phone app I have a ListPicker .", "possible duplicate of Windows Phone Toolkit ListPicker Throws an Unhandled Exception http : stackoverflow.com questions 17065970 windows-phone-toolkit-listpicker-throws-an-unhandled-exception", "I am using this code for create listpicker in windows-phone .", "I want to use ListPicker control in one of my Windows Phone apps .", "I have just installed the Windows Phone Toolkit http : phone.codeplex.com with the intention of using the ListPicker .", "I m trying to do a two-way binding of the SelectedIndex attribute of a ListPicker in a Windows Phone 7 UserControl .", "I m using Toolkit ListPicker in my Windows Phone 8 project and have begun localising it .", "In my windows-phone-8 application I am using listpicker that have two values Dark and Light when I select Light from listpicker and restart my application listpicker value i.e Light is lost and it holds default-value i.e Dark .", "In the ListPicker in my Windows Phone Application there is a List of items which a user can select one or more items and view those selected items .", "I m developing a windows-phone app and i need populate my ListPicker ToolKit from text file stored in isolatedStorage teste.txt .", "Like a ListPicker inside the main ListPicker .. . .. . I don t know how to approach that .", "Block Code so far for listpicker : .. . .. .", "But in App Inventor it is not filling the Listpicker Elements .", "I need to set a specific part of that listpicker selection for mysql delete .", ".. . .. . Here is the XAML for the ListPicker instance .", "I used a TOOLKIT ListPicker .", "Have no problem using ListPicker .", "I have run into a problem with the listpicker .", "Possible Duplicate : .. . ListPicker FullMode Selected Item Color http : stackoverflow.com questions 9738204 listpicker-fullmode-selected-item-color .. . .. . I ve a long list of things loading from a listpicker mostly useless .", "I have a Windows Phone 8 listpicker that I m trying to change the background-color of however it only seems to change the item background and not the dropdown box background as you can see in the screen-capture .", "and use this grid resources .. . .. . Below code for insert item into listpicker .. . .. . My Question was how to get the selected item from this listpicker .", "example just for Listpicker : .. . .. . the problem is when I select the List item in full mode the Listpicker selected item not change .", "And set the list as the ItemsSource of the ListPicker .", "This ListPicker is populated from a collection .", "The ListPicker is populated from a collection .", "You set the SelectedItem of the ListPicker as the Value of the TextBox", "I m trying to change the foreground of selected item in a ListPicker .", "but noticed test app is windows-phone Silverlight 8.1 and real app is windows-phone-8 . could that do it", "I want to change foreground and background on the listpicker", "ListPickerItems are UIElements and the ListPicker renders them in its presenter .", ".. . Because of this issue ListPicker only supports databinding and templating .", "Here is my code for the list of the items in a ListPicker .", "How to get id values from listpicker", "Where might I find a ListPicker ControlTemplate to modify", "If the user presses the back button again the ListPicker briefly appears before begin replaced by the page hosting the ListPicker instance .", "When the user clicks a certain item on the page the ListPicker visibility will toggle from Collpased to Visible and I set the values of the ListPicker .", "I need to create an ListPicker and open it on Fullscreen mode but always get erros because dont detect ExpansionMode on listpicker element .", "how do I add items to select to the ListPicker as well as how the code would look in my ts file to capture the input from the ListPicker .", "I am new to MIT App inventor and I am trying to create a Listpicker with a bunch of names and display them when the Listpicker is clicked .", "Since I cannot use activity starters in my listpicker I want to include some youtube links in my text boxes of the listpicker .", "Then in the AfterPicking event of the listpicker just use the selection index of the listpicker to get the corresponding item from the second list and start the activity starter as demonstrated in the example above .", "Anyway I m trying to bind a list of a custom class that is decorated to be used with the DataContext that manages a local SQL Server CE 3.5 database - natively included in Windows Phone 7.5 to a ListPicker control from the WPToolkit and strangely I can t see the value of the element I bound in the ListPicker I made sure the list is populated .", "I use a ListPicker to change the quantity .", "2 : My Listpicker is opening in FULLMODE .", "I have 2 vehicles in the Database listPicker .", "The ItemsSource of the ListPicker is set inside the Loaded event of the page .", "ListPicker Error http : i.stack.imgur.com USVo9.png", "How to set the SelectedItem of a ListPicker which has DataTemplate", "i am implementing listpicker in my project .", "I have a ListPicker that is populated dynamically with several items .", "Videos ListPicker before expanding http : i.stack.imgur.com hNQaW.png .. . .. .", "It s like a full page ListPicker filled with items .", "there will be no room left for another ListPicker to make the second selection .", "I created listpicker with windows-phone-toolkit with this code : .. . .. . Then i add the data in xaml.cs : .. . .. . What i want to do is showing MessageBox when selectionChanged in my List Picker .", "I tried adding a x : name to the panoramaitem and then calling ListPicker listPicker1 FindDecendant ListPicker myPanoramaItem but returns null .", "You cannot access the ListPicker by x : Name because it is not unambiguous : there is a ListPicker generated for each PanoramaItem in your Panorama .", "YourPage.xaml.cs .. . .. . YourPage.xaml .. . .. . If you want to bind the selected theme to the border of the ListPicker you will need to add a template for the ListPicker .", "You could use the two-way binding of the ListPicker to access the selectedIndex of the picker .", "Then when a particular element in the Listpicker is selected it will display more information on that element .", "I need to get a specific section of text from the listpicker results .", "It looks like the ListPicker is behind the two labels why is that and how to fix", "ComboBox is not available in Windows Phone 8.1 Silverlight .", "I m developing a windows-phone-8.1 silverlight app .", "I m developing windows Phone 8 application .", "If there s no need to navigate back to the FullScreen of the listpicker just override the back key press on the details page and navigate back to the page hosting the listpicker .", "Also im hoping that you are aware that ListPicker would only go to FullScreen mode only if you have more that 5 items in the ListPicker .", "I don t understand is your ListPicker in side a DataTemplate", "But the design of the listpicker has been impossible to do .", "Only the listpicker under the second condition will return the selection .", "Add a template for your ListPicker to your xaml .. . 3 .", "Select Open in Blend.. . In Blend right-click the ListPicker .", "Attach the SelectionChanged event after the ListPicker is Loaded .", "thanks but how to i set this as the style property for a ListPicker", "I tried to use the CustomMessageBox with a listpicker in PickerMode.Expanded but I m having problems .", "Sajeetharan has sorted me out and listpicker works fine now .", "I have created this method to dynamically create the content of the second ListPicker lstPicker2 .", "I have a ListPicker whose items source is an observable collection .", "And how can I clear the datasource of ListPicker without getting this exception", "You are saving selected value from ListPicker not the state of control .", "My guess is your real app is messing with the ListPicker as well .", "I have a page with generate many element like textblock listpicker etc .", "In order to do that you will have to create a copy of the ListPickerPage.xaml http : silverlight.codeplex.com SourceControl changeset view 74775 1510235 file from the Silverlight for Windows Phone Toolkit in your application change it to meet your requirements and then on your ListPicker control set the PickerPageUri proprety to the new ListPickerPage.xaml", "In case ListPicker SelectedIndex Not Shown Correctly in WP7 http : stackoverflow.com questions 5801779 listpicker-selectedindex-not-shown-correctly-in-wp7 .. . .. . I realized my problem is on OnNavigatedTo but I cannot find solution for Listpicker which created on cs not XAML first .", "There are many ways of achiveing this but this one is the most native to windows-phone .", "Create a list from the text file and then populate the ListPicker with the list", "Create a list from the text file and then populate the ListPicker with the list", "Details Page : .. . .. . .. . .. . EDIT .. . .. . I m afraid that s not possible by using the listpicker .", "You will have to write a separate page simulating the listpicker fullscreen mode for that matter .", "I am using Listpicker to allow users to select color .", "When App opens selectedItem of the ListPicker namely BackgroundColor must be from variable .", "Now how to set BackgroundColor listpicker to Black PreSelectedColor whenever the page opens", "I am dynamically populating a ListPicker using a basic List in code-behind .", "When there are more items in combobox combobox will show the listpicker flyout .", "I have a dropdown menu and a ListPicker with two values : A and B .", "How to clear the selected value in listpicker and set to default-value", "This is my XAML piece of ListPicker : .. . .. . CategoryList is an ObservableCollection Category in my ViewModel .", "Maybe I have not understood the usage of ListPicker very well .", "In this popup I use a ListPicker object to choose the proper item .", "That s the native behavior for ExpansionMode.FullScreenOnly of ListPicker but I can t use it that way .", "Is there a way to make a list of items scrollable to save the ListPicker behaviour of ExpansionAllowed style" ] }
{ "confidence": [ 65.25212860107422, 63.349853515625, 63.175872802734375, 62.40639114379883, 62.24985885620117, 60.53489685058594, 59.052574157714844, 59.00944137573242, 58.84379577636719, 58.758277893066406, 58.0972900390625, 57.998741149902344, 57.646697998046875, 57.52507019042969, 56.11394500732422, 56.049156188964844, 54.55173110961914, 54.07339859008789, 53.766632080078125, 53.18547821044922 ], "content": [ "Question : In my windows-phone-8 application I am using listpicker that have two values Dark and Light when I select Light from listpicker and restart my application listpicker value i.e Light is lost and it holds default-value i.e Dark . And below is listpicker selectionChanged method : .. . .. . What can I do Kindly suggest me . Waiting for reply . Thanks Comment : did the answer work or not .. . Answer : try this : .. . .. . XAML : .. . .. . CS : Comment : yes your answer is working fine .", "Question : Possible Duplicate : .. . ListPicker FullMode Selected Item Color http : stackoverflow.com questions 9738204 listpicker-fullmode-selected-item-color .. . .. . I ve a long list of things loading from a listpicker mostly useless . Is there the possibility to add a button on top of the full page opened when I click the listpicker so when I click on it I only show the most useful things Thanks a lot .. . Answer : In order to do that you will have to create a copy of the ListPickerPage.xaml http : silverlight.codeplex.com SourceControl changeset view 74775 1510235 file from the Silverlight for Windows Phone Toolkit in your application change it to meet your requirements and then on your ListPicker control set the PickerPageUri proprety to the new ListPickerPage.xaml Comment : After seeing your solution I have tried it . The background and everything changes BUT the items of the list picker are not shown Do you have a workaround", "Question : In my windows-phone-8 application I am using listpicker that have two values Dark and Light when I select Light from listpicker and restart my application listpicker value i.e Light is lost and it holds default-value i.e Dark . And below is listpicker selectionChanged method : .. . .. . What can I do Kindly suggest me . Waiting for reply . Thanks Comment : did the answer work or not .. . Answer : You are saving selected value from ListPicker not the state of control . Add code to your Loaded or NavigateTo events of page that contains ListPicker and if Light is present in IsolatedStorageSettings then programatically change selected index.. . If you store this kind of settings in IsolatedStorage you can just add remove key without checking value to simplify it . So when the user selects Light you add some key to storage when dark you delete it . Key presence then mean that Light is selected :", "Question : In my Windows Phone app I have a ListPicker . This ListPicker is populated from a collection . The data is loaded correctly but the text is wrongly displayed . I do not know why.. . Follow the images for understanding the error is red marked : .. . .. . XAML : .. . .. . C : .. . Answer : Within your ItemsSource Binding funcionarioVendedor try adding this too : .. . .. . Reference : WP8 ListPicker Bind http : stackoverflow.com questions 18301957 .. . .. . Binding ListPicker to Data http : help.infragistics.com Help Doc WindowsPhone 2012.2 CLR4.0 html ListPicker Binding to Data.html Comment : doesn t work . Same problem .", "Question : I am using this code for create listpicker in windows-phone . and use this grid resources .. . .. . Below code for insert item into listpicker .. . .. . My Question was how to get the selected item from this listpicker . I tried different code for get the selected item from that listpicker it s throw null value exception or invalid cast exception . Please help me to solve this problem . Thanks in advance . .. . Answer : In your code in the last line you are trying to cast the selected item to ListPicker type but it should be of type Cities : Comment : Hai anderZubi it is not working.. . I am do the simple correction in your code thank you very much... . IT is MessageBox.Show Additional Time.SelectedItem as Cities .Name.ToString Comment : Ok I modified the answer .", "Question : I m developing a windows-phone-8.1 silverlight app . I need to create an ListPicker and open it on Fullscreen mode but always get erros because dont detect ExpansionMode on listpicker element . My code XML : .. . .. . My constructor page function : .. . .. . These are the errors : .. . .. . Error 1 The property ExpansionMode was not found in type ListPicker . E : .. . event detail.xaml 123 69 FlyGolf V1 Error 2 The member ExpansionMode is not recognized or is not accessible . E : .. . event detail.xaml 123 69 FlyGolf V1 .. . Answer : You need to add-in toolkit : ListPicker .. . .. . and .. . .. . As below .. . .. . And also this as below .. . .. . After shell : SystemTray.IsVisible True Loaded PhoneApplicationPage Loaded and before Grid .. . .. . And add-in .cs file Comment : @Agostinhob07 This answer may help you . Comment : I continue with this errors : The member ExpansionMode is not recognized or is not accessible . The member FullModeItemTemplate is not recognized or is not accessible . E : Hydra iT FlyGolf Builds FlyGolf FlyGolf V1 Views event detail.xaml 142 21 FlyGolf V1 Error 3 The property ExpansionMode was not found in type ListPicker . E : Hydra iT FlyGolf Builds FlyGolf FlyGolf V1 Views event detail.xaml 138 69 FlyGolf V1 Error 4 The property FullModeItemTemplate was not found in type ListPicker . E : Hydra iT FlyGolf Builds FlyGolf FlyGolf V1 Views event detail.xaml 142 21 FlyGolf V1 Comment : @Agostinhob07 put your full updated XAML code . Comment : @Agostinhob07 which windows-phone-toolkit you have use Comment : The problem is solved and yes the problem is the version of windows-phone-toolkit", "Question : I have just installed the Windows Phone Toolkit http : phone.codeplex.com with the intention of using the ListPicker . When I try and add it to the XAML it states that it s not valid for a Silverlight project . However when I started this project I chose Windows Phone not Silverlight . Any ideas what may be going wrong ListPicker Error http : i.stack.imgur.com USVo9.png Comment : Have you added XML Namespace toolkit xmlns : toolkit ... . Comment : I hadn t and that solved it so if you add that as a solution I ll green tick it . They didn t mention that in the tutorial I was reading : Comment : I m glad I ve helped . The idea of SO is that your problem was solved . I m not eager to add one sentence answers - so as for me you could delete your question . Comment : It s nice to hear that on here .. . Answer : In your XAML .. . .. . you can do like this", "Question : I m getting this exception whenever i try to access m list picker control in my app . Code for my list picker is .. . .. . If i reduce the no . of items to 4 then it works properly but it crashes on more then 4 items . I m trying to create a list of alphabets from which user can choose . Comment : possible duplicate of Windows Phone Toolkit ListPicker Throws an Unhandled Exception http : stackoverflow.com questions 17065970 windows-phone-toolkit-listpicker-throws-an-unhandled-exception .. . Answer : It s a known issue . You must bind the items to be able to use more than 5 . Explanation on Codeplex http : silverlight.codeplex.com workitem 9412 : .. . .. . ListPicker as an ItemsControl gets its Items property set to a list of ListPickerItems in your example . ListPickerItems are UIElements and the ListPicker renders them in its presenter . When there are 5 or less items the expanded mode opens on the current page and you can see all the items in the presenter . .. . But when 6 or more items are present opening the list picker goes to full mode which opens a new page . This new page has a listbox which gets its items property set to the listpicker s items . This is where it breaks . By setting the listbox s items to the listpicker s items in this case a list of listpickeritems the listbox will put those UIElements into its view . Now a single listboxitem is included in two places on the visual tree . .. . Because of this issue ListPicker only supports databinding and templating . DO NOT set the ListPicker s items to specific UIElements . Comment : thanks . got it now . :", "Question : null .. . Answer : What I want to implement is there should be a AutocompleteBox and next to it a button . When we click on button Listpicker in FullScreen Mode will open with Multiple selection option and selected value should be shown in that AutocompleteBox . If user direct type in AutocompleteBox then same ListPicker items should populate . So I want to implement these changes for Windows Phone 8 . The Code that I have currently used only shows a LisPicker on Click event of a Button . I have not used Autocompletebox yet in my code but I want to use this that should relate with ListPicker items . So please help me to fix issue", "Question : Ok . I give up . I want to use ListPicker control in one of my Windows Phone apps . I am getting an Exception SelectedItem must always be set to a valid value . This is my XAML piece of ListPicker : .. . .. . CategoryList is an ObservableCollection Category in my ViewModel . SelectedCategory is a property in my ViewModel of type Category . This is how I am declaring both CategoryList and SelectedCategory : .. . .. . Appreciate your help Maybe I have not understood the usage of ListPicker very well . Comment : Hi there @RajeevNair could you share your answer I also have a problem just like you stackoverflow.com questions 15058162 http : stackoverflow.com questions 15058162 listbox-navigation-page-mvvm-light-in-windows-phone .. . Answer : I d expect the object returned by SelectedCategory to be one of the objects from the CategoryList collection . In your example you are instanciating it within the get so this is definitely not the case . If CategoryList contains some values then perhaps initialize selectedCategory to null and then in the get Comment : Damian thanks for your input . Your response also helped in initialzing the SelectedCategory property at the right place . Both Shawn s and yours response led to me the correct the problem . The irony is that I could not mark both your response as answer . Consider yourself marked too .", "Question : I have a ListPicker and when this is opened by default the first item is selected . In my app user select an item on ListPicker this item is sent to my database . The next time that user opens the picker automatically the selected item is the same previous . So I need no selected item . The ListPicker is populated from a collection . I tried according to other answers list.SelectedIndex -1 but doesn t work . My code : .. . .. . The Problem : Comment : see : stackoverflow.com questions 4938439 http : stackoverflow.com questions 4938439 make-no-item-selected-in-windows-phone-toolkit-list-picker .. . Answer : As others have noted the ListPicker control must always have a selected item . The way around this is to add a default first item to the list . You havent posted the code where you populate your collection but this might be a good generic solution :", "Question : In my Windows Phone app I have a ListPicker . This ListPicker is populated from a collection . The data is loaded correctly but the text is wrongly displayed . I do not know why.. . Follow the images for understanding the error is red marked : .. . .. . XAML : .. . .. . C : .. . Answer : The problem is that you re only setting the FullModeItemTemplate . The template used for the selected item is the one specified with the ItemTemplate property so you have to set it as well . Comment : Nice You save my day Thank you", "Question : After I upgraded to Wp8.1 silverlight my listpicker fails during runtime when InitializeComponent is executed . The WPtoolKit where the listpicker comes from has been updated but still in my solution is : packages WPtoolkit.4.2013.08.16 lib wp8 Microsoft.Phone.Controls.Toolkit.dll . The list picker is displayed in the xaml design view and the code is : .. . .. . I do not understand why I get an XAML parse-error is there something I need to update explicitly or change after the re-targeting of the solution Note EventToCommand using MVVMLight is not the issue this has been updated to use the parameter package . .. . Answer : ComboBox is not available in Windows Phone 8.1 Silverlight . .. . .. . I m working on WP8.1 Silverlight solution currently using the latest version of WP phonetoolkit . Have no problem using ListPicker . Here is example : .. . .. . And in ViewModel :", "Question : Well well this is my very first question in StackOverflow I ve been using this site since ages but I never had to ask something because I always found the answer in someone else s question lol Apparently this is not the case anymore lol . Anyway I m trying to bind a list of a custom class that is decorated to be used with the DataContext that manages a local SQL Server CE 3.5 database - natively included in Windows Phone 7.5 to a ListPicker control from the WPToolkit and strangely I can t see the value of the element I bound in the ListPicker I made sure the list is populated . Here s the class : .. . .. . Here s the DataContext : .. . .. . Here s the code I use to bind the list to the ListPicker : .. . .. . Here s the XAML : .. . .. . The list of Rubrique rubs gets populated and is set as ItemsSource to RubListPicker and if I remove the Text Binding Nom of the TextBlock in the DataTemplate I can see the name of the class MyNamespace.Rubrique in every element in the ListPicker . I can t figure out what is the problem with the data binding.. . Any help would be greatly appreciated : .. . .. . I m using the last version of WPToolkit 4.2012.10.30 from NuGet in Visual Studio 2012 Ultimate with the Windows Phone 8 SDK . Thanks for taking the time to read this Regards .. . .. . Ali .. . .. . .. . .. . EDIT .. . .. . I found the solution and it made me laugh hard lol . I had to change de security level of my class Rubrique When I did set it to public everything worked fine . Actually the ListPicker had access to the List Rubrique but could not access the value of each Rubrique . A good one to remember for the future : Always check the security level of your classes attributes methods when using external libraries . .. . Answer : This is my first question ever in StackOverflow and I get to answer it myself : Like A Boss : D .. . .. . So the trick was to make my class public so it can be accessed by the ListPicker control from WPToolkit .. . .. . Cheers", "Question : I have a ListPicker and when this is opened by default the first item is selected . In my app user select an item on ListPicker this item is sent to my database . The next time that user opens the picker automatically the selected item is the same previous . So I need no selected item . The ListPicker is populated from a collection . I tried according to other answers list.SelectedIndex -1 but doesn t work . My code : .. . .. . The Problem : Comment : see : stackoverflow.com questions 4938439 http : stackoverflow.com questions 4938439 make-no-item-selected-in-windows-phone-toolkit-list-picker .. . Answer : Try to set first item like Select one of.. . - and add condition when this is selected for not to write into database . Comment : how add an item in existing collection Comment : idk try to find this in Google", "Question : I used a TOOLKIT ListPicker . But the items are not being shown in FullScreen Mode . Its a Blank Page on clicking ListPicker but the items are present transparent and can even be selected . it seems blank page but items are there . .. . Answer : By default when you display items in the FullScreen mode your items are displayed with smaller font-size . So what you have to do is to change the DataTampleate of the FullScreen mode ItemTempate to following. . I have only increased the FontSize here. . You can do any styling you like . Its up to you to style the Template appropriately . Also im hoping that you are aware that ListPicker would only go to FullScreen mode only if you have more that 5 items in the ListPicker . If not you need to manually set ExpansionMode FullScreenOnly to get it full screen . Comment : Now it is Fine . But What about Font . I tried using : FontFamily Sunder Gutka component Assets Fonts AGENCYR.TTF Agency FB But the list is not getting displayed in this font Comment : Font is not coming Comment : try this stackoverflow.com questions 20074034 http : stackoverflow.com questions 20074034 custom-font-in-windows-phone-8", "Question : I am writing Windows Phone 8.1 app I have binded listpicker with data those data come from web service result now my problem is that there are plenty and too much records and therefore my app gets crash . How do I show just 1 to 50 records See my code below : .. . Answer : Use Take Comment : typo take should be Take . . Comment : sajeetharan thanks man Comment : @YuliamChandra thank you brother .", "Question : In the ListPicker in my Windows Phone Application there is a List of items which a user can select one or more items and view those selected items . Until this point everything goes fine after this point I want to save the selected items on the same page . Now what happens when I close the application and starts it again there is no selected items saved . So my question is how can I save the changes made by the user I don t want to save them in a separate file in the isolated storage actually . Thanks in advance . Here is the XAML code : .. . .. . Here is the CS code : .. . Answer : There are many ways of achiveing this but this one is the most native to windows-phone . http : msdn.microsoft.com en-us library windows apps ff967548 28v vs.105 29.aspx http : msdn.microsoft.com en-us library windows apps ff967547 28v vs.105 29.aspx", "Question : I m trying to do a two-way binding of the SelectedIndex attribute of a ListPicker in a Windows Phone 7 UserControl . It raises the following exception when I set the DataContext : SelectedIndex must always be set to a valid value . .. . .. . This is the XAML code .. . .. . And the code-behind in DataContext .. . .. . Putting a breakpoint in PickerSelectedIndex.get I can see that it is returned correctly 0 . I am sure that the problem is SelectedIndex Binding PickerSelectedIndex Mode TwoWay because deleting this line solves the problem and I can see the ListPicker correctly loaded with the data from MyList . I can t see where is the problem.. . Comment : what happens if you keep your SelectedIndex binding but get rid of the ItemTemplate I don t program WP7 but in WPF this code minus the ItemTemplate works fine . Comment : Removing ItemTemplate StaticResource PickerTemplate doesn t solve the problem.. . Thanks anyway .. . Answer : Matt Lacey is right binding happens before the data items get populated hence the error . If you have an event handler for SelectionChanged you will notice that a breakpoint in it will be hit as the page listpicker loads . Here is one way to get around this initialization issue : Comment : I know but I was trying to use only XAML . Look at my answer.. .", "Question : Ok . I give up . I want to use ListPicker control in one of my Windows Phone apps . I am getting an Exception SelectedItem must always be set to a valid value . This is my XAML piece of ListPicker : .. . .. . CategoryList is an ObservableCollection Category in my ViewModel . SelectedCategory is a property in my ViewModel of type Category . This is how I am declaring both CategoryList and SelectedCategory : .. . .. . Appreciate your help Maybe I have not understood the usage of ListPicker very well . Comment : Hi there @RajeevNair could you share your answer I also have a problem just like you stackoverflow.com questions 15058162 http : stackoverflow.com questions 15058162 listbox-navigation-page-mvvm-light-in-windows-phone .. . Answer : Take a look at my answer to this question : Silverlight ComboBox binding with value converter http : stackoverflow.com questions 9637583 silverlight-combobox-binding-with-value-converter 9638478 9638478 .. . .. . The short answer is that the selected item must be an item that is contained within the collection . Your getter is setting the selected item to a new object . This new object is not contained within the collection Comment : that was a typo . I removed the line from the getter . Still the same error . I will look into your link you posted . Comment : I use ListPickers in my own apps with the same code . I tried adding the same xaml as you have w o the FullModeItemTemplate as I don t know what it is . The only time you get the error is if your selected item is not an item that is contained within the collection . You are allowed to have the selected item be null but it cannot be an item that is not in the collection Comment : Thanks a lot for your guidance . I was not assigning the SelectedCategory properly when loading the screen . And that was causing lot of headaches . Your response gave me a perspective and lead me the right way to find the bug Thanks much . Now let me go and bang my head against the wall :" ] }
[ "yes-answer-long", "yes-answer-short" ]
silverlight-toolkit
UNK_RELATION
python-ldap@api@56
python-ldap -- python-ldap provides an object-oriented @placeholder to access ldap directory servers from python programs .
{ "confidence": [ 65.97010040283203, 65.45597839355469, 63.531158447265625, 62.49248123168945, 62.49248123168945, 61.149234771728516, 60.22377014160156, 60.09253692626953, 59.69349670410156, 59.553611755371094, 58.46988296508789, 58.46988296508789, 58.30910110473633, 57.42156219482422, 57.37826919555664, 56.75029754638672, 56.04582214355469, 55.9642448425293, 55.72893142700195, 54.6665153503418, 54.6665153503418, 53.02104568481445, 53.02104568481445, 53.02104568481445, 53.02104568481445, 53.02104568481445, 53.02104568481445, 53.02104568481445, 52.65764236450195, 51.9294319152832, 51.906375885009766, 51.84223937988281, 51.7469596862793, 51.2025260925293, 50.62110137939453, 50.62110137939453, 50.62110137939453, 50.62110137939453, 50.62110137939453, 50.62110137939453, 50.62110137939453, 50.62110137939453, 50.487125396728516, 50.407928466796875, 50.241336822509766, 50.1388053894043, 49.86337661743164, 49.506431579589844, 49.45448684692383, 49.410736083984375, 49.04719161987305, 48.24277877807617, 48.11299133300781, 48.11299133300781, 48.11299133300781, 48.11299133300781, 48.00798416137695, 47.99006652832031, 47.82459259033203, 47.738861083984375, 47.519893646240234, 47.32695770263672, 46.73513412475586, 46.1646614074707, 45.681488037109375, 45.681488037109375, 45.681488037109375, 45.681488037109375, 45.681488037109375, 45.681488037109375, 45.64352035522461, 45.01822280883789, 44.747318267822266, 44.33518981933594, 44.33518981933594, 44.33518981933594, 44.05582809448242, 43.84733581542969, 43.83145523071289, 43.30785369873047, 43.28154373168945, 43.28154373168945, 43.28154373168945, 43.28154373168945, 43.28154373168945, 43.28154373168945, 43.28154373168945, 43.28154373168945, 43.2313117980957, 43.136871337890625, 43.05427169799805, 43.05427169799805, 42.52312469482422, 42.48119354248047, 42.48119354248047, 42.288673400878906, 42.218116760253906, 41.97309875488281, 41.9626579284668, 41.9626579284668 ], "content": [ "I am using Python-LDAP module to interact with my LDAP server .", "I have successfully used the python-ldap library to communicate with LDAP servers and Windows Active Directory .", "I installed python-ldap I can do import ldap .. . .. . with https : pypi.python.org pypi python-ldap .. . .. . 3 .", "Here s an example generator for python-ldap .", "I need to integrate Python with LDAP .", "I m trying to bind to a LDAP server using the ldap library in Python .", "The source code is available at the official Python-LDAP website : http : python-ldap.sourceforge.net .", "This a LDAP GNU TLS problem and not python .", "How can I remove an objectClass from an entry using python-ldap", "How do I convert binary ldap attributes returned by python-ldap to a nice hex representation and back again for use in an ldap filter", "python-ldap is built on top of native OpenLDAP libraries .", "It seems like Heroku does not support python-ldap .", "http : sourceforge.net p python-ldap bugs 65 is the ticket to add usr local to the defaults on python-ldap .", "Based on answers to the question Python : can t install python-ldap http : stackoverflow.com questions 4768446 python-cant-install-python-ldap I see that the requirements for installing the python-ldap package with pip are : .. . .. . libsasl2-dev .. . python-dev .. . libldap2-dev .. . libssl-dev .. . .. . I m building a custom Docker image that needs the python-ldap package and I m wondering if I can remove these build-necessities after installing building things to keep my image small .", "I m trying to add entries with python-ldap .", "In short are these prerequisites required for python-ldap to run or are they merely build requirements", "Similar to this question http : stackoverflow.com questions 140439 authenticating-against-active-directory-using-python-ldap I am trying to perform simple-authentication to a 2003 Active Directory using python-ldap CentOS 6.2 x86-64 Python 2.6.6 python-ldap 2.3.10 .", "Same here python-ldap 2.3.13 worked directly from source .", "Using ldp.exe we can do things like this : .. . .. . Is there an equivalent in Python-LDAP", "Where can I get source code for python-ldap module .", "The user is created with python-ldap module in AD and is in Disabled state and with no password .", "I am using python-ldap in order to retrieve data about users .", "I am trying to use python-ldap with AWS Lambda .", "What is the recommended solution to support ldap authentications in Heroku s Python Django stack", "I recelntly created heroku buildpack that supports python-ldap .", "Scenario : In my python script I am able to search the LDAP server .", "You need to apt-get install python-ldap before this works .", "I just need to choose the best way to make Python talk to LDAP .", "Michael Str der the author of the python-ldap library enlightened me thus : .. . .. . The 97 is not the LDAP result code .", "Basically trying to reset the user s password using LDAP python .", "Found the solution from this page : https : www.howtoinstall.co en ubuntu precise universe python-django-auth-ldap .. . .. . The following command seems to have done the trick : .. . .. . apt-get install python-django-auth-ldap", "I want to remove one objectClass from a given entry using python-ldap .", "Here s my code : .. . .. . As noted in the comments I have copied most of this from http : stackoverflow.com a 7810308 149076 and from http : python-ldap.cvs.sourceforge.net viewvc python-ldap python-ldap Demo initialize.py revision 1.14 view markup http : python-ldap.cvs.sourceforge.net viewvc python-ldap python-ldap Demo initialize.py revision 1.14 view markup .. . though I have tried many variations and sequences of this .", "The package pointed to by Mr . janglin is very effective A good series of articles by Matt Butcher link-to first one http : www.packtpub.com article installing-and-configuring-the-python-ldap-library-and-binding-to-an-ldap-directory .. . .. . python-ldap site is http : www.python-ldap.org It has links to code documentation and examples .", "I can t install python-ldap using virtualenv and pip .", "Do you mean you had to download the python-ldap tarball and modify", "I am installing python-ldap on a RHEL 6.5 Server .", "I might be the bearer of bad news.. . Python-LDAP can use OpenSSL .", "According to their web page Python-LDAP wraps OpenLDAP and not OpenSSL directly .", "Examples include : How do I install python-ldap in a virtualenv on Ubuntu", "In there you will be able to find .EXE install packages for python-ldap and LOTS of others", "I ve installed pip and the latest 64-bit wheel for python-ldap .", "see also .. . .. . LDAP : Mastering Search Filters http : www.ldapguru.info ldap mastering-ldap-search-filters.html .. . LDAP : Search best practices http : www.ldapguru.info ldap ldap-search-best-practices.html .. . LDAP : Programming practices http : www.ldapguru.info ldap ldap-programming-practices.html", "Yes I can add new record to LDAP in such way http : www.grotan.com ldap python-ldap-samples.html add but I am not sure about such text ldif-file .", "Is there a better way to get the packages I need to compile python-ldap with the official python image", "To change this behavior the very last TLS-related set option call you make should be : .. . .. . This is actually done in one of the python-ldap demos https : github.com rbarrois python-ldap blob master Demo initialize.py .", "Reference Links : Python+LDAP+SSL http : stackoverflow.com questions 7716562 pythonldapssl .. . .. . python-ldap and Microsoft Active Directory : connect and delete user http : stackoverflow.com questions 13636117 python-ldap-and-microsoft-active-directory-connect-and-delete-user .. . .. . how to set lockoutTime and password of a user of Active Directory http : stackoverflow.com questions 16051839 how-to-set-lockouttime-and-password-of-a-user-of-active-directory .. . .. . How can I change password for domain user windows Active Directory using Python", "When I run command : .. . .. . pip install python-ldap : .. . .. . I tried downloading latest version from here : https : pypi.python.org pypi python-ldap downloads but it seems thats the same version as it gives same error .", "Update 3 : In a similar question Installing python-ldap in a virualenv on Windows http : stackoverflow.com questions 15070063 installing-python-ldap-in-a-virualenv-on-windows I found a really interesting link : http : www.lfd.uci.edu gohlke pythonlibs python-ldap .", "Thanks but can you show me how to use uuid module to create a python-ldap search filter that works", "Another example at already answered question : Use Python script to manage remote LDAP server http : stackoverflow.com questions 29398242 use-python-script-to-manage-remote-ldap-server", "But now I don t know how to pass this connection object back to Python so that I can query the LDAP server .", "I downloaded the tarball from : https : pypi.python.org pypi python-ldap .. . .. . and code to use lambda lambda function.py .. . .. . and uploaded the zip to Lambda .", "I have decided to go with python-ldap 2.3.13 -- it seems work when built from source .", "There s also http : www.python-ldap.org should you need to work more with LDAP from Python in the future .", "You can download it from pypi here http : pypi.python.org pypi python-ldap 2.3.10", "For more details you can look here https : www.packtpub.com books content python-ldap-applications-part-2-ldap-opearations and here http : www.python-ldap.org doc html ldap-dn.html .", "I m trying to find the best way to get a list of all LDAP user accounts that belong to groups which are members of a groupOfNames using python-ldap .", "How does uWSGI influence the LDAPS communication between python-ldap or the underlying libraries and the Active Directory", "This solved the problem : .. . .. . Found it here : How do I install python-ldap in a virtualenv on Ubuntu http : stackoverflow.com questions 18134826 how-do-i-install-python-ldap-in-a-virtualenv-on-ubuntu .", "Code based on http : www.grotan.com ldap python-ldap-samples.html stackoverflow questions and python-ldap documentation Binding code that I believe works : .. . .. . which prints : 97 1 .. . .. . Query for users script : tried without bind as suggested by article but received In order to perform this operation a successful bind must be completed on the connection .", "I want to integrate with my python code to use ldap module but donot want to install separtely or import .. . .. . -shijo", "I ve tried doing a wget for https : pypi.python.org pypi python-ldap .. . .. . And I extracted the files and simply used python setup.py install to the tar ball but to no avail .", "http : stackoverflow.com questions 20875708 how-can-i-change-password-for-domain-userwindows-active-directory-using-python .. . .. . https : groups.google.com forum topic macromedia.coldfusion.security Rq7xx15OeBs .. . .. . http : www.grotan.com ldap python-ldap-samples.html add .. . .. . http : marcitland.blogspot.in 2011 02 python-active-directory-linux.html .. . .. . https : snipt.net Fotinakis change-active-directory-password-via-ldap-modify-call", "I was playing with python-ldap in console and got results which I can t explain .", "Is it possible to import LDIF like that .. . .. . using python-ldap library http : www.python-ldap.org", "I can t seem to get python-ldap libraries to work properly with Django : .. . .. . I m running Ubuntu v14 .", "It s availabale on my github repo https : github.com damgad heroku-buildpack-python-ldap .", "The solution is to build the OpenLDAP libs to match the system headers and link python-ldap with those .", "pip install python-ldap 2.3.13 did the trick for me Mac OS X 10.6", "I switched back to Python 2.7.10 for the interpreter and now the very same modify commands up above work as expected using the python-ldap library .", "which LDAP is this", "This article http : www.perrygeo.com running-python-with-compiled-code-on-aws-lambda.html - even though unrelated to the python-ldap module - describes how to bundle Python packages that have native dependencies .", "I am using Windows as my main python-2.7 development-environment and I want to install python-ldap on a virtual environment .", "I found the distributed binaries here : https : pypi.python.org pypi python-ldap .. . .. . Unfortunately they give only .msi packages for python-2.7", "I have tested python-ldap 2.2.0 and python 2.4.4 on an old CentOS 5.5 box I had lying around and it fails in exactly the same way .", "I am able to bind and query Active Directory via python-ldap without any issues except when it comes to adding or modifying attributes on AD .", "I have thoroughly searched the internet and found a few solutions but : .. . on other operating systems : How do you move a user to a different OU using Python http : stackoverflow.com questions 4678748 how-do-you-move-a-user-to-a-different-ou-using-python .. . and other programming-languages : Active Directory LDAP move user to different OU - Ruby http : stackoverflow.com questions 18129004 active-directory-ldap-move-user-to-different-ou-ruby .. . Is this possible in python-ldap on Linux or are there any work-arounds", "It depends on your LDAP implementation .", "I am attempting to securely connect to an openLDAP server from the Turnkey Linux folks using the python-ldap package on Oracle Linux 7 .", "I ve also filed a bug https : sourceforge.net p python-ldap bugs 64 for the issue with ReconnectLDAPObject not being picklable .", "We ve installed the python-ldap 2.4.19 module without errors and perform most of the operations successfully .", "I am trying to retrieve all the users in the Domain Users group using python-ldap but it just returns an empty list .", "Currently I am using the following python-ldap method which gives me only the current child domain s partitions .", "I m using Python 3.4 and for that I m trying to configure LDAP authentication using ldap3 https : ldap3.readthedocs.org index.html .", "When I run pip install python-ldap I receive the following error .", "The python-ldap package needs compiling : and of course I can t compile it in my environment .", "Try to extract the msi : msiexec.exe a python-ldap-2.4.10.win32-py2.7.msi qn TARGETDIR C : Absolute Path .", "A couple days ago I posted some code for accessing LDAP using win32com and ADO in this thread : .. . .. . http : stackoverflow.com questions 1982442 does-python-3-have-ldap-module 1986019 1986019 .. . .. . It s for Python 3 but can be used in 2 if you redo the print functions to be statements .", "There is a problem with sharing the LDAP object between both processes .", "desc : Can t contact LDAP server .", "LDAP filters do not use wildcards .", "to configure the ldap setup .", "However it seems that the Python LDAP code ignores this even if I set it to dev-null or an entirely bogus path my code still runs still binds to the LDAP server and still completes my search request .", "All the answers have so far only solved the problem by installing the ldap and other development packages globally which doesn t solve the problem of not being able to install the python-ldap package in the virtual environment .", "I followed the instructions here : https : pythonhosted.org Kallithea setup.html .. . .. . In the Setting up LDAP support section it says : LDAP settings are located in admin- ldap section .. . .. . I couldn t find the admin- ldap file", "In any case as I said in my Update 3 you should just download the python-ldap 2.4.15.win amd64 py2.7.exe from lfd.uci.edu gohlke pythonlibs http : www.lfd.uci.edu gohlke pythonlibs and then just do an easy install python-ldap 2.4.15.win amd64 py2.7.exe to install it .", "Net : : LDAP returns the return code from the LDAP server and the AD server is returning 0x00 Successful request AFAICT .", "Currently I am using LDAP .", "One uppercase with no association with LDAP groups and such ." ] }
{ "confidence": [ 74.97506713867188, 70.44847106933594, 70.20601654052734, 69.0675277709961, 68.189208984375, 68.01226806640625, 67.6534652709961, 67.51261901855469, 67.23880004882812, 67.14574432373047, 66.37422180175781, 65.89839172363281, 64.9652328491211, 63.98493957519531, 62.950035095214844, 62.875648498535156, 62.791831970214844, 62.4013786315918, 62.20341491699219, 62.08148956298828 ], "content": [ "Question : I need to integrate Python with LDAP . I just need to choose the best way to make Python talk to LDAP . I understand there are many ways to do this including using a prebuilt toolkit such as the AuthKit or writing a thing ourselves with LDAP modules and functions . What do you recommend Comment : I d question the decision to close this question on two grounds : Comment : 1 . I find the answers constructive giving real-world examples . 2 Personally I find any detailed discussion of using python directly without calling C++ for integrating enterprise systems very interesting . .. . Answer : I have successfully used the python-ldap library to communicate with LDAP servers and Windows Active Directory . You can download it from pypi here http : pypi.python.org pypi python-ldap 2.3.10", "Question : Similar to this question http : stackoverflow.com questions 140439 authenticating-against-active-directory-using-python-ldap I am trying to perform simple-authentication to a 2003 Active Directory using python-ldap CentOS 6.2 x86-64 Python 2.6.6 python-ldap 2.3.10 . Despite following all the usual steps in the init including .. . .. . if I pass the correct credentials I always get a 97 returned : .. . .. . Error code 97 is not a success it s the LDAP REFERRAL LIMIT EXCEEDED error being returned from AD . Nor can I use it as a de facto success indicator because : .. . .. . Even more frustrating is that this script is a migration from an old Perl script using Net : : LDAP which does return 0 for a successful authenticated bind to the same AD and server . All the information I can find on python-ldap indicates that what I am doing should Just Work I would be inclined to think there s something wrong with the AD servers but the Perl script does return the correct LDAP code on a successful bind . I have tested python-ldap 2.2.0 and python 2.4.4 on an old CentOS 5.5 box I had lying around and it fails in exactly the same way . Does anyone know what I am missing EDIT : Per request here is the Perl script that works . Net : : LDAP returns the return code from the LDAP server and the AD server is returning 0x00 Successful request AFAICT . Comment : Can you post the relevant Perl code Comment : I assume that for server.domain.com you meant ad.server.domain.com to match the python Also the default port is 389 but it might be good to add : 389 to the URL explicitly . .. . Answer : Michael Str der the author of the python-ldap library enlightened me thus : .. . .. . The 97 is not the LDAP result code . It s the result type ldap.RES BIND . Normally you don t have to look at the results returned by LDAPObject.simple bind s unless you want to extract the bind response controls . .. . If the LDAP result code is not 0 the accompanying exception is raised like ldap.INVALID CREDENTIALS in your example . .. . So your code should look like this : .. . .. . The reason for these results : .. . .. . is that out of the box 2003 Active Directory allows anonymous binds http : www.petri.co.il anonymous ldap operations in windows 2003 ad.htm . So not providing a user id at all will still pass a simple bind check if the only thing being tested is whether simple bind s throws an error . 2003 Active Directory does require authentication for any searches that aren t attributes of the rootDSE so for our internal purposes we added a trivial search to the try : block :", "Question : Similar to this question http : stackoverflow.com questions 140439 authenticating-against-active-directory-using-python-ldap I am trying to perform simple-authentication to a 2003 Active Directory using python-ldap CentOS 6.2 x86-64 Python 2.6.6 python-ldap 2.3.10 . Despite following all the usual steps in the init including .. . .. . if I pass the correct credentials I always get a 97 returned : .. . .. . Error code 97 is not a success it s the LDAP REFERRAL LIMIT EXCEEDED error being returned from AD . Nor can I use it as a de facto success indicator because : .. . .. . Even more frustrating is that this script is a migration from an old Perl script using Net : : LDAP which does return 0 for a successful authenticated bind to the same AD and server . All the information I can find on python-ldap indicates that what I am doing should Just Work I would be inclined to think there s something wrong with the AD servers but the Perl script does return the correct LDAP code on a successful bind . I have tested python-ldap 2.2.0 and python 2.4.4 on an old CentOS 5.5 box I had lying around and it fails in exactly the same way . Does anyone know what I am missing EDIT : Per request here is the Perl script that works . Net : : LDAP returns the return code from the LDAP server and the AD server is returning 0x00 Successful request AFAICT . Comment : Can you post the relevant Perl code Comment : I assume that for server.domain.com you meant ad.server.domain.com to match the python Also the default port is 389 but it might be good to add : 389 to the URL explicitly . .. . Answer : This error means that your conn.set option ldap.OPT REFERRALS 0 isn t being affected . Therefore try this : Comment : No joy I m afraid . Still returns 97 . I did verify with conn.get option that these options were getting set properly for the conn SimpleLDAPObject instance . Comment : I may be wrong but I think in the Perl script it is using user@europe.domain.com", "Question : I need to integrate Python with LDAP . I just need to choose the best way to make Python talk to LDAP . I understand there are many ways to do this including using a prebuilt toolkit such as the AuthKit or writing a thing ourselves with LDAP modules and functions . What do you recommend Comment : I d question the decision to close this question on two grounds : Comment : 1 . I find the answers constructive giving real-world examples . 2 Personally I find any detailed discussion of using python directly without calling C++ for integrating enterprise systems very interesting . .. . Answer : The package pointed to by Mr . janglin is very effective A good series of articles by Matt Butcher link-to first one http : www.packtpub.com article installing-and-configuring-the-python-ldap-library-and-binding-to-an-ldap-directory .. . .. . python-ldap site is http : www.python-ldap.org It has links to code documentation and examples . Cheerio .. . .. . Aalok", "Question : null .. . Answer : Basically trying to reset the user s password using LDAP python . I ve gone through various posts here but no luck : . Tried using : .. . .. . a modify s - returns No such object every time . Tried with different user DN . info : 0000208D : NameErr : DSID-0310020A problem 2001 NO OBJECT data 0 best match of : n t DC mydomain DC com n matched : DC mydomain DC com desc : No such object .. . .. . Here is the code Snippet : .. . .. . def changePassword userEmail oldPassword newPassword : .. . try : .. . ldap.set option ldap.OPT X TLS REQUIRE CERT ldap.OPT X TLS NEVER .. . .. . ldap-client ldap.initialize ldap : 127.0.01.1 : 389 .. . ldap client.set option ldap.OPT REFERRALS 0 .. . ldap client.set option ldap.OPT PROTOCOL VERSION 3 .. . ldap client.set option ldap.OPT X TLS ldap.OPT X TLS DEMAND .. . ldap client.set option ldap.OPT X TLS DEMAND True .. . ldap client.set option ldap.OPT DEBUG LEVEL 255 .. . ldap client.simple bind s ADMIN EMAIL ADMIN PASSWORD .. . .. . Set AD password .. . unicode pass unicode + newPassword + iso-8859-1 .. . unicode pass newPassword .. . password value unicode pass.encode utf-16-le .. . add pass ldap.MOD REPLACE unicodePwd password value ldap.MOD REPLACE unicodePwd password value .. . .. . Replace password .. . try : .. . user dn CN s DC mydomain DC com username .. . ldap client.modify s user dn add pass .. . print Active Directory password for username .. . was set successfully except ldap.LDAPError e : .. . sys.stderr.write Error setting AD password for : + username + n .. . sys.stderr.write Message : + str e + n .. . ldap client.unbind s .. . return SOME PROBLEM .. . ldap client.unbind s .. . return AUTHENTICATED .. . except ldap.INVALID CREDENTIALS : .. . ldap client.unbind .. . return INVALID CREDENTIALS .. . except ldap.SERVER DOWN : .. . return SERVER UNAVAILABLE .. . .. . .. . b passwd userEmail oldPassword newPassword . It gets executed well but password is not updated . Need help in identifying the problem . Reference Links : Python+LDAP+SSL http : stackoverflow.com questions 7716562 pythonldapssl .. . .. . python-ldap and Microsoft Active Directory : connect and delete user http : stackoverflow.com questions 13636117 python-ldap-and-microsoft-active-directory-connect-and-delete-user .. . .. . how to set lockoutTime and password of a user of Active Directory http : stackoverflow.com questions 16051839 how-to-set-lockouttime-and-password-of-a-user-of-active-directory .. . .. . How can I change password for domain user windows Active Directory using Python http : stackoverflow.com questions 20875708 how-can-i-change-password-for-domain-userwindows-active-directory-using-python .. . .. . https : groups.google.com forum topic macromedia.coldfusion.security Rq7xx15OeBs .. . .. . http : www.grotan.com ldap python-ldap-samples.html add .. . .. . http : marcitland.blogspot.in 2011 02 python-active-directory-linux.html .. . .. . https : snipt.net Fotinakis change-active-directory-password-via-ldap-modify-call", "Question : How do I convert binary ldap attributes returned by python-ldap to a nice hex representation and back again for use in an ldap filter .. . Answer : For the task of converting to and from hex string you should consider the builtin uuid module https : docs.python.org 2 library uuid.html . Comment : Thanks but can you show me how to use uuid module to create a python-ldap search filter that works", "Question : I am using Python-LDAP module to interact with my LDAP server . How can I remove an objectClass from an entry using python-ldap When I generated a modlist with modlist.modifyModlist objectClass : inetLocalMailRecipient objectClass : it just generates 1 objectClass None which obviously doesn t seem correct . What am I doing wrong here I want to remove one objectClass from a given entry using python-ldap . Comment : Generally you can t change object classes on existing objects because that would invalidate any schema checks the server did when creating the object . You ll have to delete the object and create a new one . This is a property of the server and doesn t have much to do with the client library . Comment : @Guntram Blohm Great answer and I figured out the same by experimenting . Can you post it as an answer so that I can go ahead and mark it as the answer to the problem .. . Answer : As stated by Guntram Blohm it is not possible to delete object classes on existing objects because doing that would invalidate the schema checks that the server did when creating the object . So the way to do it will be to delete the object and create a new one . This is a property of the server and the client libraries cannot do anything about it .", "Question : Based on answers to the question Python : can t install python-ldap http : stackoverflow.com questions 4768446 python-cant-install-python-ldap I see that the requirements for installing the python-ldap package with pip are : .. . .. . libsasl2-dev .. . python-dev .. . libldap2-dev .. . libssl-dev .. . .. . I m building a custom Docker image that needs the python-ldap package and I m wondering if I can remove these build-necessities after installing building things to keep my image small . In short are these prerequisites required for python-ldap to run or are they merely build requirements .. . .. . If it s the latter I d like to clean up to minimize my footprint . I simply don t know enough about how the Linux development packages are used to know if they contain files used at run-time . .. . Answer : The -dev dependencies is generally only needed for compilation . After compiling python-lap these dependencies should not be needed anymore . Try removing theses dependencies and test the container .", "Question : I am trying to use python-ldap with AWS Lambda . I downloaded the tarball from : https : pypi.python.org pypi python-ldap .. . .. . and code to use lambda lambda function.py .. . .. . and uploaded the zip to Lambda . where my directory structure is .. . .. . Am I missing out something .. . Answer : python-ldap is built on top of native OpenLDAP libraries . This article http : www.perrygeo.com running-python-with-compiled-code-on-aws-lambda.html - even though unrelated to the python-ldap module - describes how to bundle Python packages that have native dependencies . The outline of this is the following : .. . .. . Create an Amazon EC2 instance with Amazon Linux .. . Install compiler packages as well as the OpenLDAP developer package . yum install -y gcc openldap-devel .. . Create a virtual environment : virtualenv env .. . Activate the virtual environment : env bin activate .. . Upgrade pip I am not sure this is necessary but I got a warning without this : pip install --upgrade pip .. . Install python-ldap : pip install python-ldap .. . Create a handler Python script for example lambda.py with the following code : .. . .. . .. . import os .. . import subprocess .. . .. . libdir os.path.join os.getcwd local lib .. . .. . def handler event context : .. . command LD LIBRARY PATH python ldap.py .format libdir .. . subprocess.call command shell True .. . .. . Implement your LDAP function in this example ldap.py : .. . .. . .. . import ldap .. . .. . print ldap.PORT .. . .. . Create a zip package let s say ldap.zip : .. . .. . .. . zip -9 ldap.zip ldap.py .. . zip -9 ldap.zip lambda.py .. . cd env lib python2.7 site-packages .. . zip -r9 ldap.zip .. . cd . . . . . . lib64 python2.7 site-packages .. . zip -r9 ldap.zip .. . .. . Download the zip to your system or put it into an S3 bucket . Now you can create your Lambda function using lambda.handler as the function name and use the zip file as the code . I hope this helps . Comment : I followed everything step by step and strangely I am getting : Unable to import module lambda : No module named lambda . Am I missing something", "Question : It seems like Heroku does not support python-ldap . The pip install with python-ldap 2.3.13 in the requirements.txt file failed with following error in Heroku : .. . .. . gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE LIBLDAP R -DHAVE SASL -DHAVE TLS -DLDAPMODULE VERSION 2.3.13 -IModules -I usr local openldap-2.3 include -I usr include sasl -I usr local include python2.7 -c Modules LDAPObject.c -o build temp.linux-x86 64-2.7 Modules LDAPObject.o .. . .. . Modules LDAPObject.c : 18 : 18 : error : sasl.h : No such file or directory .. . .. . It seems like Heroku does not have the libraries required for python-ldap and I don t know if there is a way to install dependency libraries except pip . What is the recommended solution to support ldap authentications in Heroku s Python Django stack Your help is greatly appreciated . .. . Answer : I recelntly created heroku buildpack that supports python-ldap . It s availabale on my github repo https : github.com damgad heroku-buildpack-python-ldap . To make it work you only need to specify environment variable like that :", "Question : Where can I get source code for python-ldap module . I want to integrate with my python code to use ldap module but donot want to install separtely or import .. . .. . -shijo .. . Answer : The source code is available at the official Python-LDAP website : http : python-ldap.sourceforge.net . It can be checked out from CVS .", "Question : I can t seem to get python-ldap libraries to work properly with Django : .. . .. . I m running Ubuntu v14 . This is what a pip freeze looks like on my working environment : .. . .. . I installed ldap for python3 as well to do a sanity check .. . .. . But as I go through all the guides here they all seem to point to the same libraries I already have except for pip install python-ldap . When I try to do : pip install python-ldap .. . .. . I just get the following result : .. . .. . Does anyone know what are the best steps I should take to get around this issue to get the library working I ve tried doing a wget for https : pypi.python.org pypi python-ldap .. . .. . And I extracted the files and simply used python setup.py install to the tar ball but to no avail . Any suggestions .. . Answer : Found the solution from this page : https : www.howtoinstall.co en ubuntu precise universe python-django-auth-ldap .. . .. . The following command seems to have done the trick : .. . .. . apt-get install python-django-auth-ldap", "Question : I need to integrate Python with LDAP . I just need to choose the best way to make Python talk to LDAP . I understand there are many ways to do this including using a prebuilt toolkit such as the AuthKit or writing a thing ourselves with LDAP modules and functions . What do you recommend Comment : I d question the decision to close this question on two grounds : Comment : 1 . I find the answers constructive giving real-world examples . 2 Personally I find any detailed discussion of using python directly without calling C++ for integrating enterprise systems very interesting . .. . Answer : A couple days ago I posted some code for accessing LDAP using win32com and ADO in this thread : .. . .. . http : stackoverflow.com questions 1982442 does-python-3-have-ldap-module 1986019 1986019 .. . .. . It s for Python 3 but can be used in 2 if you redo the print functions to be statements . Also as mentioned in the comments on that thread check PyPI for a list of other LDAP modules : .. . .. . http : pypi.python.org pypi 3Aaction search term ldap submit search http : pypi.python.org pypi 3Aaction search term ldap submit search", "Question : It seems like Heroku does not support python-ldap . The pip install with python-ldap 2.3.13 in the requirements.txt file failed with following error in Heroku : .. . .. . gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE LIBLDAP R -DHAVE SASL -DHAVE TLS -DLDAPMODULE VERSION 2.3.13 -IModules -I usr local openldap-2.3 include -I usr include sasl -I usr local include python2.7 -c Modules LDAPObject.c -o build temp.linux-x86 64-2.7 Modules LDAPObject.o .. . .. . Modules LDAPObject.c : 18 : 18 : error : sasl.h : No such file or directory .. . .. . It seems like Heroku does not have the libraries required for python-ldap and I don t know if there is a way to install dependency libraries except pip . What is the recommended solution to support ldap authentications in Heroku s Python Django stack Your help is greatly appreciated . .. . Answer : You can create a custom build pack that vendors in any libraries you like . Take a look at https : github.com cirlabs heroku-buildpack-geodjango it installs a library via Curl . Comment : Heroku Python guy here this is correct . Comment : it s not working.. .", "Question : I can t install python-ldap using virtualenv and pip . When I run command : .. . .. . pip install python-ldap : .. . .. . I tried downloading latest version from here : https : pypi.python.org pypi python-ldap downloads but it seems thats the same version as it gives same error . Am I missing something here or this version is bugged Update I think I should have included this message of error too . This goes before that one : .. . .. . error : command gcc failed with exit status 1 .. . Answer : It seems I was missing some packages . This solved the problem : .. . .. . Found it here : How do I install python-ldap in a virtualenv on Ubuntu http : stackoverflow.com questions 18134826 how-do-i-install-python-ldap-in-a-virtualenv-on-ubuntu . This install needs to be done outside the virtual environment and not within the virtual environment . Comment : Thanks . Forgot to mention that but yeah it will install outside virtualenv", "Question : Is it possible to import LDIF like that .. . .. . using python-ldap library http : www.python-ldap.org Yes I can add new record to LDAP in such way http : www.grotan.com ldap python-ldap-samples.html add but I am not sure about such text ldif-file . PS . Full answer is here http : pastebin.com eQU7xBfj Comment : Why use Python at all You can use this file directly with the ldapadd utility . No need to interpose further software and certainly no need to wrtie any code . Comment : @EJP because better to use python code in python script instead external linux command . Comment : No it isn t . It is always and everywhere better to use existing and well-tested software rather than writing your own . .. . Answer : You could try the below method too : .. . .. . I have derived to the above solution using example given in python-ldap docs http : www.python-ldap.org doc html ldif.html example", "Question : Trying to install python-ldap for my Django project -- so far tried easy install pip as well as building myself but still getting the same errors : .. . .. . What s going on .. . Answer : I had to modify setup.cfg to get this to work on OS X . Here s what I did : .. . .. . Modify the following lines in setup.cfg : .. . .. . Then continue with normal installation : Comment : Unfortunately it s the same thing : Comment : I have decided to go with python-ldap 2.3.13 -- it seems work when built from source . Comment : Same here python-ldap 2.3.13 worked directly from source .", "Question : I am able to bind and query Active Directory via python-ldap without any issues except when it comes to adding or modifying attributes on AD . I can add the attribute but the encoding seems to be way off as all the text is garbled . I ve tried encoding my string with utf8 and a few others with no luck . I ve also tried binding with a Domain Admin account along with binding with the user account to which I will be changing an attribute same result regardless . Here is the method I use to update an attribute : .. . .. . class LdapHelpers : .. . .. . Doing a ldapsearch via terminal this is what the attribute looks like : .. . .. . This is what Hello World looks like when I set mobile to it : .. . .. . I ve checked MSDN and it says that ldap attribute is just a Unicode string . System : Ubuntu 15.10 64bit Python : 2.7.10 python-ldap 2.4.21 .. . .. . As a side note I can search AD without any issues and parse display returned user attributes the issue only seems to be with creating or modifying attributes that this encoding issue comes in to play . Comment : could you please check what query it is sent tcpflow -c port 389 Comment : Here is the dump from the modify query above : tcpflow -c port 389 tcpflow : listening on eth0 010.001.200.029.54760-010.000.000.039.00389 : 0C -CN Administrator CN users DC company DC com coolpassword 010.000.000.039.00389-010.001.200.029.54760 : 0a 010.001.200.029.54760-010.000.000.039.00389 : 0 fV4CN Jassen Michaels OU GoogleApps DC company DC com00 pmobile1 010.000.000.039.00389-010.001.200.029.54760 : 0g .. . Answer : The at the end is often an indicator that it is Base64 https : en.wikipedia.org wiki Base64 encoding . Python has a standard-library for encoding decoding base64 https : docs.python.org 3 library base64.html The link is for Python 3 but Python 2 also has the library . LDAP does indeed use Base64 for something . See The LDAP Data Interchange Format LDIF https : tools.ietf.org html rfc2849 . Comment : Thanks for the reply . There seems to be something weird with the encoding for example if I modify the mobile attribute and set it to Hello World it is stored in AD as : mobile : : 77+9ehsCAAAAABDvv70V That doesn t decode to anything in Base64 other than gibberish . If I am using OpenLDAP from the command-line I can create an .ldif file to modify that attribute and it will show up correctly so I am not sure if this is something specifically tied to python-LDAP and AD Comment : I also saw that the double colon s in the LDAP Search result signify the item in Base64 encoded though if I modify the attribute via an LDIF file the attribute does not get encoded it only seems to behave this way when I am trying to modify attributes via python rather than using openLDAP commands.. .", "Question : I ve been trying to use Python-LDAP http : www.python-ldap.org version 2.4.19 under MacOS X 10.9.5 and Python 2.7.9 .. . .. . I want to validate my connection to a given LDAP server after I ve called the .start tls s or to have the method raise and exception if the certificate cannot be verified . I d also like to check for a CRL but that s a different matter . Here s my code : .. . .. . As noted in the comments I have copied most of this from http : stackoverflow.com a 7810308 149076 and from http : python-ldap.cvs.sourceforge.net viewvc python-ldap python-ldap Demo initialize.py revision 1.14 view markup http : python-ldap.cvs.sourceforge.net viewvc python-ldap python-ldap Demo initialize.py revision 1.14 view markup .. . though I have tried many variations and sequences of this . As shown I have two files which represent a bad certificate and one which should work it s actually taken from one of our systems which is configured to run sssd https : fedorahosted.org sssd System Security Services Daemon which is presumed to be checking this correctly . In the bad copy I ve simply replaced the first character of each key line with the letter x on the assumption that this would corrupt the CA key and cause any code attempting to verify a chain of signatures to fail . However it seems that the Python LDAP code ignores this even if I set it to dev-null or an entirely bogus path my code still runs still binds to the LDAP server and still completes my search request . So the question is how do I get this to fail as intended or more broadly how do I prevent my code from being vulnerable to MITM Mallory attacks If it s of any consequence in this discussion here s my OpenSSL version : .. . .. . The LDAP server is running OpenLDAP but I don t know any details about its version nor configuration . Here s sample output from my code : Comment : I d also like to check for a CRL but that s a different matter - be careful with this . You could be setting yourself up for a DoS due to missing broken CRLs and OCSP responders . Mozilla turned it off for a while because it had such a negative effect on the user-experience . Stapled responses would probably be the way to go . Comment : In my case this will be working in an environment that provides their own CA and manages their own CRLs . It s all internal . Comment : I might be the bearer of bad news.. . Python-LDAP can use OpenSSL . But the calls one typically utilizes or encounters for certificate handling are not present . For example I get 0 hits for cd python-ldap grep -R -i ca certs grep -R -i wrap socket grep -R -i certs reqs . You might want to reach out to the developers to see their position . They may say something like the code is meant to be run in the same security boundary as the ldap server . So we use a certificate for confidentiality but we don t verify the server or employ server authentication because there s no active MitM . Comment : According to their web page Python-LDAP wraps OpenLDAP and not OpenSSL directly . As far as I remember the OpenLDAP client library can be configured via environment-variables so I d expect this feature to work even if Python-LDAP has no specific provisions for it or even if they exist but do not work . How you get the error message back is an interesting part but it should not continue with the connection . I d test the same search and environmental settings from CLI as well eg with ldapsearch . man ldap.conf shows the names of the environmental variables expected . .. . Answer : Your code works for me as expected . Actually I had exactly the opposite problem when I executed your code for the first time . It always said certificate verify failed . Adding the following lines fixed this : .. . .. . Now when I use the wrong CA certificate or one that has been modified as you described it the result is this error message : .. . .. . When I use the right CA certificate the output is like yours . .. . .. . Now the interesting question is : What are the differences between our setups and especially which difference causes this strange behaviour on your machine My setup is : .. . .. . Mac OS X 10.10 .. . Python 2.7.6 .. . python-ldap 2.4.19 manual installation .. . OpenLDAP 2.4.39 via Homebrew .. . OpenSSL 1.0.1l via Homebrew .. . .. . I have a local OpenLDAP running installed with Homebrew : .. . .. . On Yosemite python-ldap is quite buggy when installed with pip see Python-ldap set option not working on Yosemite http : stackoverflow.com questions 28095513 python-ldap-set-option-not-working-on-yosemite therefore I had to download the tarball and compile install it which was fortunately pretty easy because I already had the OpenLDAP installation with current libs headers : .. . .. . First edit the ldap section in setup.cfg like this : .. . .. . Some header-files are in Mac OS SDK link the directory change the path according to your version to usr include : .. . .. . Then build and install : .. . .. . The output of otool shows that python-ldap is now linked to the libraries of OpenLDAP 2.4.39 and OpenSSL 0.9.8 : .. . .. . An alternative approach for building python-ldap is to install only the OpenLDAP libraries and headers needed for building : http : projects.skurfer.com posts 2011 python-ldap lion .. . .. . All these steps should work under Mavericks as well and I assume using the latest OpenLDAP and OpenSSL libraries will solve your problem . Comment : On my Mac under MacOS 10.9.5 I was not getting any warning or failure . On a Linux VM under CentOS 6.5 last I checked I m getting the behavior you describe here at least up to the point where it it always raises the exception . I ll try the ld.set option ldap.OPT X TLS NEWCTX 0 setting and adjusting some of my brew libraries . I m using Python 2.7.9 as noted above my LDAP OpenSSL is either MacOS default or corporate loaded --- I haven t messed with either of those . Comment : Omikron you are definitely the front runner for the bounty so far . Comment : I have added the output of otool it seems like the OpenSSL version does not matter here because my python-ldap is linked to 0.9.8z not to 1.0.1l .", "Question : I am using Windows as my main python-2.7 development-environment and I want to install python-ldap on a virtual environment . The python-ldap package needs compiling : and of course I can t compile it in my environment . So I tried finding binaries in order to install them in my virtual environment through easy install FYI you can do easy install package.exe and the package will be installed . I found the distributed binaries here : https : pypi.python.org pypi python-ldap .. . .. . Unfortunately they give only .msi packages for python-2.7 Why do people use .msi MSI CANNOT BE INSTALLED THROUGH easy install . I HATE MSI .. . .. . Yes I can install the .msi package by executing it but it will be installed in the global python packages and not on my virtual environment Please can anybody help me I remember having this exact problem in a previous project and I had to develop it outside of a virtual environment -- but I cannot do this now : .. . .. . Update : I installed python-ldap system-wide and copied the directories ldap and python ldap-2.4.10-py2.7.egg-info from PYTHON GLOBAL Lib site-packages to VIRTUALENV Lib site-packages and seems to be working now . However I really don t like that solution so I won t answer my question with that . Also Alexander s comment on recreating my virtualenv with --system-site-packages probably will be working but this means that I d need to uninstall a lot of my global packages packages and then install again my virtual packages etc and in general it s not DRY : .. . .. . Update 2 : After trying cgohlke s suggestion I saw that the contents of the MSI were the two directories I mentioned above along with the files dsml.py ldapurl.py and ldif.py . So I also copied this to my VIRTUALENV Lib site-packages . Now I believe that the installation is ok : . But I believe that cgohlke s is the best one - just use msiexec.exe to extract the contents of the msi directly to your VIRTUALENV . Update 3 : In a similar question Installing python-ldap in a virualenv on Windows http : stackoverflow.com questions 15070063 installing-python-ldap-in-a-virualenv-on-windows I found a really interesting link : http : www.lfd.uci.edu gohlke pythonlibs python-ldap . In there you will be able to find .EXE install packages for python-ldap and LOTS of others So finally by downloading these you ll be able to easy install them in your virtualenv Comment : One way is to install it system-wide and recreate your virtualenv using --system-site-packages . Comment : Yes probably that will work - but I don t want to recreate my virtualenv . Comment : Try to extract the msi : msiexec.exe a python-ldap-2.4.10.win32-py2.7.msi qn TARGETDIR C : Absolute Path . Comment : @cgohlke I think you solution is the best - could you answer it properly so I can accept it Thanks Comment : Hi @Cas I am really not sure why the difference . Both the egg-info and ldap are needed . In any case as I said in my Update 3 you should just download the python-ldap 2.4.15.win amd64 py2.7.exe from lfd.uci.edu gohlke pythonlibs http : www.lfd.uci.edu gohlke pythonlibs and then just do an easy install python-ldap 2.4.15.win amd64 py2.7.exe to install it . .. . Answer : How about installing it system-wide creating an egg from installed files and then using that egg in your virtual env You can find some info about egg structure here : http : pythonhosted.org setuptools formats.html" ] }
[ "yes-answer-long", "yes-answer-short" ]
api
UNK_RELATION
imagick@imagemagick@84
imagick -- imagick is a native php-extension to create and modify images using the @placeholder library .
{ "confidence": [ 54.677188873291016, 54.521244049072266, 52.74000549316406, 50.46419143676758, 49.99006271362305, 49.10965347290039, 48.849632263183594, 46.21187973022461, 45.55104446411133, 45.5031623840332, 45.261451721191406, 45.1942024230957, 45.104366302490234, 44.33710479736328, 43.34913635253906, 43.30020523071289, 43.19108581542969, 42.5923957824707, 42.45414352416992, 42.061397552490234, 42.00270080566406, 41.74873733520508, 41.6082878112793, 41.56068801879883, 41.56068801879883, 41.47716522216797, 41.43867874145508, 41.18906021118164, 40.84182357788086, 40.70964431762695, 40.61393356323242, 40.14225387573242, 40.02970504760742, 40.02970504760742, 39.929229736328125, 39.929229736328125, 39.839012145996094, 39.83821487426758, 39.75643539428711, 39.7493896484375, 39.50184631347656, 39.26063537597656, 39.26063537597656, 39.26063537597656, 39.23560333251953, 39.193511962890625, 39.06945037841797, 38.898353576660156, 38.5051383972168, 38.5051383972168, 38.147891998291016, 38.05438232421875, 38.05438232421875, 38.05438232421875, 38.05438232421875, 38.05438232421875, 38.031105041503906, 38.014793395996094, 38.002079010009766, 38.002079010009766, 38.00175094604492, 37.93806076049805, 37.93806076049805, 37.85819625854492, 37.856754302978516, 37.818084716796875, 37.78813934326172, 37.74605178833008, 37.74605178833008, 37.74605178833008, 37.73978042602539, 37.72706985473633, 37.72706985473633, 37.69590377807617, 37.61469650268555, 37.56040573120117, 37.42463684082031, 37.42463684082031, 37.14949035644531, 37.14949035644531, 37.0941276550293, 37.0941276550293, 37.0941276550293, 37.0941276550293, 37.057674407958984, 37.057674407958984, 37.057674407958984, 37.057674407958984, 37.057674407958984, 37.057674407958984, 37.057674407958984, 37.057674407958984, 37.03453826904297, 37.03453826904297, 36.99745178222656, 36.77366638183594, 36.68486404418945, 36.49063491821289, 36.49063491821289, 36.490596771240234 ], "content": [ "This is the Imagick Library https : github.com gographics imagick which i am using .", "I m using the php imagick extension .", "Source - I m the maintainer of the Imagick extension and I recently added this to the Imagick readme : .. . .. . Security .. . .. . The PHP extension Imagick works by calling the ImageMagick library .", "I am using the imagick https : github.com gographics imagick library to resizing and cropping the images in a http handler .", "I m using imagick extension .", "Put DLL with Imagick into extension folder of PHP e.g .", "If this is a best way it is possible to make it with Imagick library or in PHP", "We are using the PHP Imagick package wrapping the ImageMagick library under the hood in order to manipulate images in our web application .", "Download php-extension of imagick from this link .", "Imagick is a PECL extension https : pecl.php.net package imagick that will need to be installed on system .", "The Imagick library in PHP allows you to draw text on top of an image .", "It s a PHP script with Imagick .", "Try using imagick : : COMPOSITE OVERLAY in-place of imagick : : COMPOSITE OVER .", "input.bmp .. . imagick- setImageFormat TGA .. . imagick- transparentPaintImage 000 0 0.1 Imagick : : getQuantum false .. . imagick- despeckleimage .. . imagick- setImageMatte true .. . imagick- writeImage DIR .", "Create a folder imagick in php ext folder .", "I ve been having some trouble generating an image with the Imagick PHP extension .", "Other resouce limits to investigate : imagick : : RESOURCETYPE DISK imagick : : RESOURCETYPE FILE and imagick : : RESOURCETYPE AREA .", "i create image using Imagick function .", "Is this possible through PHP GD or PHP Imagick", "Hopefully you will have no problem installing Imagick for PHP .", "I m converting images from RGB to CMYK with IMagick in PHP .", "Replacing Imagick : : COMPOSITE ATOP with Imagick : : COMPOSITE OVER seems to be fixing it", "For example my PHP using Imagick : .. . .. . By the way Imagick it s showing up in my phpinfo .", "where can I find the list of compatible php and imagick api and imagick versions", "where can we find the list of compatible php and imagick DLLs and imagick versions", "I am trying to remove transparent areas of an image with php using imagick .", "I didn t notice that the Imagick extension is on Github .", "extension C : wamp bin php php5.5.12 ext imagick php imagick.dll", "Now after downloading the image i want to resize it using the imagick library https : github.com gographics imagick build-tags but without writing it on to the disk .", "http : us1.php.net imagick outlines the library beautifully but there are no montage examples .", "I have to render something with Imagick on PHP CLI .", "is imagick installed", "But I want to do the same in PHP using Imagick version 6.6.2-10 .", "I am using PHP and Imagick to generate a thumbnail which is working great .", "You can always imagejpg imagick- readImage imagick- setImageResolution imagick- writeImage to keep it short", "Please post an example PDF somewhere - if necessary on the Imagick issue page at github.com mkoppanen imagick https : github.com mkoppanen imagick", "I m trying to install Imagick extension for PHP 7 on Amazon Linux Server .", "Imagick as opposed to GD is not part of php requires external library ImageMagick and must be installed additionally .", "The imagick extension is displayed when the phpinfo is called and I can call the functions of the Imagick class .", "@Volker It s a library for image-processing and it s wrapper in golang is called imagick .", "instead of the formerly imagick : : IMGTYPE TRUECOLORMATTE", "Imagick is in usr bin convert but the function does not see the class Imagick .", "Didnt found it in the source github.com mkoppanen imagick https : github.com mkoppanen imagick", "See https : gowalker.org github.com gographics imagick imagick MagickWand GetImageBlob for the documentation .", "To ensure i test your code if extension loaded Imagick with another extension and worked", "Is there any way to work with Imagick using real path", "I m using PHP 5.3.6 ImageMagick 6.7.0 Imagick 3.1.0 .", "As per my surfing Imagick doesn t allow images from relative paths .", "However running Imagick : : queryFormats in PHP shows that no image-formats are supported .", "It s almost funny how ridiculous the documentation on the PHP Imagick API is .", "I am trying to use imagick for image-processing in PHP and GhostScript for converting PHP files to images .", "Update imagick as well .", "imagick has zooming by crop .", "imagick works fine .", "It is exactly the same as Imagick : : COLORSPACE RGB .", "Are there any known bug in IMagick", "Is imagick installed", "Imagick : : clone has been deprecated as of imagick 3.1.0 in favour of using the clone keyword .", "While running a simple script on php a new Imagick I get the error Class Imagick not found .", "That one actually worked with the php imagick.dll Imagick for PHP 5.5.x from http : www.peewit.fr imagick .", "It s too much for me as I m beginner with Imagick .", "imagick module version 2.1.1-rc1", "Symfony2 .. . .. . In Symfony2 use Imagick like this :", "A quick inspection of the imagick API lead me to gowalker.org github.com gographics imagick https : gowalker.org github.com gographics imagick imagick MagickWand GetImageBlob which seems to return an already encoded byte in the needed format JPEG Gif.. . .", "imagick uses a shared library and it s memory usage is out of reach for PHP so tuning PHP memory and garbage-collection won t help .", "I downloaded the imagick dll from peewit.fr imagick http : www.peewit.fr imagick and kept a note of the ImageMagick version with which it was tested .", "I can confirm the Imagick extension is working on the server and is in use by other sites .", "Imagick is using the smallest format possible to save the image .", "try using compositeImage method and Imagick : : COMPOSITE COPYOPACITY", "what code are you using to convert to grayscale with Imagick", "I need to annotate an image with Chinese Text and I am using Imagick library right now .", "@maxwell2022 That s from the Image Magick library that Imagick allows you to use in PHP - so that s C code .", "I currently use Imagick library on PHP and use the resizing functionality of Image Magick .", "I am trying to use PHP native Imagick but stumbled upon weird issue .", "Reading the security section of the readme for Imagick is usually a good idea as well.. . github.com mkoppanen imagick security https : github.com mkoppanen imagick security", "Successfully install imagick into my system and able to loaded imagick extentsion appears in phpinfo but when running simple php command such as php -v in my command-prompt it shows error .. . .. . PHP Warning : PHP Startup : Unable to load dynamic library MY SERVER PATH PHP ext php imagick.dll - The specified module could not be found .", "What is the best way to correct black background when converting multi page PDF to JPG with Imagick php-extension", "The question was about php imagick extension not about command-line convert of ImageMagick so this answer is not on topic .", "Or was it just additional information on how Imagick is handling the imagick- setOption jpeg : extent 2500kb", "The Imagick function would be Imagick : : writeImage filename and then filesize filename .", "The method is new Imagick filename .", "merged @ imagick- flattenimages", "imagick- getImageProfiles shows no profiles .", "Why not new Imagick url", "is there a way I can do command-line stuff from php imagick", "Does anyone know of a good resource to learn imagick for PHP", "Here s a script that uses Imagick PHP to add a profile to an image .", "Here is the function that displays icons : .. . .. . It s a PHP script with Imagick .", "What is the most stable combination of versions of ImageMagick and Imagick to use for PHP 5.6", "I try to run a basic test : php -r var-dump class exists Imagick .", "Have you tried Imagick : : writeImageFile php : stdout untested", "I m having some troubles converting PDF files to JPEG with Imagick in PHP .", "Now I m trying to get Imagick to run and the latest versions ImageMagick 7.0.2-5 x86 and Imagick 3.4.3 RC1 VC11 x86 for PHP 5.6 are not working .", "When you instantiate the Imagick class use a full quallified class-name : .. . .. . This will make PHP not look for the class Imagick within the current namespace .", "I m using Imagick and have found what seems to be the perfect code for the command-line and am trying to replicate it using the PHP library .", "I have done much Image processing development in localhost using Imagick extension .", "I am using PHP imagick any idea how this cli command converts to PHP code", "Imagick seems to only be able to open local images or open file handles .", "For existing images the correct method to change the colorspace of the image is Imagick : : transformImageColorspace .", "but with imagick i can t open a TGA ." ] }
{ "confidence": [ 58.09096145629883, 57.0921516418457, 56.05059814453125, 55.14026641845703, 54.937156677246094, 54.83572006225586, 54.810279846191406, 54.296268463134766, 54.20767593383789, 54.13470458984375, 53.89207458496094, 53.641544342041016, 52.25337600708008, 52.107330322265625, 51.75992965698242, 51.7130126953125, 51.683067321777344, 51.40926742553711, 51.338016510009766, 51.290592193603516 ], "content": [ "Question : I need to do some actions on jpeg images - Heroku s PHP GD does not allow that . I ve read that it is possible with Imagick so i rewritten the code pushed it to heroku and.. . .. . .. . PHP Fatal error : Class Imagick not found in .. . .. . .. . So am I doing something wrong code works locally Is there any way of working with jpg on heroku Comment : As for doing wrong - yes you are trying to run code on different environment without fully realizing how it works . Imagick as opposed to GD is not part of php requires external library ImageMagick and must be installed additionally . Comment : Here s my compiled imagick.so on github https : github.com alkhoo heroku-cedar-php-extension with instructions . Takes 5 mins to set it up .. . Answer : ImageMagick a command-line utility and programming library must be installed on the system for Imagick to work . If it s not working for you then presumably Heroku s PHP web dynos do not have this installed by default . You have two options : you can find some convoluted way to package ImageMagick with your application itself for instance by adding compiled binaries to your git source tree . Or you can modify the Heroku PHP buildpack https : github.com heroku heroku-buildpack-php which is the set of rules that sets up the web dyno before your application is deployed to install ImageMagick along with Apache and PHP itself . The latter approach is more likely to work . Once you ve modified the buildpack change your application to point to your buildpack fork with the command-line Heroku tools the --buildpack option and redeploy . Comment : Thanks @Andrew Gorcester can you please tell me how to add imagick to a custom buildpack Thanks Comment : Sorry @OscarFanelli I haven t used this feature in three years so I don t remember or have up to-date information . Good luck", "Question : I need to do some actions on jpeg images - Heroku s PHP GD does not allow that . I ve read that it is possible with Imagick so i rewritten the code pushed it to heroku and.. . .. . .. . PHP Fatal error : Class Imagick not found in .. . .. . .. . So am I doing something wrong code works locally Is there any way of working with jpg on heroku Comment : As for doing wrong - yes you are trying to run code on different environment without fully realizing how it works . Imagick as opposed to GD is not part of php requires external library ImageMagick and must be installed additionally . Comment : Here s my compiled imagick.so on github https : github.com alkhoo heroku-cedar-php-extension with instructions . Takes 5 mins to set it up .. . Answer : A simpler approach is to install ImageMagick using composer.json as explained here : https : devcenter.heroku.com articles php-support php-5-5-and-5-6 .. . .. . You just need to include imagick in the require section and update composer :", "Question : I want to create image magick object corresponding to images stroed in S3 . So i was writing a function which will take necessary arguments and return the image magick object . But no luck with it . This is the Imagick Library https : github.com gographics imagick which i am using . .. . Answer : Well NewMagickWand https : github.com gographics imagick blob 943dd0909306f8bea46cc7f855de8ae6790730d4 imagick magick wand.go L25 returns a MagickWand so you can create your function like : .. . .. . Then the caller has to call .Destroy for example : Comment : Could you please also tell me how to evenly crop an image just passing the aspect-ratio not cropping coordinates . imgStream.Crop int originalWidth int originalWidth masterAspectRatio Gravity.Center like we do it in .net Comment : @Naresh I m not sure I ve never used it before .", "Question : I m trying to convert a RGB .gif to a CMYK .gif using IMagick PHP module . I ve wrote this piece of code .. . .. . But the resultant mosaique-cmyk.gif still a RGB.. . but with inverted colors O O .. . .. . What am I doing wrong EDIT : .. . .. . I ve tried with a .jpg and the image is converted to CMYK but it stills in negative . EDIT 2 : .. . .. . I ve tried to run my script making a .pdf on another server and it works fine . Are there any known bug in IMagick Are there some options to set in the php5 library The version that returns me the inverted image is newer than the one that works correctly .. . .. . WRONG RESULT PHP 5.3.3 IMagick 3.0.0RC1 ImageMagick 6.6.2 .. . .. . CORRECT RESULT PHP 5.2.10 IMagick 2.1.1 ImageMagick 6.5.1 .. . Answer : see here http : imagemagick.org Usage formats color profile .. . .. . convert cmyk image.jpg -colorspace rgb rgb image.jpg Comment : The question was about php imagick extension not about command-line convert of ImageMagick so this answer is not on topic . -1 Comment : php imagick is not doing it its just a wrapper for ImageMagick and if you know the command-line option you can use it in your php code . Comment : It s a wrapper for the ImageMagick library not for the convert tool . That s not the same . And the wrapper doesn t expose all options . github.com mkoppanen imagick https : github.com mkoppanen imagick you can view the source and see that it does in fact NOT just call the cli IM commands see imagick.c but exposes functionality individually .", "Question : I am trying to use iMagick in Symfony2 . I am using PHP 5.4.16 and all i have done : .. . .. . 1-Copy php imagick nts.dll from php5-4 directory from the extracted http : valokuva.org mikko imagick-php54-php53.tgz to php ext . 2-Rename it to php imagick.dll and add the extension php imagick.dll to php.ini .. . .. . 3-Create a page like this : .. . .. . but i receive this : .. . .. . When I tried to use this in a symfony controller the error occur again : .. . .. . Unfortunately the details about imagick extension not appear in output of phpinfo .. . .. . Is this version is incompatible with PHP 5.4.16 If yes what version i must use Where Thank for any help.. . Comment : Did you restart the server and PHP before trying .. . Answer : I m quite sure this is to do with not having the module loaded correctly or the .dll being placed in a improper location . You can use PHP s internal function extension loaded http : php.net manual en function.extension-loaded.php to check prior to using the class .. . .. . That s a method you can check if the module is even being reconsigned by PHP at all . PHP also provides a function to view your current extensions get loaded extensions http : www.php.net manual en function.get-loaded-extensions.php : .. . .. . Make sure you do : .. . .. . Check your correct extension library folder location within your phpinfo .. . Perform a hard restart of your xmapp wamp server . If you re on PHP 5.4 or upwards Like yourself see site below for the updated binaries .. . .. . After researching too Imagick does seem to have trouble with PHP 5.3 or upwards Download new DLL s from this site below Unofficial : .. . .. . http : www.peewit.fr imagick .. . .. . Also found other StackOverFlow Articles that have the same problem : .. . .. . Stackoverflow : Trying to get imagick running on PHP 5.4.3 at Windows x64 http : stackoverflow.com questions 15445493 trying-to-get-imagick-running-on-php-5-4-3-at-windows-x64 .. . .. . Alternatively you re able to use the GD extension http : php.net manual en book.image.php to more or less accomplish some of the same functions you require . I do believe GD http : php.net manual en book.image.php is a more widely supported module extension in more recent versions of PHP . Comment : Thanks for your response MackieeE but not solved . I put it in correct folder . To ensure i test your code if extension loaded Imagick with another extension and worked I also checked again php.ini for any wrongs but there is no wrong line Whats the problem you think Comment : @AliBagheriShakib Well - you re not the only one it seems : I ve found other pages with the same issue although they are probably something that you ve found too. . : Comment : Hi @MackieeE . Is it necessary to install imagemagick.org download binaries http : www.imagemagick.org download binaries ImageMagick-6.8.6-8-Q16-x86-dll.exe Or copy the dll file in extensions dir is sufficient Comment : If you installed the binaries via the .exe did you include them into your PATH Comment : Another page : alexdespaindev.blogspot.co.uk 2012 02 http : alexdespaindev.blogspot.co.uk 2012 02 wamp-server-and-imagemagick.html - Also apologies that I ve not been able to provide a definitive answer :", "Question : I am trying to use iMagick in Symfony2 . I am using PHP 5.4.16 and all i have done : .. . .. . 1-Copy php imagick nts.dll from php5-4 directory from the extracted http : valokuva.org mikko imagick-php54-php53.tgz to php ext . 2-Rename it to php imagick.dll and add the extension php imagick.dll to php.ini .. . .. . 3-Create a page like this : .. . .. . but i receive this : .. . .. . When I tried to use this in a symfony controller the error occur again : .. . .. . Unfortunately the details about imagick extension not appear in output of phpinfo .. . .. . Is this version is incompatible with PHP 5.4.16 If yes what version i must use Where Thank for any help.. . Comment : Did you restart the server and PHP before trying .. . Answer : Thanks so much man step 4. . There is important not forget add extension php imagick.dll", "Question : I have inherited a site with a custom plugin that is supposed to decrypt member information and a captured signature and put it into a PDF . The function uses in this order TCPDF to create the document jSignature to convert the decrypted signature to Base30- Base64- Native- SVG and Imagick to convert the signature to a JPG . Everything works up to calling the Imagick class to handle the signature file . Imagick is in usr bin convert but the function does not see the class Imagick . Maybe it s not looking Looking in the wrong place How do I get the function to look in the right place EDIT .. . .. . I have just realized that the site that uses this plugin is in a subdomain but ImageMagic and I believe the Imagick libraries are installed in the root . Could this be my problem If so how do I fix it Comment : Imagick is a PECL extension https : pecl.php.net package imagick that will need to be installed on system . Can you confirm that the module is loaded by running php -m .. . Answer : It turns out that the subdomain could not see the install in the root . The fastest way to fix it was just install in the subdomain . All is working now . Thanks everyone for putting some brain power to this .", "Question : I am trying to use iMagick in Symfony2 . I am using PHP 5.4.16 and all i have done : .. . .. . 1-Copy php imagick nts.dll from php5-4 directory from the extracted http : valokuva.org mikko imagick-php54-php53.tgz to php ext . 2-Rename it to php imagick.dll and add the extension php imagick.dll to php.ini .. . .. . 3-Create a page like this : .. . .. . but i receive this : .. . .. . When I tried to use this in a symfony controller the error occur again : .. . .. . Unfortunately the details about imagick extension not appear in output of phpinfo .. . .. . Is this version is incompatible with PHP 5.4.16 If yes what version i must use Where Thank for any help.. . Comment : Did you restart the server and PHP before trying .. . Answer : I spent many hours trying to make Imagick work finally I got it . My installation instructions .. . .. . 1 . Install WAMP 32bit even if you running 64bit system you must use 32bit version of WAMP .. . 2 . Install ImageMagick to C : imagemagick use this file : https : www.dropbox.com s i2mhrhd7sp0ilzk ImageMagick-6.8.0-3-Q16-windows-dll.exe .. . 3 . Put DLL with Imagick into extension folder of PHP e.g . D : wamp32 bin php php5.4.16 ext I used this file : https : www.dropbox.com s ayankf850l08rm2 php imagick.dll .. . 4 . In php.ini put line SetEnv MAGICK HOME C : imagemagick without quotes .. . 5 . Better restart PC .. . .. . I use Wamp 2.4 PHP 5.4.16 Apache 2.4.4 ImageMagick 6.8.0-3 2012-10-24 Q16 Imagick 3.1.0RC2 - all 32bit OS Win8 64bit .. . .. . Now it should work and you should see Imagick extension loaded in phpinfo . I tried a lot of versions of ImageMagick but newer versions didn t work 6.8.0-3-Q16-windows-dll works fine . Symfony2 .. . .. . In Symfony2 use Imagick like this : Comment : Thanks . It worked for me in one try tried a lot of other versions which didn t worked . Comment : Thanks . You saved my life . : D Comment : This does not work on my Win 7 64-bit system using all 32-bit binaries . I ve rebooted checked path for IM duplicates etc . I ve re-installed multiple times both WAMP IM . Comment : Thanks a lot. . Finally it worked for me Comment : php.ini should have extension php imagick.dll I don t think the SetEnv is needed .", "Question : null .. . Answer : I have done much Image processing development in localhost using Imagick extension . Now while going live my requirement is to load images from remote url in imagick . As per my surfing Imagick doesn t allow images from relative paths . I can t copy files from real url to my server each time that is the problem . Is there any way to work with Imagick using real path Thanks in advance . Comment : You should show what you re trying to do through code rather than trying to describe it in words . Also - what is stopping you from just using absolute paths", "Question : I am trying to use iMagick in Symfony2 . I am using PHP 5.4.16 and all i have done : .. . .. . 1-Copy php imagick nts.dll from php5-4 directory from the extracted http : valokuva.org mikko imagick-php54-php53.tgz to php ext . 2-Rename it to php imagick.dll and add the extension php imagick.dll to php.ini .. . .. . 3-Create a page like this : .. . .. . but i receive this : .. . .. . When I tried to use this in a symfony controller the error occur again : .. . .. . Unfortunately the details about imagick extension not appear in output of phpinfo .. . .. . Is this version is incompatible with PHP 5.4.16 If yes what version i must use Where Thank for any help.. . Comment : Did you restart the server and PHP before trying .. . Answer : I use : Wamp 2.4 PHP 5.4.16 Apache 2.4.4 ImageMagick 6.8.0-3 2012-10-24 Q16 Imagick 3.1.0RC2 - all 32bit OS Win7 32bit .. . .. . Instructions given by fmstoun worked for me perfectly . Since I spent a lot of hours trying to make the dll work I wanted to add-on to steps given by fmstoun . Do restart your PC . Use the full path to the image for example : .. . Make sure your system environment has 1 single entry for : C : imagemagick and no more environment-variables for imagemagick . If any previous installations have the path then remove those paths and restart your PC .. . Make sure .. . .. . http : localhost .. . .. . of wamp shows imagick as loaded extension .. . If extension is loaded properly it has to show up in phpinfo also as : .. . imagick module enabled .. . .. . ImageMagick version ImageMagick 6.8.0-3 2012-10-24 Q16 .. . .. . and some more information about imagemagick . Considering the date of this post the latest version of imagemagick provided on the official site is : ImageMagick-6.8.8-1-Q16-x86-dll.exe which fails to load the extension as seen in apache error logs after a restart . Hence use the version mentioned by fmstoun . Hope this answer saves couple of hours of effort and saves time required to go through around 15 SO questions on same topic and also different forums .", "Question : I am trying to use Imagick with Symfony2 but every time I try and use it it gives me the following error : .. . .. . I am using Imagick in a service I have setup to manage my images . What do I need to do to be able to use this class I can confirm the Imagick extension is working on the server and is in use by other sites . Thanks in advance for any help . .. . Answer : When you instantiate the Imagick class use a full quallified class-name : .. . .. . This will make PHP not look for the class Imagick within the current namespace . For a more detailed explanation see a similar Question Answer : Problems with PHP namespaces and built-in classes how to fix http : stackoverflow.com questions 6901358 problems-with-php-namespaces-and-built-in-classes-how-to-fix 6901395 6901395 and How to use root namespace of php http : stackoverflow.com questions 6593621 how-to-use-root-namespace-of-php . Comment : Genius that is great . Thanks for such a quick answer hakre", "Question : I m attempting to install ImagicK as its required for a Yii Extension I want to use for my project . I ve checked around and followed a few different suggestions but nothing that has worked so far ultimately the framework extension is still throwing me an error Must have ImagicK installed . I ve tried things like : .. . .. . as well as the PECL install which ends up throwing me the following error : .. . .. . Any help as to how to get ImagicK installed and integrated with PHP on Ubuntu 11.10 would be great . Thanks in advance Comment : +1 for using Yii .. . Answer : For Ubuntu 16 : .. . .. . sudo apt-get install php-imagick .. . .. . Note the php- vs . php5", "Question : I d like to use imagemagick to make a montage from existing photos on my server . I am having a terrible time getting any code to work properly . I ve tried using the few examples I ve found by searching but it s not working . http : us1.php.net imagick outlines the library beautifully but there are no montage examples . I d just need a proper example to get me off on the right foot and I can usually take it from there . Does anyone know of a good resource to learn imagick for PHP Comment : Do you want Imagemagick Or would javascript be more appropriate Comment : I didn t know JS was capable of cropping resizing stitching together images and placing a border around them . Comment : Umm yeah you can do all of that in javascript to an extent . .. . Answer : Here is a working example of montageImage http : valokuva.org p 72 . The example does a color analysis of a photo . To make sure it works properly you will need to make sure : .. . .. . 1 . You have a valid test.png . 2 . Imagick : : clone has been deprecated as of imagick 3.1.0 in favour of using the clone keyword . So if you have imagick 3.1.0 you will need to change lines 13 and 17 . bright average- clone .. . .. . to .. . .. . and .. . .. . to .. . .. . Good luck . Comment : The link is broken.. .", "Question : I want to use Imagick API for PHP instead of runnung command-line in my PHP code . for above command I have following Imagick API code : .. . .. . But I could not find equal method option for Pango . Do you know how can use Pango in Imagick API .. . Answer : First of all you don t need the ImagickDraw object you only need to set your options to the Imagick object then to create call new pseudo image with pango : prefix instead of regular new image method : .. . .. . sorry that I couldn t find out how to set the fill color but this is another issue you may know how to solve it . P.S . You need to make sure you have pango installed and imagemagick library is built with pango support which is done for you since you are able to use command-line .", "Question : I am using Wampserver 2.5 on my Windows 7 32-bit and my PHP version is 5.5.12 . I am unable to use IMAGICK . I have installed IMAGICK version 6.8.9 on my system and it works like charm on the command-line . Further I have followed instructions to enable it on my wampserver . 1 . Inserted SetEnv MAGICK HOME C : imagemagick in httpd.conf at Appache . 2 . Downloaded php imagick-3.1.2-5.5-ts-vc11-x86.zip .. . 3 . Copied and pasted the php imagick.dll from zip to php.ini at Appache . While running a simple script on php a new Imagick I get the error Class Imagick not found . Kindly direct me to the right way of installation and the right downloads to install IMAGICK on Wampserver 2.5 Windows 7 32bit PHP 5.5.12 . .. . Answer : 1 . Create a folder imagick in php ext folder . 2 . Now add this newly created php ext imagick folder to windows path . 3 . Download the latest version of imagick for windows from this link . http : windows.php.net downloads pecl releases imagick .. . 4 . Download php-extension of imagick from this link . http : windows.php.net downloads pecl deps .. . 5 . Before downloading these 2 zip files match the file name of your installation with your php . for eg . php imagick-3.2.0b2-5.5-nts-vc11-x86.zip .. . -Here 5.5 is the version of php .. . -nts is for IIS and windows and ts is for Apache and Linux .. . -VC11 and VC9 are the version of compilation run phpinfo and check that it match with your php version . -x86 is for 32-bit x64 is for 64 bit machines i recommend use x86 only .. . 6 . Once you have downloaded the correct version for your php extract the downloaded file to imagick folder you have added to path take all files from bin folder to the root of imagick and replace all .. . 7 . Add full path to php imagick.dll in php.ini like extension C : wamp php ext imagick php imagick.dll .. . 8 . Restart your computer for path to take effect . Then open command and type dcraw and press enter . if you have added the path correctly a list of parameters will be shown your Imagick is installed sucessfully . 9 . Run phpinfo again and you will see Imagick listed as extension . Comment : The dll is not windows.php.net downloads pecl deps http : windows.php.net downloads pecl deps Comment : The php imagick.dll is in point no . 3 . Follow point 5 to get the correct version . Comment : The above method thankfully worked . The actual path in step 7 is more complex for the wamp 2.5 install . extension C : wamp bin php php5.5.12 ext imagick php imagick.dll Comment : The above worked for me along with the last step from this write-up : php.net manual en imagick.installation.php 92529 http : php.net manual en imagick.installation.php 92529", "Question : I have a png image with a transparent background and I want to convert it to a jpg image with a white background . The code is basically this : .. . .. . But that creates a black background jpg . I ve been struggling with the worst documentation ever trying to find a way to convert the transparent to white to no avail . Edit : Well I tried Marc B s idea and kind of got it to work . The problem now is it always causes the script to segfault . Comment : Try doing the destroy calls in the opposite order first white then image . white might be hanging onto a pointer to image because of the composition then trying to refer to it during destroy and segfaulting because it s gone away . Comment : @chaos Unfortunately it s not that . I m having such a bad experience with this library . Comment : Yeah APIs to ImageMagick are kind of notoriously like that . I ve been known to give up on native-code and just write system calls to convert on the command-line . Comment : It s almost funny how ridiculous the documentation on the PHP Imagick API is . .. . Answer : flattenImages actually works . But keep in mind that it doesn t modify the given Imagick object but returns a new one : .. . .. . flattenImages defaults to the background-color white . If you want to use another background-color you have to set it before loading the image : .. . .. . In general the Imagick API is very sensible when it comes to the order of function-calls just like convert and its parameters on the command-line so always check if your order is correct . Good luck Edit April 2016 : .. . .. . image- flattenImages was deprecated http : www.imagemagick.org api deprecate.php MagickFlattenImages and should be replaced by : .. . .. . It s hard to find exact informations about this but it seems that this applies to PHP 5.6 . Thanks to vee for the tip Comment : This explains what is actually going on . Comment : the result-of the flattenImages worked for me . thanks Comment : Now flattenImages is deprecated . use image- mergeImageLayers Imagick : : LAYERMETHOD FLATTEN instead .", "Question : I am trying to use iMagick in Symfony2 . I am using PHP 5.4.16 and all i have done : .. . .. . 1-Copy php imagick nts.dll from php5-4 directory from the extracted http : valokuva.org mikko imagick-php54-php53.tgz to php ext . 2-Rename it to php imagick.dll and add the extension php imagick.dll to php.ini .. . .. . 3-Create a page like this : .. . .. . but i receive this : .. . .. . When I tried to use this in a symfony controller the error occur again : .. . .. . Unfortunately the details about imagick extension not appear in output of phpinfo .. . .. . Is this version is incompatible with PHP 5.4.16 If yes what version i must use Where Thank for any help.. . Comment : Did you restart the server and PHP before trying .. . Answer : After trying many solutions none seemed to work . I managed to install it on Windows 10 64-bit Apache 2.4 and PHP 5.6 but I think it should work for all versions . Hopefully you will have no problem installing Imagick for PHP . .. . .. . Step 1 Gather information .. . .. . First of all you should gather some information of your PHP environment . You can easily see your PHP information with the function phpinfo http : php.net manual en function.phpinfo.php .. . .. . The information you need : .. . .. . Architecture : x86 32-bit or x64 64-bit .. . PHP-version : you can find this in the header of the phpinfo http : php.net manual en function.phpinfo.php output . PHP Extension Build : This string contains 2 important parts : .. . NTS or TS .. . VCx like VC11 .. . Loaded Configuration File : the path to your used php.ini file . Step 2 Download Binary .. . .. . You can download the binary from the official site of ImageMagick http : www.imagemagick.org script binary-releases.php windows . I recommend you to read the small introduction under the Windows Binary Release to be certain which bits-per-pixel to choose from 8 or 16 . Downloading the latest version should be just fine . Make sure this binary is the same architecture as your PHP architecture that you have gathered in step 1 . Step 3 Install Binary .. . .. . Install the binary to your phpx.x.xx bin file . For example : C : wamp64 bin php php5.6.16 bin . This can be any folder but for the convenience I put in here .. . .. . Make sure Add application directory to your system path is checked . Should be checked by default though . Step 4 Download PHP extension .. . .. . The DLL PHP extension is available through the windows pecl php site http : windows.php.net downloads pecl releases imagick .. . .. . Again you can just click the latest version . Next of choose the right version based on the gathered information . For example : php imagick-3.4.1-5.6-nts-vc11-x64.zip .. . .. . This can be stripped into components : .. . .. . php imagick-3.4.1 - This is the php imagick extension with the version . This is not important . 5.6 - This is your PHP version and should be equal to the PHP-version you are using which you have determed in step 1 . NTS - This should be equal to the information of your PHP Extension Build that you have gathered in step 1 . VC11 - This should also be equal to the information of your PHP Extension Build that you have gathered in step 1 . x64 - This the architecture of the extension and should be equal to your PHP architecture that you have gathered in step 1 . Step 5 Extract PHP Extension .. . .. . After you have downloaded the file you should open the .zip file and look for a file named : php imagick.dll . Extract this file to phpx.x.xx ext . Make sure the .dll file is fully accessable by you . Sometimes you need to explicity unblock the file . Unblock file http : i.stack.imgur.com 7if55.png .. . .. . Step 6 Activate PHP extension .. . .. . To activate the extension in PHP you should state in your php.ini file that you want to use this extension . You have gathered the path to your used php.ini file in step 1 . Add the line extension php imagick.dll to your php.ini .. . .. . PHP.ini Imagick line http : i.stack.imgur.com aOJjG.png .. . .. . Step 7 Restart your PC .. . .. . Just to make sure restart your PC so all Environment Path s will be correctly loaded . .. . .. . This should install Imagick correctly with the latest versions and the right architecture . Imagick should also be listed in phpinfo http : php.net manual en function.phpinfo.php with the appropriate ImageMagick supported formats Just make sure it is not empty .", "Question : Steps I ve taken so far : .. . .. . 1 . I have installed Imagick on my Win7 machine and it s installed and running properly via command-line . 2 . I ve extracted the contents of php imagick-3.1.2-5.6-ts-vc11-x86.zip available here http : windows.php.net downloads pecl releases imagick 3.1.2 into my PHP ext directory . 3 . Enabled the imagick.dll in php.ini .. . 4 . Rebooted.. . .. . 5 . No errors when starting Apache . 6 . I m still getting the Fatal error : Class Imagick not found error when I try to run a script that uses Imagick . Current Versions : .. . .. . Windows 7 x64 .. . Apache 2.4.10 x86 VC11 from Apachelounge .. . PHP 5.6.3 x86 VC11 TS from windows.php.net .. . ImageMagick 6.9.0-0 Q16 x86 from imagemagick.org .. . Imagick DLL php imagick-3.1.2-5.6-ts-vc11-x86.zip from here http : windows.php.net downloads pecl releases imagick 3.1.2 .. . .. . I was running an older version of PHP and had Imagick working fine with that then I updated PHP and the Imagick DLLs along with it and now I can t seem to get it to work . Looking at phpinfo I don t see Imagick listed there so it doesn t seem to be loading the module at all . Which is weird because I m not getting any errors when starting Apache . I ve tried just about every write-up and walkthrough for installing Imagick for PHP on Windows but they seem to all be written for older versions of PHP . Can somebody help me get this installed and running It seems like it s just missing one simple step that I can t seem to figure out . If you need any more info please ask . I ll get you whatever I can to help . .. . Answer : Another solution that worked on 3 different windows installations 2 Windows 7 and 1 Windows 8.1 is to combine : .. . .. . ImageMagick-6.7.9-10-Q16-windows.exe with .. . .. . xampp-win32-1.8.3-5-VC11-installer.exe . Of course you will have to add the php imagick.dll to the php ext folder and also add extension php imagick.dll to php.ini . Restart apache after you do all of the above and if it complains about missing stuff restart your computer . Comment : Do note that you may have permission issues if installing ImageMagick in Program Files . The instructions I provided are synonymous with these . I tested with xampp wamp as well . Just match the x64 or x86 of ImageMagick and PECL extension versions with the architecture and version of PHP you installed . The main issue is that ImageMagick does not archive its binary releases . So it makes ImageMagick difficult to match up with past versions of PHP and the PECL extension .", "Question : I m trying to convert a RGB .gif to a CMYK .gif using IMagick PHP module . I ve wrote this piece of code .. . .. . But the resultant mosaique-cmyk.gif still a RGB.. . but with inverted colors O O .. . .. . What am I doing wrong EDIT : .. . .. . I ve tried with a .jpg and the image is converted to CMYK but it stills in negative . EDIT 2 : .. . .. . I ve tried to run my script making a .pdf on another server and it works fine . Are there any known bug in IMagick Are there some options to set in the php5 library The version that returns me the inverted image is newer than the one that works correctly .. . .. . WRONG RESULT PHP 5.3.3 IMagick 3.0.0RC1 ImageMagick 6.6.2 .. . .. . CORRECT RESULT PHP 5.2.10 IMagick 2.1.1 ImageMagick 6.5.1 .. . Answer : Try this :", "Question : I am trying to use iMagick in Symfony2 . I am using PHP 5.4.16 and all i have done : .. . .. . 1-Copy php imagick nts.dll from php5-4 directory from the extracted http : valokuva.org mikko imagick-php54-php53.tgz to php ext . 2-Rename it to php imagick.dll and add the extension php imagick.dll to php.ini .. . .. . 3-Create a page like this : .. . .. . but i receive this : .. . .. . When I tried to use this in a symfony controller the error occur again : .. . .. . Unfortunately the details about imagick extension not appear in output of phpinfo .. . .. . Is this version is incompatible with PHP 5.4.16 If yes what version i must use Where Thank for any help.. . Comment : Did you restart the server and PHP before trying .. . Answer : Sorry for my bad english : .. . .. . 1 Install Appserv .. . .. . Filename : appserv-win32-2.5.10.exe .. . .. . URL download : h ttp : www.appservnetwork.com without .. . .. . Apache port : 8080 .. . .. . 2 Download PHP 5.3 Apache 2.2 doesn t support superior .. . .. . Filename : php-5.3.29-Win32-VC9-x86.zip .. . .. . How : Thread Safe .. . .. . URL Download : h ttp : windows.php.net download php-5.6 without .. . .. . 3 Stop Apache .. . .. . 4 Delete all contents in the folder . . AppServ php5 .. . .. . 5 Copy the zip contents to . . AppServ php5 .. . .. . 6 Add line .. . .. . date.timezone America Buenos Aires This is my zone find yours in php page .. . .. . to the php.ini in c : Windows php.ini .. . .. . to avoid date error in PHP .. . .. . 7 Start Apache .. . .. . .. . .. . IMAGIC Once PHP 5.3 is installed .. . .. . 1 Instal Image magic 6.7 Not superior PHP 5.3 doesn t support .. . .. . Filename : ImageMagick-6.7.9-9-Q16-windows-dll.exe .. . .. . URL download : http : ftp.sunet.se pub multimedia graphics ImageMagick binaries .. . .. . 2 Download Imagic .. . .. . Filename : php imagick-3.1.2-5.3-ts-vc9-x86.zip .. . .. . URL download : http : windows.php.net downloads pecl releases imagick 3.1.2 .. . .. . 3 In the dir php5 ext add the file php imagick.dll from the last zip download other files doesn t care .. . .. . 4 Add line .. . .. . extension php imagick.dll .. . .. . to the php.ini in c : Windows php.ini .. . .. . 5 Restart Apache" ] }
[ "yes-answer-long", "yes-answer-short" ]
imagemagick
UNK_RELATION
html2pdf@php4@60
html2pdf -- html2pdf is a html to pdf converter written in @placeholder use fpdf and php5 use tcpdf .it allows the conversion of valid html 4.01 in pdf format .
{ "confidence": [ 65.18782043457031, 59.50843811035156, 55.70387268066406, 55.70387268066406, 54.741371154785156, 54.46562194824219, 54.46562194824219, 54.46562194824219, 54.46562194824219, 53.853248596191406, 52.99967956542969, 52.417091369628906, 51.59026336669922, 51.433597564697266, 51.042015075683594, 50.97182083129883, 49.35369110107422, 48.38299560546875, 48.27281188964844, 48.02716064453125, 47.93462371826172, 47.55905532836914, 47.426170349121094, 46.33396911621094, 45.89704895019531, 45.56953811645508, 45.28626251220703, 44.960453033447266, 44.27719497680664, 42.75313186645508, 42.75313186645508, 42.75313186645508, 42.48802185058594, 42.142601013183594, 42.07686996459961, 41.78764724731445, 41.660926818847656, 41.660926818847656, 41.660926818847656, 41.660926818847656, 41.63240432739258, 41.63240432739258, 41.10392379760742, 40.98466873168945, 40.98466873168945, 40.98466873168945, 40.539058685302734, 40.19671630859375, 40.08678436279297, 39.905860900878906, 39.853126525878906, 39.643585205078125, 39.643585205078125, 39.643585205078125, 39.525245666503906, 38.87016677856445, 38.5513801574707, 38.5513801574707, 38.5513801574707, 38.37862014770508, 38.37862014770508, 37.79547882080078, 37.546875, 37.546875, 37.48387908935547, 37.3668098449707, 37.242347717285156, 36.961280822753906, 36.7720832824707, 36.347557067871094, 36.347557067871094, 36.347557067871094, 36.23783874511719, 36.16579055786133, 35.86907958984375, 35.86907958984375, 35.86907958984375, 35.50515365600586, 35.50515365600586, 35.30039978027344, 35.25535583496094, 35.25535583496094, 35.25535583496094, 35.25535583496094, 35.25535583496094, 35.25535583496094, 35.25535583496094, 35.25535583496094, 35.25535583496094, 34.876102447509766, 34.60408020019531, 34.56004333496094, 34.31618118286133, 33.971885681152344, 33.971885681152344, 33.971885681152344, 33.946319580078125, 33.54250717163086, 33.5167121887207, 33.511878967285156 ], "content": [ "I m using fpdf and html2pdf for the generation of the PDF document .", "I am using html2pdf to convert HTML to PDF as shown in the below code .", "I would like to convert html file into pdf format using online tools or html2pdf library .", "I made a html page and then I converted to PDF format through the library html2pdf .", "So html2pdf is based on tcpdf but they are a little bit different : html2pdf https : github.com spipu html2pdf does not support Chinese language .", "I am using HTML2PDF for export data in PDF", "I am using html2pdf to create PDF-documents .", "I m using html2pdf bundle to generate pdf File .", "I try to generate a PDF with HTML2PDF on a symfony2 project .", "Can you post additional code of html2pdf - TCPDF you use .", "I am using html2pdf based on TCPDF but : .. . .. . 1 .", "Here is an example html2pdf tcpdf example https : github.com iafan html2pdf blob master tcpdf 5.9.206 examples example 003.php .", "sorry now i change pdf creation fpdf to html2pdf because it was simple to make a pdf .That is the reason for i am asking second time", "I tried with html2pdf pdfcrowd and tcpdf tools to generate pdf but all pdfs are getting generated without tags .", "I am trying to generate a PDF from an HTML File using the HTML2PDF library .", "html2pdf requires properly formatted html or it gives this error .", "i am currently using html2pdf library in php for converting html page to pdf it create pdf properly but google label in non clickable mode", "I m trying to save a pdf file using the html2pdf PHP class .", "i am using html2pdf to convert html to pdf.. . actually i have a large size of html container like 12x12in inches .", "I m trying to create an HTML page with php and convert it through the html2pdf library .", "Try to use DomPdf instead of html2pdf .", "I am unable to find way of adding header and footer in pdf page using phantom-html2pdf https : www.npmjs.com package phantom-html2pdf with Express and Coffeescript .", "I got the html2pdf http : html2pdf.fr en default yii-PDF http : www.yiiframework.com extension pdf . .", "So I realized that since I m doing response pdf I assigned html2pdf- Output S to pdf .", "I am trying to include a custom font to my laravel-5 project which I would use to generate a PDF document with HTML2PDF composer package : ensepar html2pdf : 4.0.6 .", "I think that it has somthing to do with the html2pdf extension of fpdf .", "I m using Html2pdf https : github.com spipu html2pdf and facing strange issue : .. . .. .", "There are many PHP scripts that use the name html2pdf .", "Thanks for your initiative @PeterDarmis...actually the examples you are checking is just of TCPDF but if you google there is a difference between core TCPDF and html2pdf - TCPDF .", "I am using HTML2PDF library and I am getting an issue while I am trying to to output my pdf .", "I am getting an issue with HTML2PDF when I am trying to generate my PDF .", "html2pdf ignore the extern files You must do write your css in your pdf thanks to : css", "when i try to generate a pdf with html2pdf it gives this error : ERROR It seems that HTML2PDF dependencies are not installed.. . you must install thems with composer install what should i do", "In the latest version of Winovative HTML to PDF converter you can add now headers and footers in external PDF documents appeneded or prepended to the result-of conversion .", "In which framework are you using Html2PDF .", "Hello I m new to yii so currently don t know how to properly use this Html2pdf yii-pdf extension in yii to get the pdf. . .. . .. . What i actually want. .", "public fonts cambria.ttf cambria html2pdf- pdf- addTTFfont cambria path TrueTypeUnicode 32 .. . .. . but it says Call to undefined method HTML2PDF myPdf : : addTTFfont .", "However if pdf html2pdf- Output output path F the browser does not display the file but downloads it nevertheless .", "And since I need to download the file I just did html2pdf- Output output path F without assigning this to pdf .", "I am trying to export my graphs generated by Highcharts to a pdf report by using HTML2PDF .", "I understood that HTML2PDF doesn t manage well javascript and the solution can be to save your generated graphic as image and use these images to generate the pdf .", "I m trying to use HTML2PDF 4.03 with this code : .. . .. . Now the program die with this : .. . .. . How can I add TTF font to my PDF file", "But when I try this : html2pdf- setDefaultFont OpenSans html2pdf- addFont francoisone francoisone I can t use font-family : francoisone in my css .", "I am using html2pdf in yii .", "i am using html2pdf class. .", "Let s say : html2pdf- setDefaultFont francoisone .", "I have a problem using Winnovative Html to Pdf Converter v8.0.0.0 my pdf page number are not correct .", "I did a test with a simple HTML page and my css works but as soon as I put it with HTML2PDF it doesn t work .", "I need to write a tabular text in pdf using html2pdf like that .. . .. . I get an example from https : github.com iafan html2pdf blob master tcpdf 5.9.206 examples example 018.php But that seems work for page wise page .", "Please see here.. . html2pdf new HTML2PDF P A4 en false ISO-8859-15 array 0 0 0 0", "The problem with trying to use a PDF as a template is that PDF is a typeset document format .", "HTML2PDF just by the looks of it looks quite old .", "Are there any coding standards and UI limitations in html2pdf", "Adding that line fixed image overlap issue in HTML2PDF .", "TCPDF is a further developed version of FPDF .", "Afterwards you just have to add the line html2pdf- setDefaultFont javiergb to your html2pdf set up as following : .. . .. . You can look my fork : https : github.com cychai html2pdf", "I m trying to convert html2pdf from pisa utility .", "I am using HTML2PDF with Laravel 5.1 .", "Check the webserver logs for any html2pdf-related errors .", "I found 2 code resources that look like doing exactly what I need : .. . .. . .. . For creating a PDF using html2pdf library .. . .. . For sending the email with a PDF attachment .", "i am created Pdf using Html2pdf i don t know how to save and retrieve pdf i am new in php please help me thanks in advance", "i know it is work only html pages not in html2pdf thats why i am asking question here", "I don t know if this is the best solution but this works : .. . .. . I noticed that when pdf html2pdf- Output S the browser displays the file but does not download the file .", "I also should point that this is the first time I used HTML2PDF or any PDF generation class so I hope somebody has a clue.. .", "This variable contenu is html code that I want to be convert in html in the pdf .", "I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow .", "Actually using wordwrap is the only way for HTML2PDF these days.. .", "you can generate PDF and HTML from markdown", "I am trying to use html2pdf.php http : fpdf.org en script script42.php and fpdf version 1.8 http : www.fpdf.org to display the image in pdf format .", "Do you have any idea how to perform it zith HTML2PDF .", "This code is good for html2pdf : style .demipage height : 48 style img src .", "@AnkitGupta Did you test it using Html2Pdf or just browser rendered table", "What I d like to do now is save the output of my php to a variable which I can then pass to html2pdf for pdf-generation .", "And are the only showing up in the PDF or both the PDF and the HTML file", "Why the html PDF render output like that", "Tagged PDF has no relation to HTML tags .", "I want to convert a HTML report to PDF with CSS .", "From reading other answers the best free way of doing this seemed to be to use html2pdf http : html2pdf.fr en default .", "With that being said HTML2PDF will not load this font when I use it in my script seen below .", "I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling .", "I am not using this library but are you setting your encoding in the HTML2PDF constructor", "Also : try to write this : ob end clean before this line : html2pdf- Output username .", "Are you using the normal PHP version of HTML2PDF or a Yii extension", "thanks for your proposal with 100 records but i guess that s not working in html2pdf", "I went to vendor spipu html2pdf to look for such directory but found nothing .", "public fonts cambria.php html2pdf- addFont cambria cambria path .. . .. . However this does not work .", "Here my problem I m using html2pdf in php in order to generate a letter .", "Justify doesn t work perfectly for me even in html2pdf v4.6.0 .", "Then you copy this file to the html2pdf tcpdf5.xxxx fonts directory .", "For some reason the HTML2PDF TCPDF is not rendering the PDF.. . and I have no idea why.. . : S .. . .. . render.php main file http : pastebin.com 6FEqd9Vf .. . .. . form.php http : pastebin.com 7y1ed8Y0 .. . .. . The links will lead you to the code im trying to use so you can test it you will only need the HTML2PDF Class .. . .. . can somebody tell me why the form isn t rendering", "I tried to fit html2pdf new HTML2PDF L A4 fr true UTF-8 0 in Landscape mode and .tbl width : 842pt but my table content is overflowing out of page", "I want to convert HTML pages to PDF .", "use TCPDF you can create the PDF template using HTML tags principles it is fast to create easy to use easy to integrate I used it for generating detailed invoices of a law office multiple pages with different format the production envelope of a jewellery workshop included photo stock notes and invoices .", "there are no spaces so it wont wrap the css support on any html to pdf is not great", "On my HTML page it works but as soon as I generate the PDF text is not aligned .", "There is a script which generates a huge PDF from HTML content .", "I want to add little bit of own experience with HTML2PDF and tables .", "When I use wkhtmltopdf directly it runs perfectly fine and converts the HTML into a PDF document .", "When using Pisa to render an HTML page to PDF the images in said HTML go conspicuously missing .", "Here is the solution for this problem : .. . .. . html2pdf new HTML2PDF P array width in mm height in mm en true UTF-8 array 0 0 0 0 .. . .. . Width and Height should be in MM ." ] }
{ "confidence": [ 81.96489715576172, 77.73435974121094, 76.63595581054688, 76.45980834960938, 75.32646179199219, 72.7075424194336, 72.1835708618164, 70.45536804199219, 70.45063781738281, 69.9971694946289, 69.9537582397461, 69.84489440917969, 69.11530303955078, 69.07382202148438, 69.00498962402344, 68.53076171875, 68.2061538696289, 67.53846740722656, 67.42329406738281, 67.38629150390625 ], "content": [ "Question : null .. . Answer : I am using html2pdf based on TCPDF but : .. . .. . 1 . Content is overlapping fixed header and footer . Is there any way to set page so that header content and footer will not overlap 2 . If a table exceeds the page height the whole table shifts to next page . I want only the part that does not fit the page to overflow to the next page . 3 . Are there any coding standards and UI limitations in html2pdf Comment : Can you post additional code of html2pdf - TCPDF you use . Comment : In this TCPDF example tcpdf.org examples example 048.phps http : www.tcpdf.org examples example 048.phps view example PDF here tcpdf.org examples example 048.pdf http : www.tcpdf.org examples example 048.pdf the 4rth table is split in two pages by default Comment : Thanks for your initiative @PeterDarmis...actually the examples you are checking is just of TCPDF but if you google there is a difference between core TCPDF and html2pdf - TCPDF . Comment : Why not just use markdown you can generate PDF and HTML from markdown Comment : Show what you have till now", "Question : I m trying to use HTML2PDF 4.03 with this code : .. . .. . Now the program die with this : .. . .. . How can I add TTF font to my PDF file .. . Answer : I have managed to add 1 custom font to my setup using the following method . First convert the .ttf file to 3 separate files .php .z and .ufm using the following font converter http : www.xml-convert.com en convert-tff-font-to-afm-pfa-fpdf-tcpdf Place the 3 files that are generated by this system into the fonts folder in TCPDF . Now you can set the default font for your PDF using the following command .. . .. . This was fairly simple to get working I am having issues using 2 seperate fonts though via this method . I ll figure it out though", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : Here is some example how to create multiple pages with one PDF template and content as HTML . Based on MPDF library .", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : use TCPDF you can create the PDF template using HTML tags principles it is fast to create easy to use easy to integrate I used it for generating detailed invoices of a law office multiple pages with different format the production envelope of a jewellery workshop included photo stock notes and invoices . TCPD examples http : www.tcpdf.org examples", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : Take a look at http : template2pdf.com It provides an API that allows you to use OpenOffice or LibreOffice templates and do substitution of text or images .", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : You can skip all the pain of defining template over existing PDF with https : github.com applicius dhek releases . It creates a JSON mapping area over PDF page coordinates so that you can fill it with PDF API you prefer .", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : http : www.livedocx.com .. . .. . LiveDocx is a template-based document creation platform . http : www.phplivedocx.org articles getting-started-with-phplivedocx", "Question : i am using html2pdf to convert html to pdf.. . actually i have a large size of html container like 12x12in inches . and i have used A4 size for the first time then my html content not showing completely till as per the size 12x12 in then i have look into your site and i found all paper size here. . thanks for that important info.. . but now when i have used A3 size i have found my all html content inside the pdf file....but there are so much space at the bottom of my contents in pdf.. . So i want to know.. . IS there any way to reduce this space from the pdf or any other way to convert html to pdf with manually defined page height and width.. . Thanks in Advance . Comment : There are many PHP scripts that use the name html2pdf . Which one are you talking about Comment : i am using html2pdf class. . Comment : here is a link of that html2pdf.fr en example http : html2pdf.fr en example .. . Answer : The constructor of the HTML2PDF class says that the format parameter is the same as in the tcpdf class . The constructor of the tcpdf class says about the format parameter : .. . .. . @param mixed format The format used for pages . It can be either one of the following values case insensitive or a custom format in the form of a two-element array containing the width and the height expressed in the unit given by unit .. . .. . .. . With a little bit of calculation this make it possible to set the page-size to 12 x 12 . The default unit is millimeters . Comment : Actually i am totally confused.. . should i pass the size value like 12 12 in-place of A4.. . Please see here.. . html2pdf new HTML2PDF P A4 en false ISO-8859-15 array 0 0 0 0 Comment : OMG.. . Thanks a lot .. . i just convert inches to mm and pass in array and its works fine... . Thank you very much.. . i was getting upset but this solution solve my one problem.. . thank u very again.. .", "Question : I am starting a new thread for this one will try to be as specific as possible . This is a portion of an app for our sales people that allows them to customize a page with their contact information after they hit submit a PDF page is created which is then attached to the end of a larger document . The first page of the document is also dynamically created from the same form that they fill out . After they press submit 2 PDF files are created a front page and a back page then both pages are attached to a larger document creating a single report . Everything works great unless they enter Chinese characters then all I get is garbage characters like this - . The document still looks like this even before it is merged with the larger document . I have tried every possible scenario it seems from using a Unicode font to using my own created font and one by one trying each of the fonts in the TCPDF folder . I am at a total loss and have been for some time now . I feel like I have been on just about every website that mentions TCPDF . Here is the code that creates the back page back to the basic commands I started with . I am hoping it is a simple command down here that I am missing : .. . .. . And for what it is worth running a Centos 5.5 server to create the documents . Thank you in advance . .. . .. . After doing some investigation on this issue with HTML2PDF I was told that the font arialuni.ttf should support all of the characters I need . With that being said HTML2PDF will not load this font when I use it in my script seen below . All I can think is that the syntax is not 100 correct . I have ran the tt2fm and makefont to get the files but do not feel that those routines were a 100 successful . Please help - I have been working on this thing off and on for months . I am almost ready to just scrap it and hit the door . Thank you . Comment : Does the font need to be installed and changed .. . Answer : So html2pdf is based on tcpdf but they are a little bit different : html2pdf https : github.com spipu html2pdf does not support Chinese language . However you can get the javiergb.php from the include directory tcpdf fonts . Then you copy this file to the html2pdf tcpdf5.xxxx fonts directory . Afterwards you just have to add the line html2pdf- setDefaultFont javiergb to your html2pdf set up as following : .. . .. . You can look my fork : https : github.com cychai html2pdf", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : i really really really really recomend MPDF http : mpdf1.com .. . .. . 1 . is based on FPDF and HTML2FPDF so you can use some of their functions or add others .. . 2 . it have like tons of cool features create any kind of barcodes locale support watermarks and many more .. . 3 . it have an extremely well made documentation .. . 4 . it have a cool community forum .. . 5 . examples 6 . easy learning curve .. . .. . The only bad thing is that is a little heavy-weight but you can remove things that you dont need Comment : MPDF s site seems to have moved here : mpdf.github.io https : mpdf.github.io", "Question : i am created Pdf using Html2pdf i don t know how to save and retrieve pdf i am new in php please help me thanks in advance Comment : their documentation explains a lot . What do you really want . Are you stuck somewhere if yes plz show your code Comment : Duplicate of PDF created with FPDF and how to save and retrieve the pdf http : stackoverflow.com q 9437761 please do not repost questions read the advice on the original question instead where you already got answers . Comment : sorry now i change pdf creation fpdf to html2pdf because it was simple to make a pdf .That is the reason for i am asking second time .. . Answer : as you can see in example in html2pdf http : html2pdf.fr it example .. . .. . EDIT : with this you save on server . When you want pdf content you will get name from db and make what you need : Comment : i completed this one i want to save retrieve in to mysql database Comment : see edit pls :", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : The problem with trying to use a PDF as a template is that PDF is a typeset document format . Eg . it is a fixed layout and you shouldn t really mess with the layout too much . It would be much simpler if you want to do more with this to use something like XSL-FO to generate your documents from an XML template . All you need do is generate the XML with the right fields in-place and the XSL-FO renderer can then create the PDF for you . The best only free XSL-FO renderer is Apache FOP .", "Question : I m trying to use HTML2PDF 4.03 with this code : .. . .. . Now the program die with this : .. . .. . How can I add TTF font to my PDF file .. . Answer : If you want to add multiple fonts just use : .. . .. . I would suggest that you don t use special chars with the font converter specified above . Then in your CSS simply type : Comment : I tried it but it does not work . I have two font in my tcpdf fonts folder . Both work when I add them as default . Let s say : html2pdf- setDefaultFont francoisone . But when I try this : html2pdf- setDefaultFont OpenSans html2pdf- addFont francoisone francoisone I can t use font-family : francoisone in my css . Is there something wrong with my setup Comment : You have converted your fonts right Comment : Yes I convertet FrancoisOne.ttf to francoisone.afm francoisone.php francoisone.z . And it works as DefaultFont . But not as addFont when called via CSS h1 h2 h3 h4 font-family : francoisone", "Question : i am using html2pdf to convert html to pdf.. . actually i have a large size of html container like 12x12in inches . and i have used A4 size for the first time then my html content not showing completely till as per the size 12x12 in then i have look into your site and i found all paper size here. . thanks for that important info.. . but now when i have used A3 size i have found my all html content inside the pdf file....but there are so much space at the bottom of my contents in pdf.. . So i want to know.. . IS there any way to reduce this space from the pdf or any other way to convert html to pdf with manually defined page height and width.. . Thanks in Advance . Comment : There are many PHP scripts that use the name html2pdf . Which one are you talking about Comment : i am using html2pdf class. . Comment : here is a link of that html2pdf.fr en example http : html2pdf.fr en example .. . Answer : Here is the solution for this problem : .. . .. . html2pdf new HTML2PDF P array width in mm height in mm en true UTF-8 array 0 0 0 0 .. . .. . Width and Height should be in MM . If your using inches convert it to MM . Formula : width in mm width in inches 25.4 height in mm height in inches 25.4 .. . .. . Don t round it off . Used the exact conversion even if it has a decimal point . Hope this answer will solve your problem .", "Question : I have a PHP application that needs to generate html to PDF with Tags . I tried with html2pdf pdfcrowd and tcpdf tools to generate pdf but all pdfs are getting generated without tags . After generating the pdf if i check the properties it always says that pdfs are without tags Tagged pdf no though i used all HTML Tags . for sample tagged-pdf check the below link . This tags will be useful the blinds who uses screen reader tool . http : www.pdf-accessibility.com turnkey-solution see-an-example-of-an-accessible-pdf - .. . Answer : Tagged PDF has no relation to HTML tags . You will need to find a PDF generator with explicit support for Tagged PDF . I believe most PDF generators do not support it . Additionally you will need to feed it an input document that is semantically rich enough . I m not sure HTML qualifies for this .", "Question : null .. . Answer : I try to generate a PDF with HTML2PDF on a symfony2 project . I prepared a pdf.html.twig file that contains the code that I need to generate in PDF . This file particularly contain a variable contenu . This variable contenu is html code that I want to be convert in html in the pdf . So I use a raw twig filter to do that . But although the PDF just works fine without the raw filter it returns an error that I am not able to understand when I add the filter.. . If somebody has an idea that could help it would be such a relief.. . .. . .. . pdf.html.twig : .. . .. . The code that generate the pdf in the controller : .. . .. . The kind of code that will be contained in the contenu variable : .. . .. . The error I obtain when using the raw filter : .. . .. . Error : Maximum execution-time of 30 seconds exceeded .. . .. . Stack Trace in vendor html2pdf lib Html2Pdf src tcpdf tcpdf.php at line 5844", "Question : For some reason the HTML2PDF TCPDF is not rendering the PDF.. . and I have no idea why.. . : S .. . .. . render.php main file http : pastebin.com 6FEqd9Vf .. . .. . form.php http : pastebin.com 7y1ed8Y0 .. . .. . The links will lead you to the code im trying to use so you can test it you will only need the HTML2PDF Class .. . .. . can somebody tell me why the form isn t rendering I m freaking out thanx in advance Comment : Any particular error you encountered Comment : the funny thing is that there is no error catch from the class and neither from php or apache . thats the thing that s freaking me out . I also should point that this is the first time I used HTML2PDF or any PDF generation class so I hope somebody has a clue.. . .. . Answer : Check the webserver logs for any html2pdf-related errors . If you re using apache command will look like this : .. . .. . Updated my answer since if pdf gets rendered but is empty it s not a permission issue . Comment : BluesRockAddict have you checked the files There is no problem with the permissions when I take out the HTML form it renders the pdf empty Comment : html2pdf- writeHTML content isset GET vuehtml - looks like the correct name is WriteHTML i.e . with capital W . Comment : I changed it but it didnt make any change . : S Comment : Do you see any errors in the log Comment : no thats freaking strange.. . no errors of any kind just wont render .", "Question : For some reason the HTML2PDF TCPDF is not rendering the PDF.. . and I have no idea why.. . : S .. . .. . render.php main file http : pastebin.com 6FEqd9Vf .. . .. . form.php http : pastebin.com 7y1ed8Y0 .. . .. . The links will lead you to the code im trying to use so you can test it you will only need the HTML2PDF Class .. . .. . can somebody tell me why the form isn t rendering I m freaking out thanx in advance Comment : Any particular error you encountered Comment : the funny thing is that there is no error catch from the class and neither from php or apache . thats the thing that s freaking me out . I also should point that this is the first time I used HTML2PDF or any PDF generation class so I hope somebody has a clue.. . .. . Answer : The answer was the execution-time . Solved it by using the set time limit function .", "Question : I have a docx document file set up with formating and layout which I saved as a PDF file . I want to use this pdf file as a template for creating new pdf files pre-filled with user data . I have seen FPDF http : www.fpdf.org FPDI http : www.setasign.de products pdf-php-solutions fpdi tcPDF http : www.tcpdf.org domPDF http : code.google.com p dompdf Zend PDF http : framework.zend.com manual en zend.pdf.html http : koivi.com fill-pdf-form-fields Justin Koivisto a few convertion tools like HTML2PDF http : html2pdf.fr en default and a few command-line tools mentioned here on stackoverflow . With the exception of FPDI http : www.setasign.de products pdf-php-solutions fpdi none of them offer an example using a PDF template to either search-and-replace custom tags with actual data usually from a database or add data without specifying a bunch of values like x y postion font font-formating etc . Creating a PDF from scratch seems like too much work . I have not yet considered using a HTML2PDF http : html2pdf.fr en default converter as the results appear to vary greatly and then there is the issue with styling . Some tools allow CSS but often with limits like no float support . Are there no easy way of using a template like there is for Excel with PHPExcel http : phpexcel.codeplex.com My need is : .. . .. . Free .. . Load and use a template .. . Search-and-replace custom tags .. . Add data text image font formating etc .. . Custom header and footer .. . Must work with shared-hosting .. . Allow download save store to server and attach to email preferable without having to save it first of final generated PDF Comment : it will be great if you create such tool Comment : Guys from actualreports.com have created something like that but they charge for their service . .. . Answer : try FPDI http : www.setasign.de products pdf-php-solutions fpdi it support editing an existing template and making changes in that template file .. . .. . usage is pretty stratight forward : .. . .. . Also refer to links below : Is there a solution for pdf template in PHP http : stackoverflow.com questions 2849103 is-there-a-solution-for-pdf-template-in-php .. . .. . Writing Drawing over a PDF template document in PHP http : stackoverflow.com questions 4299315 writing-drawing-over-a-pdf-template-document-in-php", "Question : null .. . Answer : I am using HTML2PDF in Laravel 5.1 and I need to add two fonts . I ve tried searching for answers but they don t work for me whenever I try them . I have tried the following based on searches : .. . .. . Go to http : www.fpdf.org makefont to generate .php and .zip files of my fonts .. . I found a thread that said to put the files in html2pdf tcpdf 5.0.002 fonts because it s the default directory for fonts in FPDF . I went to vendor spipu html2pdf to look for such directory but found nothing . So I just placed the generated files in public fonts as well as the .ttf files . I also added the following to my code : cambria path base path . public fonts cambria.php html2pdf- addFont cambria cambria path .. . .. . However this does not work . This is the error that shows up : TCPDF ERROR : Could not include font definition file : cambria .. . .. . I also tried this one : cambria path base path . public fonts cambria.ttf cambria html2pdf- pdf- addTTFfont cambria path TrueTypeUnicode 32 .. . .. . but it says Call to undefined method HTML2PDF myPdf : : addTTFfont . What am I doing wrong and how do I add at least one font it would be better if I can add at least two though Thank you in advance . Comment : Have you tried a webfont version Comment : @ceejayoz I haven t tried it . Is it much easier if I do that I need to add Calibri at least to my pdf . Comment : I can t promise it s easier nor that it s supported . Might be worth a shot if you don t make any headway on the font loading though . Comment : I m not sure if this will work for you but you could try stackoverflow.com a 29618412 1739852 http : stackoverflow.com a 29618412 1739852" ] }
[ "yes-answer-long", "yes-answer-short" ]
php4
UNK_RELATION
cloudberry@cloudberry@124
cloudberry -- cloudberry is a company that provides products relating to cloud-storage systems including cloudberry backup @placeholder explorer and cloudberry drive .
{ "confidence": [ 89.44721984863281, 85.45913696289062, 76.77052307128906, 75.11939239501953, 74.27943420410156, 68.91647338867188, 67.95743560791016, 65.51676177978516, 59.39088439941406, 58.459251403808594, 58.43156433105469, 52.569908142089844, 52.569908142089844, 49.17748260498047, 34.17169189453125, 26.235923767089844, 23.28315544128418, 23.18553924560547, 22.79188346862793, 22.629806518554688, 21.744842529296875, 20.4617919921875, 20.225297927856445, 19.52324867248535, 18.672868728637695, 18.471851348876953, 18.398591995239258, 17.720413208007812, 15.289377212524414, 15.072134017944336, 15.072134017944336, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.888416290283203, 14.445663452148438, 13.880090713500977, 13.880090713500977, 13.150535583496094, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.920770645141602, 12.333406448364258, 12.333406448364258, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965, 11.615424156188965 ], "content": [ "What is your CloudBerry Explorer version", "Could it be that Cloudberry Explorer is setting the MD5 incorrectly", "The method we used to upload the files was via a Cloudberry Drive mapped-drive .", "@Evgeny I am using Cloudberry Freeware 4.7", "So far I have regressed to Freeware Cloudberry Windows Client http : www.cloudberrylab.com blog how-to-manage-amazon-s3-versioning-with-cloudberry-explorer to achieve this .", "I use CloudBerry Explorer for Azure Blob Storage to manage my containers files and folders .", "After generating SAS for an Azure Storage Container when using it in Cloudberry or Azure Storage explorer tool a base64 error is shown .", "My question is can a Shared Access Signature for a container be used in client tools like Cloudberry or Azure Storage explorer", "The reason Cloudberry does not keep track of it is because Azure Blob Storage does not support this header on a blob .", "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 .", "If I am programmatically uploading an archive to Amazon Glacier how can I upload it so it has a filepath and filename in Cloudberry", "However when I upload files to glacier via client tools like Cloudberry then my uploads do have a path structure .", "I think I ve been able to upload archives fine though I haven t been able to see them in Cloudberry yet .", "But others come up with this error from the web browsers : .. . .. . Error : Code BlobNotFound .. . .. . When an image fails with BlobNotFound I am able to browse to the CloudBerry drive path and see the image file just fine .", "Setting Access-Control-Allow-Origin : was one of the early things I tried but Cloudberry does not keep the setting no matter what I enter - I m able to enter and save it but then when I check back that header does not appear .", "why Azure cloud-storage explorer providers do not offer SAS for more fine-granular access stories", "E.g . c : myfolder myfile.txt for file copied from local disk or mybucket myfolder myfile.txt for files copied from cloud-storage like Amazon S3 .", "However when I can t get setting Access-Control-Allow-Origin : or Access-Control-Allow-Origin : .attendedstorage.com working with below tools : .. . .. . Per http : cropme.ru 546c699f8a1264994c18a624eeaa5060 - Cerebrata AMS - set CORS but does not have http header available for setting Access-Control-Allow-Origin : http : cropme.ru 20ac02af8b883e7cf09f4f076e137770 .. . .. . Per http : cropme.ru f95fbbcf94c26b65f48163ee4dc98194 - Zudio - cannot set Access-Control-Allow-Origin : Per http : cropme.ru bad39b334aad865a20ac016f981038be - Cloudberry - allows to set Access-Control-Allow-Origin : but does not keep it when you look if it registered .", "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 .", "But its just some of the files in my blob storage .", "Is it not azure blob storage internal that sets this property when files are uploaded", "They work perfectly fine when connecting through cloud-berry ui interface .", "i used Couldberry Explorer to upload the file in the first place .. . .. . gives this output .. . .. . Bad example the local files md5 is infact Hv+nQRNCPQnvy4WU9+qaQA .", "Have you tried wrapping the TestAutoSync backup in quotes and does the Select-CloudFolder cmdlet support input from the pipeline", "UPDATE : After getting it working I put the code I was using here in case a sample is needed : https : github.com fschwiet mysql-glacier-backup", "Is there a way of downloading a container and all of its content from Azure Blob Storage", "AFAIK all the client tools today support managing storage accounts using account name key with the exception of ClumsyLeaf CloudXplorer http : clumsyleaf.com products cloudxplorer .", "@Persistent13 yes i have tried enclosing using quotes around TestAutoSync backup and as per the examples i have seen so far yes the Select-CloudFolder cmdlet support input from the pipeline", "I believe it can do a full bucket delete including versioned files but that s the extent of its support for versioned files .", "Azure Blob Storage does support Access-Control-Allow-Origin : .", "Awesome Gaurav you really deserve an Azure Storage MVP .", "Give the following code and output i get the same exception for this file each time i try to download it .", "If I download it without md5 validation and check the content there is nothing wrong with the file so I am suspecting that the md5 property value is incorrect on the blobs metadata .", "I am trying to figure out how it could become invalid in the first place .", "I dont want to DisableContentMD5Validation as a solution .", "ps .", "Conclussion the property must be set wrong at some point .", "Solution .", "Download and calculate md5 and update property value of the blob .", "maybe .", "updating question with some interesting info .", "2sec", "Can you explain why when downloading the file and calculates the MD5 its matches the one stored in headers but it still fails when not having disabled validation", "How big is the file", "I might try it on my end as well using a file of approximately that size .", "5360557 bytes .", "Others works fine .", "however I faced the same issue last week while uploading my content blob to cloud directly from JavaScript .", "Also the CORS settings are applied on the entire blob storage account and not just one blob or container .", "Only thing is that you can t set it on a blob-by-blob basis its done at blob storage level .", "Regarding to the parent of track element does not have a crossorigin attribute . issue it does not refer to azure blob storage but to the HTML file where you load the tracks .", "Amazon Glacier does not have the concept of filepaths .", "I think I may need add something to the x-amz-archive-description field here http : docs.aws.amazon.com amazonglacier latest dev api-archive-post.html but I do not know how to format it .", "I am using the Amazon Javascript SDK : http : docs.aws.amazon.com AWSJavaScriptSDK guide examples.html .", "Our Glacier archive description metadata is a simple JSON with the following fields : .. . .. . Path : the full path of the source file .", "The path is UTF7-encoded .", "UTCDateModified : ISO8601 utc date without milliseconds format : yyyyMMddTHHmmssZ .", "This is modification date of the original file not the archive creation date .", "Flags : integer flags value .", "1 - compressed 2 - encrypted .", "Thanks Andy", "This worked .", "I did try to use fully iso8601 dates that include : and - characters .", "I had to remove these to get things to work where they then do match yyyyMMddTHHmmssZ", "I ve been zipping the tree up for ease of restore and storing all the tree info in the archive .", "Thus photos 2012.zip or whatever .", "The long list of files just wasn t working for me from an ease-of-checking-things-were-cactually-backed-up perspective .", "It s more costly to restore because I ll have to pull a whole tree down but given that my goal is never to need this archive I m OK with that .", "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", "This question appears to belong on Super User http : superuser.com .", "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.. .", "I am trying to auto sync between amazon-s3 bucket and a local folder .", "But when i run the command : .. . .. . I am getting the below error : .. . .. . The bucket TestAutoSync does exist in my s3 account and i have cross verified the key and secret .", "Below is the complete code executed till the above statement .. . .. . Please provide your opinions if you have worked around such scenarios earlier .", "Ok here you go .. . .. . Get-CloudS3Connection should contain host path request style setting that should help you", "Please do the following .", "Before your line Get-CloudS3Connection inject this : .. . .. . So your full code should be something like the below", "thanks @Evgeny but adding -PathStyle did not change anything .", "I still get the same error.. .", "From the documentation page http : msdn.microsoft.com en-us library dn535601.aspx : .. . .. . AllowedOrigins : The origin domains that are permitted to make a request against the storage service via CORS .", "So if Azure Blob Storage does not support Access-Control-Allow-Origin : does this mean that I cannot have the WebVTT track in an Azure Blob where I have the mp4 video", "I have a container with over 100GB of data which I would like to download but cannot find a way of downloading the container only individualy files .", "If you want you can use AzCopy tool to download the entire blob container .", "Assuming you have latest version of Azure SDK installed you can find this tool in C : Program Files x86 Microsoft SDKs Azure AzCopy folder .", "You can try following command : .. . .. . Replace accountname containername folder path account key with appropriate values .", "We have a public Azure blob that contains over 300 000 image files .", "After uploading all the images and spot-checking them via https : ourazureaccount.blob.core.windows.net ourblob imagefile.jpg we are having intermittent problems .", "Some of the images load up from the web just fine .", "So I know the file-exists .", "Does anyone know why some images load fine from the web and others fail", "As you said that those are public blobs Could you please share a working and non-working returnin BlobNotFoun URL so we can check", "@J.T .", "Have you tested my proposed solution", "It looks like an URI characters problem post and review the urls the ones are working versus the others .", "If URL characters are the problems be careful with these and use instead the encoded value .. . .. . blank characters spaces tab etc .. . Special characters like theses the bold characters are the right encoded value should use if they appear : .. . + Indicates a space spaces cannot be used in a URL ." ] }
{ "confidence": [ 101.07518005371094, 87.02410888671875, 80.31863403320312, 80.19317626953125, 79.00057983398438, 78.5412368774414, 75.01801300048828, 73.88880920410156, 71.84382629394531, 71.04569244384766, 57.010902404785156, 40.26813888549805, 37.1346321105957 ], "content": [ "Question : After generating SAS for an Azure Storage Container when using it in Cloudberry or Azure Storage explorer tool a base64 error is shown . My question is can a Shared Access Signature for a container be used in client tools like Cloudberry or Azure Storage explorer .. . Answer : No . AFAIK all the client tools today support managing storage accounts using account name key with the exception of ClumsyLeaf CloudXplorer http : clumsyleaf.com products cloudxplorer . You can give that a try . Comment : Awesome Gaurav you really deserve an Azure Storage MVP . I would like to see a blog post on cloudportam.com why Azure cloud-storage explorer providers do not offer SAS for more fine-granular access stories", "Question : Amazon Glacier does not have the concept of filepaths . However when I upload files to glacier via client tools like Cloudberry then my uploads do have a path structure . If I am programmatically uploading an archive to Amazon Glacier how can I upload it so it has a filepath and filename in Cloudberry I think I may need add something to the x-amz-archive-description field here http : docs.aws.amazon.com amazonglacier latest dev api-archive-post.html but I do not know how to format it . I am using the Amazon Javascript SDK : http : docs.aws.amazon.com AWSJavaScriptSDK guide examples.html . I think I ve been able to upload archives fine though I haven t been able to see them in Cloudberry yet . UPDATE : After getting it working I put the code I was using here in case a sample is needed : https : github.com fschwiet mysql-glacier-backup .. . Answer : Our Glacier archive description metadata is a simple JSON with the following fields : .. . .. . Path : the full path of the source file . E.g . c : myfolder myfile.txt for file copied from local disk or mybucket myfolder myfile.txt for files copied from cloud-storage like Amazon S3 . The path is UTF7-encoded . UTCDateModified : ISO8601 utc date without milliseconds format : yyyyMMddTHHmmssZ . This is modification date of the original file not the archive creation date . Flags : integer flags value . 1 - compressed 2 - encrypted . Thanks Andy Comment : This worked . I did try to use fully iso8601 dates that include : and - characters . I had to remove these to get things to work where they then do match yyyyMMddTHHmmssZ", "Question : I am trying to auto sync between amazon-s3 bucket and a local folder . But when i run the command : .. . .. . I am getting the below error : .. . .. . The bucket TestAutoSync does exist in my s3 account and i have cross verified the key and secret . They work perfectly fine when connecting through cloud-berry ui interface . Below is the complete code executed till the above statement .. . .. . Please provide your opinions if you have worked around such scenarios earlier . Comment : Have you tried wrapping the TestAutoSync backup in quotes and does the Select-CloudFolder cmdlet support input from the pipeline Comment : What is your CloudBerry Explorer version Comment : @Evgeny I am using Cloudberry Freeware 4.7 Comment : @Persistent13 yes i have tried enclosing using quotes around TestAutoSync backup and as per the examples i have seen so far yes the Select-CloudFolder cmdlet support input from the pipeline .. . Answer : Ok here you go .. . .. . Get-CloudS3Connection should contain host path request style setting that should help you Please do the following . Before your line Get-CloudS3Connection inject this : .. . .. . So your full code should be something like the below Comment : thanks @Evgeny but adding -PathStyle did not change anything . I still get the same error.. .", "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 : Amazon Glacier does not have the concept of filepaths . However when I upload files to glacier via client tools like Cloudberry then my uploads do have a path structure . If I am programmatically uploading an archive to Amazon Glacier how can I upload it so it has a filepath and filename in Cloudberry I think I may need add something to the x-amz-archive-description field here http : docs.aws.amazon.com amazonglacier latest dev api-archive-post.html but I do not know how to format it . I am using the Amazon Javascript SDK : http : docs.aws.amazon.com AWSJavaScriptSDK guide examples.html . I think I ve been able to upload archives fine though I haven t been able to see them in Cloudberry yet . UPDATE : After getting it working I put the code I was using here in case a sample is needed : https : github.com fschwiet mysql-glacier-backup .. . Answer : I ve been zipping the tree up for ease of restore and storing all the tree info in the archive . Thus photos 2012.zip or whatever . The long list of files just wasn t working for me from an ease-of-checking-things-were-cactually-backed-up perspective . It s more costly to restore because I ll have to pull a whole tree down but given that my goal is never to need this archive I m OK with that .", "Question : I have versioning enabled in my S3 bucket how do I restore a deleted file with a command-line S3 client such as s3cmd http : s3tools.org s3cmd How do I browse the different versions of the files So far I have regressed to Freeware Cloudberry Windows Client http : www.cloudberrylab.com blog how-to-manage-amazon-s3-versioning-with-cloudberry-explorer to achieve this . I know I could use also Boto Python library https : boto.readthedocs.org en latest but I would prefer a common command-line tool . .. . Answer : s3cmd 1.5.0-rc1 has very little support for versioned files at this point . I believe it can do a full bucket delete including versioned files but that s the extent of its support for versioned files . Comment : I believe you are referring to this pull request github.com s3tools s3cmd pull 345 https : github.com s3tools s3cmd pull 345", "Question : I have versioning enabled in my S3 bucket how do I restore a deleted file with a command-line S3 client such as s3cmd http : s3tools.org s3cmd How do I browse the different versions of the files So far I have regressed to Freeware Cloudberry Windows Client http : www.cloudberrylab.com blog how-to-manage-amazon-s3-versioning-with-cloudberry-explorer to achieve this . I know I could use also Boto Python library https : boto.readthedocs.org en latest but I would prefer a common command-line tool . .. . Answer : Use this AWS CLI command : docs here http : docs.aws.amazon.com cli latest reference s3api list-object-versions.html : .. . .. . This returns the list of objects eg . : .. . .. . Use Key file name and VersionId to download a previous version : .. . .. . If you are trying to get a deleted file please note that you have to get-object the latest version listed in Versions not the one listed in DeleteMarkers . To do this in a script --query and or jq https : stedolan.github.io jq might help .", "Question : Is there a way of downloading a container and all of its content from Azure Blob Storage I use CloudBerry Explorer for Azure Blob Storage to manage my containers files and folders . I have a container with over 100GB of data which I would like to download but cannot find a way of downloading the container only individualy files . .. . Answer : If you want you can use AzCopy tool to download the entire blob container . Assuming you have latest version of Azure SDK installed you can find this tool in C : Program Files x86 Microsoft SDKs Azure AzCopy folder . You can try following command : .. . .. . Replace accountname containername folder path account key with appropriate values .", "Question : null .. . Answer : Give the following code and output i get the same exception for this file each time i try to download it . If I download it without md5 validation and check the content there is nothing wrong with the file so I am suspecting that the md5 property value is incorrect on the blobs metadata . I am trying to figure out how it could become invalid in the first place . Is it not azure blob storage internal that sets this property when files are uploaded I dont want to DisableContentMD5Validation as a solution . ps . i used Couldberry Explorer to upload the file in the first place .. . .. . gives this output .. . .. . Bad example the local files md5 is infact Hv+nQRNCPQnvy4WU9+qaQA . Conclussion the property must be set wrong at some point . Solution . Download and calculate md5 and update property value of the blob . Comment : Could it be that Cloudberry Explorer is setting the MD5 incorrectly Comment : maybe . updating question with some interesting info . 2sec Comment : Can you explain why when downloading the file and calculates the MD5 its matches the one stored in headers but it still fails when not having disabled validation Comment : How big is the file I might try it on my end as well using a file of approximately that size . Comment : 5360557 bytes . But its just some of the files in my blob storage . Others works fine .", "Question : We have a public Azure blob that contains over 300 000 image files . The method we used to upload the files was via a Cloudberry Drive mapped-drive . After uploading all the images and spot-checking them via https : ourazureaccount.blob.core.windows.net ourblob imagefile.jpg we are having intermittent problems . Some of the images load up from the web just fine . But others come up with this error from the web browsers : .. . .. . Error : Code BlobNotFound .. . .. . When an image fails with BlobNotFound I am able to browse to the CloudBerry drive path and see the image file just fine . So I know the file-exists . Does anyone know why some images load fine from the web and others fail Comment : As you said that those are public blobs Could you please share a working and non-working returnin BlobNotFoun URL so we can check Comment : @J.T . Have you tested my proposed solution .. . Answer : It looks like an URI characters problem post and review the urls the ones are working versus the others . If URL characters are the problems be careful with these and use instead the encoded value .. . .. . blank characters spaces tab etc .. . Special characters like theses the bold characters are the right encoded value should use if they appear : .. . + Indicates a space spaces cannot be used in a URL . 2B .. . Separates directories and subdirectories . 2F .. . Separates the actual URL and the parameters . 3F .. . Specifies special-characters . 25 .. . Indicates bookmarks . 23 .. . Separator between parameters specified in the URL . 26", "Question : I m looking to have a .vtt caption file play with a mp4 video per http : attendedstorage.com videotest2.html .. . .. . However the .vtt whether hosted s an Azure blob is not being seen . I ve tested in Chrome and IE10 . I did set content-type : txt vtt . This issue has three parts : .. . .. . 1 The .vtt is not being read by the browers per Chrome dev tools http : cropme.ru a672cceae9962b975f15b6ddacfe061e - I could use help figuring out why.. . .. . .. . 2 I also enabled CORS for the blob service . However when I can t get setting Access-Control-Allow-Origin : or Access-Control-Allow-Origin : .attendedstorage.com working with below tools : .. . .. . Per http : cropme.ru 546c699f8a1264994c18a624eeaa5060 - Cerebrata AMS - set CORS but does not have http header available for setting Access-Control-Allow-Origin : http : cropme.ru 20ac02af8b883e7cf09f4f076e137770 .. . .. . Per http : cropme.ru f95fbbcf94c26b65f48163ee4dc98194 - Zudio - cannot set Access-Control-Allow-Origin : Per http : cropme.ru bad39b334aad865a20ac016f981038be - Cloudberry - allows to set Access-Control-Allow-Origin : but does not keep it when you look if it registered . I am not at a level yet where I know how to work with the API directly so I prefer to use tools . 3 I also tested the mp4 and vtt inside video folder of the azure website but even on the same domain the vtt is not being recognized . Below the domain headers : .. . .. . UPDATE : I ve revised the version of http : attendedstorage.com videotest3.html to test linking the video to the track meaning this should not be in the same domain origin as to http : attendedstorage.com test3.mp4 and https : attendedstorage.com test3.vtt . Below is what Chrome Console says : .. . .. . This leads me to think that to resolve part 3 of the above described issue I need to also set the http header in the azure website if that s the parent of track element - I m trying to read up on Azure Powershell but I d prefer to do it via a GUI or a tool if one exists that allows me to change http-headers in attendedstorage.com azure website since it s going to take me a while to understand Powershell . Still I don t understand why this is needed in this scenario since the video and track originate from the same domain as the html files . This also still leaves part 2 issue open since I did enable CORS in the blob but I was not able using tools to change the http header Access-Control-Allow-Origin : in the blob . .. . Answer : One thing I noticed in all the screenshots is that for allowed origins you re trying to set the value as http : .attendedstorage.com . My guess is that it is causing problem . The URLs defined in allowed origins should be an exact match to the the actual URLs from which the cross-browser request is originating and this is case sensitive . From the documentation page http : msdn.microsoft.com en-us library dn535601.aspx : .. . .. . AllowedOrigins : The origin domains that are permitted to make a request against the storage service via CORS . The origin domain is the domain from which the request originates . Note that the origin must be an exact case-sensitive match with the origin that the user age sends to the service . You can also use the wildcard character to allow all origin domains to make requests via CORS . In the example above the domains http : www.contoso.com and http : www.fabrikam.com can make requests against the service using CORS . One thing you could try is by specifying the actual domain-name http : attendedstorage.com https : attendedstorage.com and see if that helps . If that doesn t work try by specifying i.e . all domain names are allowed to narrow down the issues . Comment : Thanks for responding Gaurav . Setting Access-Control-Allow-Origin : was one of the early things I tried but Cloudberry does not keep the setting no matter what I enter - I m able to enter and save it but then when I check back that header does not appear . Comment : Julie so you don t can t set this header explicitly . Also the CORS settings are applied on the entire blob storage account and not just one blob or container . When you set CORS settings you can use Cerebrata AMS this header will automatically be included in the response headers . The reason Cloudberry does not keep track of it is because Azure Blob Storage does not support this header on a blob . Only settable headers supported on the blobs are : content-type content-encoding content-language content-md5 and content-disposition . HTH . Comment : Yes I used Cerebrata to set CORS . So if Azure Blob Storage does not support Access-Control-Allow-Origin : does this mean that I cannot have the WebVTT track in an Azure Blob where I have the mp4 video Comment : Azure Blob Storage does support Access-Control-Allow-Origin : . Only thing is that you can t set it on a blob-by-blob basis its done at blob storage level . When you set CORS settings correctly this header is automatically added to the list of response headers . Comment : Within Cerebrata I ve tried both resetting CORS to the actual domain-name attendedstorage.com http : attendedstorage.com attendedstorage.com quot https : attendedstorage.com quot which did not make a difference and now to per cropme.ru c5c1129fc5301900bc75fabe3c44afc7 http : cropme.ru c5c1129fc5301900bc75fabe3c44afc7 - however unfortunately the WebVtt still gives errors within Chrome dev console and network as shown in dropbox.com s 8zhg95upfm9mbuk https : www.dropbox.com s 8zhg95upfm9mbuk Screenshot 202014-04-25 2009.47.52.png", "Question : I m looking to have a .vtt caption file play with a mp4 video per http : attendedstorage.com videotest2.html .. . .. . However the .vtt whether hosted s an Azure blob is not being seen . I ve tested in Chrome and IE10 . I did set content-type : txt vtt . This issue has three parts : .. . .. . 1 The .vtt is not being read by the browers per Chrome dev tools http : cropme.ru a672cceae9962b975f15b6ddacfe061e - I could use help figuring out why.. . .. . .. . 2 I also enabled CORS for the blob service . However when I can t get setting Access-Control-Allow-Origin : or Access-Control-Allow-Origin : .attendedstorage.com working with below tools : .. . .. . Per http : cropme.ru 546c699f8a1264994c18a624eeaa5060 - Cerebrata AMS - set CORS but does not have http header available for setting Access-Control-Allow-Origin : http : cropme.ru 20ac02af8b883e7cf09f4f076e137770 .. . .. . Per http : cropme.ru f95fbbcf94c26b65f48163ee4dc98194 - Zudio - cannot set Access-Control-Allow-Origin : Per http : cropme.ru bad39b334aad865a20ac016f981038be - Cloudberry - allows to set Access-Control-Allow-Origin : but does not keep it when you look if it registered . I am not at a level yet where I know how to work with the API directly so I prefer to use tools . 3 I also tested the mp4 and vtt inside video folder of the azure website but even on the same domain the vtt is not being recognized . Below the domain headers : .. . .. . UPDATE : I ve revised the version of http : attendedstorage.com videotest3.html to test linking the video to the track meaning this should not be in the same domain origin as to http : attendedstorage.com test3.mp4 and https : attendedstorage.com test3.vtt . Below is what Chrome Console says : .. . .. . This leads me to think that to resolve part 3 of the above described issue I need to also set the http header in the azure website if that s the parent of track element - I m trying to read up on Azure Powershell but I d prefer to do it via a GUI or a tool if one exists that allows me to change http-headers in attendedstorage.com azure website since it s going to take me a while to understand Powershell . Still I don t understand why this is needed in this scenario since the video and track originate from the same domain as the html files . This also still leaves part 2 issue open since I did enable CORS in the blob but I was not able using tools to change the http header Access-Control-Allow-Origin : in the blob . .. . Answer : I am not sure about your scenario . however I faced the same issue last week while uploading my content blob to cloud directly from JavaScript . The solution to my problem was the way I was creating my SAS secured access signature One of the helpful MSDN Blog http : blogs.msdn.com b windowsazurestorage archive 2014 02 03 windows-azure-storage-introducing-cors.aspx has helped me and it might help you all . The code which I was missing was .. . .. . It basically add some rules to SAS Url and I am able to upload my files to blob . Comment : Agnimitra thanks for suggestion . I just tried using a link with SAS URL as generated by Cerebrata AMS but unfortunately to no avail .", "Question : I m looking to have a .vtt caption file play with a mp4 video per http : attendedstorage.com videotest2.html .. . .. . However the .vtt whether hosted s an Azure blob is not being seen . I ve tested in Chrome and IE10 . I did set content-type : txt vtt . This issue has three parts : .. . .. . 1 The .vtt is not being read by the browers per Chrome dev tools http : cropme.ru a672cceae9962b975f15b6ddacfe061e - I could use help figuring out why.. . .. . .. . 2 I also enabled CORS for the blob service . However when I can t get setting Access-Control-Allow-Origin : or Access-Control-Allow-Origin : .attendedstorage.com working with below tools : .. . .. . Per http : cropme.ru 546c699f8a1264994c18a624eeaa5060 - Cerebrata AMS - set CORS but does not have http header available for setting Access-Control-Allow-Origin : http : cropme.ru 20ac02af8b883e7cf09f4f076e137770 .. . .. . Per http : cropme.ru f95fbbcf94c26b65f48163ee4dc98194 - Zudio - cannot set Access-Control-Allow-Origin : Per http : cropme.ru bad39b334aad865a20ac016f981038be - Cloudberry - allows to set Access-Control-Allow-Origin : but does not keep it when you look if it registered . I am not at a level yet where I know how to work with the API directly so I prefer to use tools . 3 I also tested the mp4 and vtt inside video folder of the azure website but even on the same domain the vtt is not being recognized . Below the domain headers : .. . .. . UPDATE : I ve revised the version of http : attendedstorage.com videotest3.html to test linking the video to the track meaning this should not be in the same domain origin as to http : attendedstorage.com test3.mp4 and https : attendedstorage.com test3.vtt . Below is what Chrome Console says : .. . .. . This leads me to think that to resolve part 3 of the above described issue I need to also set the http header in the azure website if that s the parent of track element - I m trying to read up on Azure Powershell but I d prefer to do it via a GUI or a tool if one exists that allows me to change http-headers in attendedstorage.com azure website since it s going to take me a while to understand Powershell . Still I don t understand why this is needed in this scenario since the video and track originate from the same domain as the html files . This also still leaves part 2 issue open since I did enable CORS in the blob but I was not able using tools to change the http header Access-Control-Allow-Origin : in the blob . .. . Answer : Regarding to the parent of track element does not have a crossorigin attribute . issue it does not refer to azure blob storage but to the HTML file where you load the tracks . crossorigin is an attribute to set to the track tag parent for example video controls crossorigin anonymous . If you could solve the issue regarding to set the HTTP headers in azure adding the attribute crossorigin to your video or audio tag should solve the entire problem ." ] }
[ "yes-answer-long", "yes-answer-short" ]
cloudberry
UNK_RELATION
amphp@php@58
amphp -- amp is a non-blocking concurrency framework for @placeholder applications .
{ "confidence": [ 28.634510040283203, 27.568801879882812, 25.938209533691406, 25.938209533691406, 25.92070770263672, 24.259803771972656, 22.39952850341797, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973, 13.025185585021973 ], "content": [ "I d looked at the setting process on the git page : https : github.com amphp thread .", "First go ahead and grab amphp artax : 1.0.0-rc2 .. . .. . Then go ahead and do : .. . .. . If that doesn t work then edit composer.json and add-in the req for those projects : .. . .. . The problem is that composer can t resolve the amphp artax package for some reason .", "I am looking to implement the framework amphp thread with Symfony3 which I ve read about in this article https : www.mullie.eu parallel-processing-multi-tasking-php .", "I ve followed the checklist : .. . .. . PHP5.5+ OK Php 5.5.12 .. . pecl pthread OK I did install it as explained on Windows8 .. . .. . Now 3rd task on the checklist I have the installation of the framework itself amphp thread left to do .", "- crate crate-pdo 0.0.7 requires amphp artax 1.0.0-rc4 - no matching package found .", "Thanks it worked out also I had composer in my environment-variables so just had to run : composer require amphp thread .", "And afterwards how can one refer to it in the Symphony class file should I write : use amphp thread between the namespace declaration of my Symfony file and the class code itself", "I m trying to install the Crate PDO driver from here : https : github.com crate crate-pdo .. . .. . The manual says to use composer.phar like so : .. . .. . php composer.phar require crate crate-pdo : 0.0.3 .. . .. . However that produces the following : .. . .. . Your requirements could not be resolved to an installable set of packages .", ".. . .. . Problem 1 .. . - Installation request for crate crate-pdo 0.0.7 .", "- satisfiable by crate crate-pdo 0.0.7 .", ".. . Potential causes : .. . - A typo in the package name .. . - The package is not available in a stable-enough version according to your minimum-stability setting .. . see https : groups.google.com d topic composer-dev g3ASeIFlrc discussion for more details .", ".. . .. . I ve looked at the minimum-stability setting but am unsure how to use that where exactly do I set that .", "This is also my first time using composer so perhaps I m overlooking something", "Edit .. . .. . As of 1 8 2015 there s a fresh release https : github.com crate crate-pdo on git that does not require the work around described above .", "Simply require crate and run composer update .", "JFYI : We are currently replacing the artax http client by another one so after the next pdo release which will happen soon this issue should be gone .", "Thanks this worked .", "I do have new php errors now though .", "If I manage to solve those I ll post a link here .", "@SebastianUtz That s awesome", "I wasn t expecting to see you respond here .", "Keep up the great work", "We ve just released v0.1.0 which fixes this issue .", "I am a bit confuse because it is not an official Symfony bundle .", "So I don t think I can put it under my symfony project vendor and refer to it in the file my symfony project app AppKernel.php .", "So how do one do in this case : .. . .. . Do one put the directory of the library under the root directory my symfony project", "You can simply install the library with composer as example launching this command from the root of your project : .. . .. . And use it in your code directly : the composer process generate the correct autoloader for you .", "No necessary add to the list of the Symfony2 bundle is not a bundle .", "Hope this help", "Hi @nyluje if this or any answer has solved your question please consider accepting it http : meta.stackexchange.com q 5234 179419 by clicking the check-mark .", "This indicates to the wider community that you ve found a solution and gives some reputation to both the answerer and yourself .", "There is no obligation to do this .", "You will need to install the bundle this can be done easily by adding the following to your composer.json file : .. . .. . Then run composer install on your server .", "Thanks I did use the composer require as the other answer provided suggested but it did result in what you described in the composer.json file which is beneath the root folder of my project .", "I m glad it helped ." ] }
{ "confidence": [ 37.98354721069336, 36.78821563720703, 31.086009979248047 ], "content": [ "Question : I am looking to implement the framework amphp thread with Symfony3 which I ve read about in this article https : www.mullie.eu parallel-processing-multi-tasking-php . I d looked at the setting process on the git page : https : github.com amphp thread . I ve followed the checklist : .. . .. . PHP5.5+ OK Php 5.5.12 .. . pecl pthread OK I did install it as explained on Windows8 .. . .. . Now 3rd task on the checklist I have the installation of the framework itself amphp thread left to do . I am a bit confuse because it is not an official Symfony bundle . So I don t think I can put it under my symfony project vendor and refer to it in the file my symfony project app AppKernel.php . So how do one do in this case : .. . .. . Do one put the directory of the library under the root directory my symfony project And afterwards how can one refer to it in the Symphony class file should I write : use amphp thread between the namespace declaration of my Symfony file and the class code itself .. . Answer : You can simply install the library with composer as example launching this command from the root of your project : .. . .. . And use it in your code directly : the composer process generate the correct autoloader for you . No necessary add to the list of the Symfony2 bundle is not a bundle . Hope this help Comment : Thanks it worked out also I had composer in my environment-variables so just had to run : composer require amphp thread . Comment : Hi @nyluje if this or any answer has solved your question please consider accepting it http : meta.stackexchange.com q 5234 179419 by clicking the check-mark . This indicates to the wider community that you ve found a solution and gives some reputation to both the answerer and yourself . There is no obligation to do this .", "Question : I am looking to implement the framework amphp thread with Symfony3 which I ve read about in this article https : www.mullie.eu parallel-processing-multi-tasking-php . I d looked at the setting process on the git page : https : github.com amphp thread . I ve followed the checklist : .. . .. . PHP5.5+ OK Php 5.5.12 .. . pecl pthread OK I did install it as explained on Windows8 .. . .. . Now 3rd task on the checklist I have the installation of the framework itself amphp thread left to do . I am a bit confuse because it is not an official Symfony bundle . So I don t think I can put it under my symfony project vendor and refer to it in the file my symfony project app AppKernel.php . So how do one do in this case : .. . .. . Do one put the directory of the library under the root directory my symfony project And afterwards how can one refer to it in the Symphony class file should I write : use amphp thread between the namespace declaration of my Symfony file and the class code itself .. . Answer : You will need to install the bundle this can be done easily by adding the following to your composer.json file : .. . .. . Then run composer install on your server . Comment : Thanks I did use the composer require as the other answer provided suggested but it did result in what you described in the composer.json file which is beneath the root folder of my project . Comment : I m glad it helped .", "Question : I m trying to install the Crate PDO driver from here : https : github.com crate crate-pdo .. . .. . The manual says to use composer.phar like so : .. . .. . php composer.phar require crate crate-pdo : 0.0.3 .. . .. . However that produces the following : .. . .. . Your requirements could not be resolved to an installable set of packages . .. . .. . Problem 1 .. . - Installation request for crate crate-pdo 0.0.7 . - satisfiable by crate crate-pdo 0.0.7 . - crate crate-pdo 0.0.7 requires amphp artax 1.0.0-rc4 - no matching package found . .. . Potential causes : .. . - A typo in the package name .. . - The package is not available in a stable-enough version according to your minimum-stability setting .. . see https : groups.google.com d topic composer-dev g3ASeIFlrc discussion for more details . .. . .. . I ve looked at the minimum-stability setting but am unsure how to use that where exactly do I set that . This is also my first time using composer so perhaps I m overlooking something .. . Answer : First go ahead and grab amphp artax : 1.0.0-rc2 .. . .. . Then go ahead and do : .. . .. . If that doesn t work then edit composer.json and add-in the req for those projects : .. . .. . The problem is that composer can t resolve the amphp artax package for some reason . Edit .. . .. . As of 1 8 2015 there s a fresh release https : github.com crate crate-pdo on git that does not require the work around described above . Simply require crate and run composer update . Comment : JFYI : We are currently replacing the artax http client by another one so after the next pdo release which will happen soon this issue should be gone . Comment : Thanks this worked . I do have new php errors now though . If I manage to solve those I ll post a link here . Comment : @SebastianUtz That s awesome I wasn t expecting to see you respond here . Keep up the great work Comment : We ve just released v0.1.0 which fixes this issue ." ] }
[ "yes-answer-long", "yes-answer-short" ]
php
UNK_RELATION
uploadcare@widget@99
uploadcare -- uploadcare is a service for uploading images and other files using api or html-form @placeholder and storing them in cdn .
{ "confidence": [ 64.10523223876953, 54.567481994628906, 54.11965560913086, 51.96958541870117, 51.01344299316406, 50.94354248046875, 50.15903854370117, 50.0152587890625, 49.13777542114258, 49.11012649536133, 47.70372009277344, 47.25580596923828, 47.08830261230469, 47.0272216796875, 46.635616302490234, 46.61729049682617, 45.71232223510742, 45.47550582885742, 45.47550582885742, 45.47550582885742, 45.29960250854492, 45.146575927734375, 44.99445724487305, 44.95295333862305, 44.7833137512207, 44.48453140258789, 43.969566345214844, 43.78657913208008, 43.645263671875, 42.534095764160156, 42.5103645324707, 42.47016906738281, 42.45060729980469, 42.12648010253906, 41.68754959106445, 41.68754959106445, 41.36772155761719, 41.28709411621094, 41.1209716796875, 41.1209716796875, 41.1209716796875, 40.76007843017578, 39.96979522705078, 39.96979522705078, 39.60174560546875, 39.54846954345703, 39.49814224243164, 39.49814224243164, 39.353355407714844, 38.95022201538086, 38.88367462158203, 38.75544357299805, 38.66915512084961, 38.65957260131836, 38.43537521362305, 37.73998260498047, 37.73998260498047, 37.73998260498047, 37.73998260498047, 37.73998260498047, 37.57230758666992, 37.26664352416992, 37.16931915283203, 37.16931915283203, 37.146427154541016, 35.98005676269531, 35.64112854003906, 35.64112854003906, 35.64112854003906, 35.55193328857422, 34.9439697265625, 34.9439697265625, 34.9439697265625, 34.9439697265625, 34.9439697265625, 34.9439697265625, 34.83000946044922, 34.64881134033203, 33.18581008911133, 33.18581008911133, 33.18581008911133, 33.18581008911133, 33.18581008911133, 33.18581008911133, 33.07682800292969, 32.92500686645508, 32.53763961791992, 32.15671920776367, 32.15671920776367, 32.15671920776367, 32.01943588256836, 31.284761428833008, 31.14337921142578, 30.717092514038086, 30.62150764465332, 30.3985595703125, 29.609031677246094, 29.23218536376953, 28.989517211914062 ], "content": [ "I m using Uploadcare https : uploadcare.com for uploading and storing images which is working .", "Can uploadcare-widget https : github.com uploadcare uploadcare-widget be used without using the upload care service", "I am using the Uploadcare API available on git-hub : here https : github.com uploadcare uploadcare-java .", "I am using the gem uploadcare-rails 0.1.0 https : github.com mouseed uploadcare-rails in my rails application for uploading images .", "github.com uploadcare angular-uploadcare pull 9 https : github.com uploadcare angular-uploadcare pull 9", "I just searched for uploadcare api list files https : duckduckgo.com q uploadcare+api+list+files .", "For example if you re using Uploadcare PHP package https : github.com uploadcare uploadcare-php :", "How to upload multiple-files using uploadcare js api", "This appears to upload the files to Uploadcare correctly .", "While using Uploadcare https : uploadcare.com file-upload widget I noticed that the Uploadcare script keeps repainting the HTML tag .", "Implementing angular-uploadcare module which can be found here https : github.com uploadcare angular-uploadcare .", "I m using the uploadcare-rails gem .", "So if the user submits the form a not an UploadCare URL will be saved .", "I am using this uploadcare widget https : github.com uploadcare angular-uploadcare in my angularjs app although when I use an angular model as the value for an attribute in the app the uploadCare widget isn t effected .", "I configured a s3 bucket to automatically backup all the files from uploadcare .", "I m using Uploadcare to manage images for my Rails app .", "The package references images in the folder node-modules uploadcare-widget images .", "This is uploadcare http : uploadcare.com question .", "I m very new to Uploadcare .", "Is this capability handled by the uploadcare backend", "so here s the angular-uploadcare directive for uploadcare widget .. . .. . I am using mean.js I have followed the angular-uploadcare instructions : https : github.com uploadcare angular-uploadcare .. . .. . I am new to both Angular JS and the whole MEAN stack but I have the basics down a bit I think .", "For example If I upload My Resume.pdf through uploadcare I am seeing My Resume.pdf in cdn but MyResume.pdf in s3 .", "I m trying to migrate some of my atmosphere packages to npm packages and ran into some issues with images not loading in the npm package uploadcare-widget https : github.com uploadcare uploadcare-widget .", "It seems that info is being saved to file.data https : github.com uploadcare uploadcare-ruby blob master lib uploadcare resources file.rb property but is not publicly available .", "The poster upload from Uploadcare https : uploadcare.com s widget is part of that form .", "Uploading images works fine but the problem is when the widget is initialized in a form-for a model that already has an existing value of image url that is not an UploadCare url .", "First you need to acquire internal Uploadcare API .", "However the widget.value doesn t seem to do anything although that is suggested on issue https : github.com uploadcare uploadcare-widget issues 213 on uploadcare", "I have the Uploadcare uploader set to a maximum of 5 images .", "I m trying to get my head around the Uploadcare https : uploadcare.com API .", "First of all try to use this gem https : github.com uploadcare uploadcare-rails instead .", ".. . .. . As mentioned previously I m using Uploadcare in addition to Word Count Char Count .", "I m migrating from Uploadcare to Cloudinary .", "Tried to manually replace http with https in Uploadcare url but that doesn t seem to work :", "please consider using the version from this PR https : github.com uploadcare angular-uploadcare pull 9 as it fixes that and also changes behavior a bit E - A", "Probably you use UPLOADCARE SCRIPT BASE like in readme https : github.com uploadcare uploadcare-widget blob master README.markdown using-with-npm but maybe its wrong way .", "Right now this will not work as Uploadcare API does not allow cross origin requests .", "I tried import node-modules uploadcare-widget images and other variations inside the public folder .", "I have an Uploadcare widget with multiple upload enabled .", "I m integrating UploadCare into my Rails app .", "How can I import uploadcare into a react.js project", "From Uploadcare documentation https : uploadcare.com documentation cdn : .. . .. . quality : mode .. . .. . Set quality of result image .", "Ive just started taking a look at the uploadcare product and its api .", "I want to compile a third-party api uploadcare to a directive .", "Second file info provided by Uploadcare API does not depend on a plan you re using .", "Please note what we ve added CommonJS compatibility only in 2.8.0 version https : github.com uploadcare uploadcare-widget blob master HISTORY.markdown 280-14032016 .", "When the UploadCare dialog is closed I expect the alert to show but it doesn t .", "However the Uploadcare documentation says that I can just got to https : api.uploadcare.com .", "I am using Uploadcare https : uploadcare.com widget to upload profile images in an nodejs app .", "I upload my images using Uploadcare widget embedded in CKEditor but my pages are https and I get browser warning because images are received over plain http .", "But according to source https : github.com uploadcare uploadcare-widget blob v1.3.1 app assets javascripts uploadcare locale.js.coffee L34 there is a hack which allows one to rebuild translation at runtime .", "As the documentation says https : uploadcare.com documentation widget input-value : .. . .. . The value of role uploadcare-uploader input is either empty or CDN link with file UUID .", "I am trying to restrict the file-type only mp3 files when I open a dialog with uploadcare .", "The difference between uploadcare.fileFrom and uploadcare.filesFrom is the first takes one initial object and returns exactly one uploadcare file the second takes array of objects and returns array of uploadcare files .", "I m trying to delete file s in uploadcare rest api using jquery ajax .", "The Uploadcare plugin searches for new widgets on the page every 100ms .", "Right now I am not sure if it is a bug on uploadcare widget v2.5.5", "I still need to report this to the guys at uploadcare to get a better idea .", "My code is below : data 4 returns the URL of the Uploadcare image", ".. . .. . As long as the image url field has an UploadCare image url the widget works fine .", "I deployed Uploadcare https : uploadcare.com and would like to track the widget multifilepick progress .", "Although you will have to either replicate or get rid of functionality that relies on Uploadcare https : uploadcare.com infrastructure : .. . .. . uploads this is the easiest part .. . fetching files from social networks and cloud-storage services .. . image preview and cropping that relies on Uploadcare CDN .. . .. . So unless you re moving enormous amounts of files most cost efficient way is to use Uploadcare as it is .", "If you want to map file on Uploadcare CDN to a file backed up to your S3 bucket - you should use UUID for this not filename please answer in a comment or update the question the reason if this doesn t work for you .", "https : www.google.com search q uploadcare+https You just need to use a different base domain-name https : uploadcare.com documentation cdn : .. . .. . You can use https for ucarecdn.com domain .", "TL DR How can I import the uploadcare Javascript API into a react.js project", "You can find more in Uploadcare JS API documentation https : uploadcare.com documentation javascript api widget .", "I am using the multifile picker instance of Uploadcare https : uploadcare.com but have turned off autostore .", "Chances are that you are using multiupload variant of Uploadcare widget and it returns group s UUID to the input field .", "I am using Uploadcare https : uploadcare.com on my site and I am loving it .", "What I want to do now is using this items.client.controller.js : .. . .. . I want to : .. . .. . bind the value of the widget to to items.image .. . retrieve the uploadcare CDN URL using the on-upload-complete .. . .. . but I have no idea how .", "Just to be clear during testing the errors occured with any type of image object either added manually or via Uploadcare .", "I expect the UploadCare dialog to open after clicking MyButton showing the Twitter logo but it doesn t .", "I set up a free account with Uploadcare https : uploadcare.com a couple days ago .", "I have messaged Uploadcare support and I haven t heard anything back yet", "Obviously the Uploadcare input widget has its own way of doing things hence the query .", "So say for example Uploadcare takes a file from the user and gives it the id say 859510a2-b15b-4fb3-9b02-08c95685dffd .", "Nit s Comment http : stackoverflow.com questions 32924531 why-uploadcare-is-repainting-html-tag-every-n-ms comment-53675551 is right the repaint is caused by the API that is constantly removing and adding the id attribute on the html element .", "When I call the function uploadcare.Widget role uploadcare-uploader it raises an exception .. . .. . My input : .. . .. . Also how to get UUIDs of the images uploaded by a user in JavaScript", "I am trying to retrieve a file UUID from Uploadcare then use that UUID to copy the image to my S3 storage bucket .", "Everything works except for the derp value which I suspect is changed after the uploadcare-widget is made .", "The reason for it is that Uploadcare widget is created once and it doesn t update itself if input attrs change in the future .", "I want Uploadcare widget to recognise that the file already exists and show the picture not ask to upload new .", "All I needed to include was a value in my Uploadcare input field that mapped to the existing photo .", "It just seems that the widget knows the image isn t on UploadCare so it says Incorrect value for some reason .", "I am using uploadcare widget http : uploadcare.com in my angularjs-based application .", "I am using a tools uploadcare from uploadcare.com https : uploadcare.com .. . .. . I read the documentation but I cannot find how can we autostore when using javascript api to after upload a file .", "Once the image is uploaded using Uploadcare https : uploadcare.com widget how to hide the choose button and show remove button if an image is uploaded", "In Uploadcare JS version 0.12 I did the following : .. . .. . In 0.16 there s no more uploadDone and all it does is return a promise without any data .", "My question : can I use a POST variables with the Uploadcare input button to make it remember and reload the chosen picture the user has previously uploaded", "Thanks guys - I should have clarified - my question is more in relation to how the Uploadcare input type will accept Value xxxx .", "However I also manage to get the same results with .uploadcare-widget-button-remove .click", "Uploadcare REST API does not have a DELETE method for Group resource so you should receive HTTP 405 Method not allowed", "In Uploadcare widget once user is done uploading a single file I want to go back to original widget state so the user can choose another image to replace the previous one .", "so I am using Uploadcare and want to convert this request to Faraday : .. . .. . Here is an excerpt from the stale Uploadcare Ruby gem : .. . .. . and here is the module using that : .. . .. . This code that I am currently working with does not work : .. . .. . EDIT : Both code above yields server error 500 .. . .. . How can I properly declare the -d params in the uploadcare CURL request above in Faraday", "Update .. . .. . .. . .. . I tryed to add rootScope to my uploadcare directive and set UPLOADCARE LOCALE variable there : .. . .. . but it does not help .", "This is the code which should work for your case : .. . .. . It will reset the value of the widget if it is not the Uploadcare URL URL with the path which starts with UUID but will preserve the value of the hidden input .", "It is very difficult this way to map the files between CDN and S3 .", "The web page where you are putting this code needs to be protected otherwise anyone can take the secret-key and send DELETE requests to your Uploadcare account .", "Uploadcare API allows cross origin requests since 2014-12-24 so if you re up to exposing your key or want to add roundtrip to your backend to get proper Authentication header value go for it ." ] }
{ "confidence": [ 70.30927276611328, 69.82797241210938, 68.83260345458984, 68.59972381591797, 68.52232360839844, 67.94273376464844, 66.32174682617188, 64.9339828491211, 63.803871154785156, 63.711753845214844, 63.061012268066406, 62.3903923034668, 61.83768081665039, 61.57373809814453, 59.306949615478516, 57.68450927734375, 57.2764892578125, 56.824378967285156, 56.771175384521484, 56.721858978271484 ], "content": [ "Question : I configured a s3 bucket to automatically backup all the files from uploadcare . But the files that are backed up doesn t have the same name and the name is devoid of spaces and special chars . For example If I upload My Resume.pdf through uploadcare I am seeing My Resume.pdf in cdn but MyResume.pdf in s3 . It is very difficult this way to map the files between CDN and S3 . Any options to overcome this issue .. . Answer : Unfortunately we have to strip special and whitespace characters from actual file that is saved on a disk during upload process . If we do not do that - all sorts of bad things happen . Original file name is accessible via REST API https : uploadcare.com documentation rest file . If you want to map file on Uploadcare CDN to a file backed up to your S3 bucket - you should use UUID for this not filename please answer in a comment or update the question the reason if this doesn t work for you .", "Question : I am using the gem uploadcare-rails 0.1.0 https : github.com mouseed uploadcare-rails in my rails application for uploading images . After file-upload it assigns uuid to value of the image column.It only save the uuid in the image column and does t save any other information like record.image.url record.image.size or record.image.image I am currently on free plan . Does it provide all the file info on free plan or is there any thing i am doing wrong Your quick response will highly be appreciated . Thanks .. . Answer : First of all try to use this gem https : github.com uploadcare uploadcare-rails instead . Second file info provided by Uploadcare API does not depend on a plan you re using . It seems that info is being saved to file.data https : github.com uploadcare uploadcare-ruby blob master lib uploadcare resources file.rb property but is not publicly available . You may want to patch it in and send a PR :", "Question : I upload my images using Uploadcare widget embedded in CKEditor but my pages are https and I get browser warning because images are received over plain http . Tried to manually replace http with https in Uploadcare url but that doesn t seem to work : .. . Answer : Yes https : www.google.com search q uploadcare+https You just need to use a different base domain-name https : uploadcare.com documentation cdn : .. . .. . You can use https for ucarecdn.com domain . This feature is experimental : .. . https : ucarecdn.com : uuid .. . .. . Please note we do not support https for www.ucarecdn.com domain as well as http for ucarecdn.com . Comment : Thanks a lot", "Question : I m integrating UploadCare into my Rails app . I have a field in my Book model called image url a plain string . Uploading images works fine but the problem is when the widget is initialized in a form-for a model that already has an existing value of image url that is not an UploadCare url . .. . .. . As long as the image url field has an UploadCare image url the widget works fine . But if it has something like : http : i.imgur.com foobar.jpg it says Incorrect value . It just seems that the widget knows the image isn t on UploadCare so it says Incorrect value for some reason . I m using the uploadcare-rails gem . Is there some way to tweak this behavior Comment : How exactly do you want to tweak this behavior Widget can t show the arbitrary link as it s value : it don t know the real file name size and can t show preview . Maybe the better solution will be to not use the widget with such links . Comment : @homm : Just an empty value would be good enough for our use-case . .. . Answer : This is a bit tricky but still possible . This is the code which should work for your case : .. . .. . It will reset the value of the widget if it is not the Uploadcare URL URL with the path which starts with UUID but will preserve the value of the hidden input . So if the user submits the form a not an UploadCare URL will be saved . Full example : http : jsbin.com gucuqoc watch html js output", "Question : I am using the multifile picker instance of Uploadcare https : uploadcare.com but have turned off autostore . How can I store files after user clicks a submit button I went through the REST API but am really new to this so its not really clear what I need to do . An example code would be quite helpful . Thanks . UPDATE : .. . .. . Implemented the example but am getting an internal server error . On my account I can see the images on the CDN but none was stored . Here s my php code : .. . .. . Is there something am doing wrong Comment : what are you using on your backend Comment : I assume you are asking for the language. . if so am using php . I am really new to this.. . so a sample code would really help .. . Answer : You have to issue a REST API https : uploadcare.com documentation rest group request on your backend : .. . .. . PUT groups : group id storage .. . .. . : group id is submitted with a form by default . For example if you re using Uploadcare PHP package https : github.com uploadcare uploadcare-php : Comment : Thanks @mojo for this.. .", "Question : Can uploadcare-widget https : github.com uploadcare uploadcare-widget be used without using the upload care service The goal : .. . .. . Use the widget specifically to allow users to upload files from their google drive dropbox accounts . Instead of using upload care s backend use your own backend i.e . node.js aws s3 . .. . Answer : Yes it can . It s open-source Although you will have to either replicate or get rid of functionality that relies on Uploadcare https : uploadcare.com infrastructure : .. . .. . uploads this is the easiest part .. . fetching files from social networks and cloud-storage services .. . image preview and cropping that relies on Uploadcare CDN .. . .. . So unless you re moving enormous amounts of files most cost efficient way is to use Uploadcare as it is . BTW you can use your own S3 storage and even upload directly to your S3 buckets . Comment : Thanks @mojo . Point 2 fetching files from social networks and cloud-storage services is what most interests me . Is this capability handled by the uploadcare backend I assumed there was no server involved and it was limited to communication between the user s browser and the cloud service i.e . dropbox . Comment : that part is serverside . Comment : Thanks again @mojo", "Question : I am using Uploadcare https : uploadcare.com widget to upload profile images in an nodejs app . In Uploadcare widget once user is done uploading a single file I want to go back to original widget state so the user can choose another image to replace the previous one . However the widget.value doesn t seem to do anything although that is suggested on issue https : github.com uploadcare uploadcare-widget issues 213 on uploadcare .. . Answer : widget.value is getter setter method so widget.value will just return current value . Use widget.value null to reset . You can find more in Uploadcare JS API documentation https : uploadcare.com documentation javascript api widget . p.s . : thanks for the tip I have improved an answer in github issue . Comment : thanks it did work . However I also manage to get the same results with .uploadcare-widget-button-remove .click Comment : this is workaround widget.value is the straightforward :", "Question : I m trying to migrate some of my atmosphere packages to npm packages and ran into some issues with images not loading in the npm package uploadcare-widget https : github.com uploadcare uploadcare-widget . The package references images in the folder node-modules uploadcare-widget images . The images are displayed on the page via css for example : .. . .. . I can see my app attempts to load the images from the network inspector but the image doesn t load from the displayed path . I can confirm that image files are in the specified file directory . Is there something special I need to do to be able to load images from an npm package I tried import node-modules uploadcare-widget images and other variations inside the public folder . I ll probably end up going back to using an atmosphere package : Comment : At the moment you will probably need to copy them to the public folder . Note that the public folder maps to the root sot public foo.png should be referred to as foo.png . .. . Answer : Probably you use UPLOADCARE SCRIPT BASE like in readme https : github.com uploadcare uploadcare-widget blob master README.markdown using-with-npm but maybe its wrong way . Try to use just this code .. . .. . instead readme-like code .", "Question : I upload my images using Uploadcare widget embedded in CKEditor but my pages are https and I get browser warning because images are received over plain http . Tried to manually replace http with https in Uploadcare url but that doesn t seem to work : .. . Answer : You can configure widget to use the HTTPS domain ucarecdn.com via the UPLOADCARE CDN BASE https : uploadcare.com documentation widget data-cdn-base setting . Please note if you are using Instagram as a source some images will be loaded over HTTP because Instagram doesn t have HTTPS for it s images . Comment : Looks like Instagram may soon support HTTPS http : www.theinquirer.net inquirer news 2357779 instagram-to-use-https-following-discovery-of-gaping-security-hole-in-ios-app .", "Question : I have a form which I want to validate with PHP . The poster upload from Uploadcare https : uploadcare.com s widget is part of that form . Sometimes users have to go backward in the form to fix stuff - an incorrect email etc . I want to have the chosen upload file persist within that form . This works when the back button is clicked but I cant rely on that . I m using PHP POST variables to reload and repopulate the form . My question : can I use a POST variables with the Uploadcare input button to make it remember and reload the chosen picture the user has previously uploaded My current code . Is it possible to do something like : .. . .. . As one would with other fields Obviously the Uploadcare input widget has its own way of doing things hence the query . Comment : The POST variable is used to receive the data that is sent by the browser and you cannot use it to pass variables to an HTML template . However you may simply set a variable in PHP to the file id and then use it as input type hidden .. . value php echo empty fileId : fileId .. . Answer : As the documentation says https : uploadcare.com documentation widget input-value : .. . .. . The value of role uploadcare-uploader input is either empty or CDN link with file UUID . .. . If you externally set the value of the input and trigger the DOM change event it will be reflected in the widget . For example setting it to a file UUID or a CDN link will show that file as uploaded in the widget . You can do this on a live widget or even before it s actually loaded . So your second snippet should work correctly . You may also want to know the way to set widget s value via JS https : uploadcare.com documentation javascript api :", "Question : I m trying to get my head around the Uploadcare https : uploadcare.com API . Please excuse my ignorance for the question below . I have the Uploadcare uploader set to a maximum of 5 images . This appears to upload the files to Uploadcare correctly . What I m trying to do is grab hold of the newly created UUID of the file and store it in a form field for posting to my server-side app to process some other data and to store the UUID so the file can be processed via the REST api . In the end I m simply trying to capture the information and generate dynamically created hidden fields of the UUID so I can store them in a database . If I m going in the completely wrong direction on how this product is meant to be used please correct me as I m kinda stumped on this . .. . Answer : Chances are that you are using multiupload variant of Uploadcare widget and it returns group s UUID to the input field . To get UUIDs of individual files in a group you have to options : .. . .. . request group https : uploadcare.com documentation rest group info via REST API it will contain all files info .. . use JS API to get files UUIDs upon upload is complete : .. . .. . var multipleWidget uploadcare.MultipleWidget role uploadcare-uploader .. . uploadcare.jQuery skip this if you already have jQuery on the page .. . multipleWidget.onChange function group .. . if group .. . group group object .. . group.files array of file objects .. . .when.apply null group.files .then function .. . arguments array of individual file infos .. . .each arguments function .. . console.log this.cdnUrl URL of uploaded file .. . console.log this.uuid UUID of uploaded file .. . .. . .. . .. .", "Question : This is uploadcare http : uploadcare.com question . How to upload multiple-files using uploadcare js api I have this code but no luck Comment : It works with fileFrom but not filesFrom . Anyone can explain Thanks in adv .. . Answer : The difference between uploadcare.fileFrom and uploadcare.filesFrom is the first takes one initial object and returns exactly one uploadcare file the second takes array of objects and returns array of uploadcare files . So you do not need to iterate files to transmit it in filesFrom . Please look at live example http : jsbin.com zayuz 1 watch html js output Comment : nice....thank you", "Question : Implementing angular-uploadcare module which can be found here https : github.com uploadcare angular-uploadcare . Seems to work but Chrome is giving line 34 parse undefined error . How can this be addressed I ve pasted the code below . Comment : seems like something that should be available : docs.angularjs.org api ng service parse https : docs.angularjs.org api ng service 24parse Comment : I did google parse and found that link but I m not great with understanding angular s official documentation . Could you provide a hint as to what you mean Comment : this seems to be a bug in directive new version is coming up soon Comment : github.com uploadcare angular-uploadcare pull 9 https : github.com uploadcare angular-uploadcare pull 9 .. . Answer : It seems that this is a bug in version 0.1.2 . To fix that change the controller signature to : .. . .. . controller : scope element attrs parse log function scope element attrs parse log Comment : Thanks That s funny I actually had already changed that line in the controller because I think attrs was missing or misspelled or something like that but I didn t think to add parse . Thanks - great module Comment : please consider using the version from this PR https : github.com uploadcare angular-uploadcare pull 9 as it fixes that and also changes behavior a bit E - A", "Question : null .. . Answer : so here s the angular-uploadcare directive for uploadcare widget .. . .. . I am using mean.js I have followed the angular-uploadcare instructions : https : github.com uploadcare angular-uploadcare .. . .. . I am new to both Angular JS and the whole MEAN stack but I have the basics down a bit I think . What I want to do now is using this items.client.controller.js : .. . .. . I want to : .. . .. . bind the value of the widget to to items.image .. . retrieve the uploadcare CDN URL using the on-upload-complete .. . .. . but I have no idea how . For the first case I tried using image for ng-model . It didn t work . I think I should get the value from the on-upload-complete event but I do not know how to pass a custom function to the on-upload-complete attribute from the angular controller .. . .. . Please help . Thanks", "Question : Ive just started taking a look at the uploadcare product and its api . Ive just realized that the API only seems to allow you to upload files with no way of viewing a listing of the files once they are uploaded . Would anyone happen to know if its possible to use the widget to retrieve a listing of files that has been uploaded Comment : I just searched for uploadcare api list files https : duckduckgo.com q uploadcare+api+list+files . The first hit is their rest api documentation https : uploadcare.com documentation rest and includes a reference to GET files - you ve either not shown any effort or are not being clear in explaining what you re trying to do.. . Comment : nope definitely been searching alot on this topic i guess i just assumed that someone who makes a file-upload service would provide a simple jquery library to retrieve files from their cdn . i was mistaken Comment : It s a REST API - so jQuery.ajax http : api.jquery.com jQuery.ajax https : api.uploadcare.com files headers : authstuff .always FuncToHandleResponse .. . Answer : Based on mojo s answer http : stackoverflow.com questions 21775350 uploadcare-how-to-get-a-listing-of-files-like-a-file-manager 21778309 regarding REST requiring private keys here s a quick proof of concept of how you can do a back-end proxy in CFML : .. . .. . Again it s proof of concept not finalised code but should demonstrate the idea of how you can do it .", "Question : I m very new to Uploadcare . I am trying to retrieve a file UUID from Uploadcare then use that UUID to copy the image to my S3 storage bucket . I am using the Uploadcare API available on git-hub : here https : github.com uploadcare uploadcare-java . The code is super easy to implement . Here s what I have : .. . .. . This code compiles with no problem . Yet when I run it this is the error I see : .. . .. . Java Result : 1 .. . .. . Before the error however I do get a response from Uploadcare : type : url result : s3 : photopatch-upload messageImgs d5e97aca-f6d9-47ea-8c76-1fe36d093b2d uniqueness.jpg .. . .. . So I know I ve connected with Uploadcare correctly because the image is in fact copied . But after the copy the JSON that comes back may be malformed or something I m guessing here . Has anyone else had this issue or have some advice for me I would really appreciate it . I love this service and I think the issue has more to do with the com.faster.jackson.databind library . Here s a picture of the libraries I m using in this simple project : http : s3.postimg.org n37i2ts5f image.png Comment : there probably is a network issue as UploadcareNetworkException is raised you may want to look into it and find what causes this . Comment : @mojo I added a edit to my above question just to let everyone know that the transfer copy is occuring but there is a problem when the response of the successful transfer copy comes back . At this point I m using the REST API and that is working just fine . But I would like to get the Java library functioning . Comment : aha this is not a network issue System.out.println cannot output copyFile.result . You may need to cast it to something else or use other property .. . Answer : Try using .. . .. . System.out.println result : + copyFile .. . .. . i.e . copyFile instead of copyFile.result which is an instance of FileData that doesn t have toString method . Comment : I tried that...no luck . The program is crashing before it even reaches the system.out.print . When I remove the System.out.print The program still crashes with the same error . Comment : seems to be a bug : Comment : Our worst enemy.. . If I could help let me know.. .", "Question : I have a form which I want to validate with PHP . The poster upload from Uploadcare https : uploadcare.com s widget is part of that form . Sometimes users have to go backward in the form to fix stuff - an incorrect email etc . I want to have the chosen upload file persist within that form . This works when the back button is clicked but I cant rely on that . I m using PHP POST variables to reload and repopulate the form . My question : can I use a POST variables with the Uploadcare input button to make it remember and reload the chosen picture the user has previously uploaded My current code . Is it possible to do something like : .. . .. . As one would with other fields Obviously the Uploadcare input widget has its own way of doing things hence the query . Comment : The POST variable is used to receive the data that is sent by the browser and you cannot use it to pass variables to an HTML template . However you may simply set a variable in PHP to the file id and then use it as input type hidden .. . value php echo empty fileId : fileId .. . Answer : Sorted this . It can be done with Value . Great https : uploadcare.com documentation widget input-value", "Question : Ive just started taking a look at the uploadcare product and its api . Ive just realized that the API only seems to allow you to upload files with no way of viewing a listing of the files once they are uploaded . Would anyone happen to know if its possible to use the widget to retrieve a listing of files that has been uploaded Comment : I just searched for uploadcare api list files https : duckduckgo.com q uploadcare+api+list+files . The first hit is their rest api documentation https : uploadcare.com documentation rest and includes a reference to GET files - you ve either not shown any effort or are not being clear in explaining what you re trying to do.. . Comment : nope definitely been searching alot on this topic i guess i just assumed that someone who makes a file-upload service would provide a simple jquery library to retrieve files from their cdn . i was mistaken Comment : It s a REST API - so jQuery.ajax http : api.jquery.com jQuery.ajax https : api.uploadcare.com files headers : authstuff .always FuncToHandleResponse .. . Answer : Simple answer is You can t do it . More complex answer is You can but you have to do things read below . As already stated you can get list of files via REST API https : uploadcare.com documentation rest . To make request to REST API you have to provide both public and secret keys . Widget does not support listing files as it uses only public-key . Of course you can make API request via AJAX but you ll expose your secret-key and this will be on your conscience : . What you should do is build a backend view that fetches file list via REST and makes it available to you frontend . Then you can add custom dialog tab that will show the list somewhat similar is done in customization tutorial https : uploadcare.com tutorials customization tabs with favorite files .", "Question : I am using a tools uploadcare from uploadcare.com https : uploadcare.com .. . .. . I read the documentation but I cannot find how can we autostore when using javascript api to after upload a file . Is autostore feature only available on widget and REST api .. . Answer : Uploadcare https : uploadcare.com s autostore is covered here https : uploadcare.com documentation widget autostore .. . .. . Basically you need to enable autostore in project s settings it s on by default and on the page where you use upload dialog . So you can have several pages that enable automatic storing and some that don t .", "Question : I am using this uploadcare widget https : github.com uploadcare angular-uploadcare in my angularjs app although when I use an angular model as the value for an attribute in the app the uploadCare widget isn t effected . Everything works except for the derp value which I suspect is changed after the uploadcare-widget is made . Comment : Did you check if data-crop value changes in DOM I think that when widget instance is created any changes to input properties do not affect it . You may want to recreate widget . Comment : Data-crop values do change in the DOM . How do I recreate the widget on model change though Comment : not sure how to do that in Angular this snippet http : jsbin.com vetibu 1 watch html js output shows how to recreate widget in plain JS .. . Answer : The reason for it is that Uploadcare widget is created once and it doesn t update itself if input attrs change in the future . You can try to recreate it when you want to change cropping or other config : http : jsbin.com vetibu 1 watch html js output" ] }
[ "yes-answer-long", "yes-answer-short" ]
widget
UNK_RELATION
cdo.message@wsh@89
cdo.message -- part of microsoft s collaboration data objects cdo it is usually used by @placeholder or .net applications for e-mail message automation .
{ "confidence": [ 47.784366607666016, 35.79895782470703, 35.79895782470703, 32.34232711791992, 28.49102020263672, 28.327136993408203, 28.32463836669922, 28.228679656982422, 28.188995361328125, 28.105594635009766, 28.03888702392578, 27.446380615234375, 27.438365936279297, 27.316787719726562, 27.00190544128418, 26.93944549560547, 26.69089126586914, 26.68645477294922, 26.49155044555664, 26.228099822998047, 26.228099822998047, 26.204309463500977, 25.918766021728516, 25.707134246826172, 25.588600158691406, 25.36421012878418, 24.946699142456055, 24.863990783691406, 24.762662887573242, 24.235950469970703, 24.235950469970703, 24.235950469970703, 23.853397369384766, 23.79435920715332, 23.79435920715332, 23.79435920715332, 23.79435920715332, 23.79435920715332, 23.790645599365234, 23.770299911499023, 23.666797637939453, 23.4665470123291, 23.137235641479492, 23.013273239135742, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.707658767700195, 22.655550003051758, 22.53759002685547, 22.498825073242188, 22.498825073242188, 22.498825073242188, 22.450328826904297, 22.433624267578125, 22.42728614807129, 21.62100601196289, 21.41495132446289, 21.35595703125, 21.35595703125, 21.280052185058594, 21.269014358520508, 21.044029235839844, 21.044029235839844, 20.923622131347656, 20.85519027709961, 20.76519203186035, 20.72357177734375, 20.704830169677734, 20.649059295654297, 20.649059295654297, 20.649059295654297, 20.33296775817871, 20.040149688720703, 19.863601684570312, 19.814468383789062, 19.80242919921875, 19.551204681396484, 19.551204681396484, 19.551204681396484, 19.551204681396484, 19.551204681396484, 19.551204681396484, 19.551204681396484, 19.38915252685547, 19.38915252685547, 19.2351131439209, 19.118122100830078, 18.691808700561523, 18.496646881103516, 18.496646881103516, 18.407886505126953, 18.348970413208008 ], "content": [ "Yes this technology is being used exatcly for the simplifying the messaging : .. . .. . ASP Sending e-mail with CDOSYS http : www.w3schools.com asp asp send email.asp : .. . .. . CDO Collaboration Data Objects is a Microsoft technology that is designed to simplify the creation of messaging applications .", "possible duplicate of Why avoid CDO for sending mail in .NET", "http : stackoverflow.com questions 5503153 why-avoid-cdo-for-sending-mail-in-net", "CDO takes it s default settings from Windows Mail Outlook Express Microsoft Internet Mail and News .", "Is there a problem with using CDO to deliver email over current .NET methods", "I try to send e-mails using the CDO of Excel VBA .", "I have had great reliability using CDO to deliver mail in the past as a part of a vbscript I wrote and am going to look at integrating that over Net.Mail .", "@Ralph i m using Microsoft CDO for Windows 2000 Library .", "No authentication using CDO on Network Solutions and the CDO will fail", "i have following CDO.Message object .", "@Gaby : Just the e-mail addresses .", "In this line expressionmatch RegularExpressionObject.Test Request.Form E-mail the word E-mail is the name of the form field containing the sender s email-address .", "Do they need to have SMTP set up on their own server in order to use CDO.Message to send mail through a remote host", "Error Codes Send Feedback .. . .. . : : : : : : : .. . CDO for Windows 2000 Reference .. . Declaration .. . .. . .. . .. . Error Codes This section contains the custom error codes used by Microsoft CDO for Windows 2000 .", "See this question stackoverflow.com questions 9669644 http : stackoverflow.com questions 9669644 send-mail-with-cdo-through-google-apps-gives-transport-error-cdo-message-1-erro", "Poor 1 2 3 4 5 Outstanding To e-mail your feedback to Microsoft click here : .. . 2005 Microsoft Corporation .", "I use Cdo.Message .", "I m trying to create a new email in asp and send it to a mail-server using CDO .", "ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpserver mail.yoursite.com .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpserverport 465 or 587 .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpusessl True .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpconnectiontimeout 60 .. . .. . Google apps mail servers require outgoing authentication .", "Is this a bug in CDO", "No CDO is fine .", "CDO is just a delivery mechanism .", "The scripts are simply building strings assigning them to CDO.Message .HtmlBody then sending them using CDO.Message .send .. . .. . What could possibly be causing this", "My first idea was extract message from .eml file and return CDO message .", "Only work arounds are to use something other than CDO to send your mail .", "How can I impersonate with CDO", "I m trying to use CDO.Message to send emails from my web server .", "After I created a method using CDO and a method using net.mail the CDO method works perfectly .", "Possible duplicate of Classic ASP Sending E-mail error 8004020f http : stackoverflow.com questions 19289019 classic-asp-sending-e-mail-error-8004020f", "Have you added CDO reference to your project", "How to trace CDO generated emails in Outlook", "Did you look at CDO documentation and the stuff", "ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration sendusing 2 Send the message using the network SMTP over the network .", "yet the E-Mail sent anyways without me putting that info .", "Does this mean the smtp server allows relaying with only the E-Mail address", "We will show you how to use this component to send e-mail with ASP .", "Does this mean the smtp server allows relaying with only the E-Mail address", "I doubt you expect a user to open a 150 MB+ e-mail", "CDO is an ActiveX component .", "enter image description here http : i.stack.imgur.com y1ysM.png .. . .. . Below is part of my script to send email by CDO", "I get this error when sending a mail through asp using gmail I already used ports 465 587 and 25 with same results .. . .. . Dim mail dim email2 as string dim urlms as string .. . .. . .. . Dim mail .. . dim email2 as string .. . dim urlms as string .. . .. . .. . mail CreateObject CDO.Message .. . urlms http : schemas.microsoft.com cdo configuration .. . mail.Configuration.Fields.Item urlms sendusing 2 enviar usando port .. . mail.Configuration.Fields.Item urlms smtpserver smtp.gmail.com .. . mail.Configuration.Fields.Item urlms smtpserverport 465 .. . mail.Configuration.Fields.Item urlms smtpusessl True .. . mail.Configuration.Fields.Item urlms smtpconnectiontimeout 60 .. . mail.Configuration.Fields.Item urlms + smtpauthenticate 1 .. . mail.Configuration.Fields.Item urlms + sendusername login .. . mail.Configuration.Fields.Item urlms + sendpassword password .. . .. . mail.Configuration.Fields.Update .. . .. . mail.Send", "I added these lines : .Item schemas.microsoft.com cdo configuration sendusing http : schemas.microsoft.com cdo configuration sendusing 22 2 .Item schemas.microsoft.com cdo configuration smtpserver http : schemas.microsoft.com cdo configuration smtpserver 22 smtp.gmail.com .Item schemas.microsoft.com cdo configuration smtpserverport http : schemas.microsoft.com cdo configuration smtpserverport 22 465 .Item schemas.microsoft.com cdo configuration sendusername http : schemas.microsoft.com cdo configuration sendusername 22 email@gmail.com .Item schemas.microsoft.com cdo configuration sendpassword http : schemas.microsoft.com cdo configuration sendpassword 22 password .Item schemas.microsoft.com cdo configuration smtpusessl http : schemas.microsoft.com cdo configuration smtpusessl 22 true .Item schemas.microsoft.com cdo configuration smtpauthenticate http : schemas.microsoft.com cdo configuration smtpauthenticate 22 1", "http : classicasp.aspfaq.com email why-does-cdo-message-give-me-8004020f-errors.html .. . .. . Here is the code I finally got to work .", "I didn t know if there was a way to use the CDO ActiveX component in .Net 4.5 doesn t matter anymore though .", "Aside from CDO being obsolete - the problem could easily be configuration or permissions .", "It doesn t matter whether CDO or the Outlook object-model is responsible for delivering emails .", "yes i have added CDO reference to my project", "I believe I need a reference for CDO or Send Email functionality .", "The CDO Object Model I m using windows-xp or windows-server-2003 .", "I m using ASP classic and CDO to send email with CreateMHTMLBody method .", "I m using CDO to send messages now directly from the code-behind .", "Removing the dependency to CDO if possible could increase your page responsiveness as well", "I had similar issues trying to get CDO to work .", "mark in email body using CDO object in Classic ASP .", "Has anyone been able to download email that contains attachment with CDO in vb6", "In my unit test method i have a private method which would pick up and eml file and returns me an CDO.Message and this object is passed to onArrival .", "see here : stackoverflow.com questions 10482053 http : stackoverflow.com questions 10482053 cdo-message-send-causes-script-execution-timeout", "I meant the asp vbs code you use to add the attachment to your cdo.message object", "Is it possible to use CSS via a style section or even an external CSS file from a VBScript using CDO.Message to send email", "I found a really cool article on this website Why does CDO.Message give me 8004020F errors", "find there line .Item schemas.microsoft.com cdo configuration sendusing http : schemas.microsoft.com cdo configuration sendusing 22 2", "If I remember correctly the last time I tested a CDO program that used the same gmail address for the To and From I received an error .", "However we are setting Mail.Configuration.Fields.Item schemas.microsoft.com cdo configuration sendusing http : schemas.microsoft.com cdo configuration sendusing 22 2 as most people suggest for that error .", "My SMTP Server Name is absolutely correct as I used the same server in my other .Net applications hosted on the same server to this ASP application .", "CDO E NOT FOUND 0x800CCE05L The requested body part was not found in this message .", "However if I tried my E-Mail to another Email domain I get Relay access denied .", "What you mean is you have a base64 encoded file and you want to attach it to the e-mail .", "Your provided sample code is not SMTP Authenticated...please try to use SMTP Authenticated script. . .. . .. . .Item http : schemas.microsoft.com cdo configuration smtpauthenticate cdoBasic .. . .Item http : schemas.microsoft.com cdo configuration sendusername mail@yourdomain.com .. . .Item http : schemas.microsoft.com cdo configuration sendpassword email account password .. . .. . After that have a check with email delivery .", "stackoverflow.com questions 21402548 http : stackoverflow.com questions 21402548 tls-using-classic-asp-to-send-mail - open google and type in CDO TLS you will get a plethora of information on this issue .", "@kricket I had created this by referring to CDO object-model in MSDN long back 4 years ago to send the status email automatically for a project .", "when i call the public-method .. . .. . b.OnArrival msg ref cdoevent .. . .. . An exception is thrown in Msg.EnvelopeFields http : schemas.microsoft.com cdo smtpenvelope recipientlist .", "If you want to send a mail to multiple recipients you should make that .. . .. . or better build a recipient list assuming that your used range starts with headers in the first table row : .. . .. . and send the message just once .", "I can send mails using all these 3 ways SMTP CDO and Microsoft Outlook Object MOO out of which I can only see my sent mails with MOO .", "Anyway I tried also without the plus to concatinate and didnt work either finally I used this : .. . .. . .. . Dim ObjSendMail .. . Set ObjSendMail CreateObject CDO.Message .. . .. . This section provides the configuration information for the remote SMTP server .", "I m trying to send an email using VBA and CDO using the following code I found it in Stack Overflow in this link Couldn t send message to SMTP server .", "Unlike other objects created in VBScript Office applications won t automatically terminate with the script so you have to handle it yourself :", "Network solutions Windows Server will only work with CDO when employing Authentication : cdoSMTPAuthenticate cdoSendUsername cdoSendPassword must be defined .", "Until I find a scenario where CDO doesnt work I am going to use it .", "I suspect this question is asked hoping that CDO by itself implements POP or IMAP client retrieval of email - which it does not .", "Mail server is Exchange .", "There are many possible sources : .. . .. . the recordset is closed at this point for some reason .. . there is no Email field in the recordset .. . E-Mail address invalid .. . .. .", "I have also tried to configure my SMTP server inside the IIS Website -- SMTL E-mail and changing the smtp server in the ASP code to localhost .", "What mail-server are you using", "Am I totally going to wrong direction and should instead use a precompiled SMTP Mail application I can drop in as part of my application", "We are using CDO + VBScript for adding some text to outgoing SMTP messages via Event Sink on Exchange 2003 .", "From what I gather this guy wants to put an table from Excel into an email using VBA CDO .", "From what I gather this guy wants to put an table from Excel into an email using VBA CDO", "Note that you need to use port 25 for smtp if you re using CDO with office365 it doesn t like 587 .", "After reading more last night MS dropped CDO for versions of Office 2010 .", "Anyway with CDO you can use the following line to remove all attachments : Mail.Attachments.DeleteAll .", "We have a legacy FoxPro application that uses CDO for NTS to send STMP email through our Exchange server .", "I am using a server-side script using CDO on Network solution that is now failing with a 500 server error Have they changed their Windows servers", "@Beaner I have a code which uses cdo to send email direct through the email server but am interested in direct retrieval in vb6 .", "The size is accounted for by attachments to the mail .", "The from address is valid live account on the mail-server .", "I have Office 2003 VBA code that uses the technique described here http : www.outlookcode.com d code htmlimg.htm to embed an image in an HTML message using undocumented MAPI properties and CDO 1.21 .", "I have this mostly working but I am unable to send e-mail through it .", "It is able to send e-mails to localhost without authentication which are then passed through to the mail-server with authentication for sending to their destination .", "So is there anyway I can send mail with HTML body and sync the sent mail with Sent Folder .", "Following line of the code seems to have an issue but i could not find what .. . .. . Before giving any answer or suggestion please keep in mind .. . .. . This code works fine when I use any static email-address in TO attribute of CDO Message object .. . The query is giving accurate results .. . I receive 500 Internal server error when i use dynamic email email from the query in the TO attribute of CDO Message object ." ] }
{ "confidence": [ 62.165348052978516, 50.38373947143555, 46.081382751464844, 43.65993118286133, 43.45842361450195, 42.74624252319336, 41.71195602416992, 40.56315612792969, 40.49488067626953, 39.13135528564453, 38.30150604248047, 36.54973602294922, 36.40542984008789, 36.21614074707031, 36.1583251953125, 35.888153076171875, 35.853485107421875, 34.759033203125, 33.98419952392578, 33.65134048461914 ], "content": [ "Question : I had to redo a script using the following start and end code in ASP using CDOSYS . I do not know much about ASP or ASP.NET The smtp I used requires user pass auth . yet the E-Mail sent anyways without me putting that info . Does this mean the smtp server allows relaying with only the E-Mail address .. . Answer : Yes this technology is being used exatcly for the simplifying the messaging : .. . .. . ASP Sending e-mail with CDOSYS http : www.w3schools.com asp asp send email.asp : .. . .. . CDO Collaboration Data Objects is a Microsoft technology that is designed to simplify the creation of messaging applications . .. . CDOSYS is a built-in component in ASP . We will show you how to use this component to send e-mail with ASP .", "Question : I get this error when sending a mail through asp using gmail I already used ports 465 587 and 25 with same results .. . .. . Dim mail dim email2 as string dim urlms as string .. . .. . .. . Dim mail .. . dim email2 as string .. . dim urlms as string .. . .. . .. . mail CreateObject CDO.Message .. . urlms http : schemas.microsoft.com cdo configuration .. . mail.Configuration.Fields.Item urlms sendusing 2 enviar usando port .. . mail.Configuration.Fields.Item urlms smtpserver smtp.gmail.com .. . mail.Configuration.Fields.Item urlms smtpserverport 465 .. . mail.Configuration.Fields.Item urlms smtpusessl True .. . mail.Configuration.Fields.Item urlms smtpconnectiontimeout 60 .. . mail.Configuration.Fields.Item urlms + smtpauthenticate 1 .. . mail.Configuration.Fields.Item urlms + sendusername login .. . mail.Configuration.Fields.Item urlms + sendpassword password .. . .. . mail.Configuration.Fields.Update .. . .. . mail.Send Comment : I hope that s not your real credentials it would be really silly posting them in a public area like SO . Comment : Looking at Google - Get started with IMAP and POP3 https : support.google.com mail troubleshooter 1668960 hl en ts 1665119 1665162 your settings are correct . Comment : Don t worry i though i fixed it : P .. . Answer : It worked like a charm for my own mail-server but It fails with Gmail I don t know why... . Anyway I tried also without the plus to concatinate and didnt work either finally I used this : .. . .. . .. . Dim ObjSendMail .. . Set ObjSendMail CreateObject CDO.Message .. . .. . This section provides the configuration information for the remote SMTP server . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration sendusing 2 Send the message using the network SMTP over the network . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpserver mail.yoursite.com .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpserverport 465 or 587 .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpusessl True .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpconnectiontimeout 60 .. . .. . Google apps mail servers require outgoing authentication . Use a valid email-address and password registered with Google Apps . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpauthenticate 1 basic clear-text authentication .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration sendusername somemail@yourserver.com your Google apps mailbox address .. . ObjSendMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration sendpassword yourpassword Google apps password for that mailbox .. . .. . ObjSendMail.Configuration.Fields.Update .. . .. . ObjSendMail.To someone@someone.net .. . ObjSendMail.Subject this is the subject .. . ObjSendMail.From someone@someone.net .. . .. . we are sending a text email. . simply switch the comments around to send an html-email instead .. . ObjSendMail.HTMLBody this is the body .. . ObjSendMail.TextBody this is the body .. . .. . ObjSendMail.Send .. . .. . Set ObjSendMail Nothing .. . .. . http : somee.com DOKA DoHelpTopics.aspx docode false thnid 102 http : somee.com DOKA DoHelpTopics.aspx docode false thnid 102 .. . .. . And worked like a charm for my server but it didn t work for gmail .", "Question : I have some ASP code that I ve inherited from my predecessor no it s not an option to update it at this time...It would take an act of not only Congress but every other foreign country too and I m having an issue sending mail on one of the pages . It is an almost identical code snippet from the other page but this one throws an error when I try to Send . Code below : .. . .. . The error thrown is : Error Type : 0x8004020F The event class for this subscription is in an invalid partition .. . .. . I d appreciate any and all help Thanks JFV Comment : what part is not identical to the other page Comment : @Gaby : Just the e-mail addresses . I have confirmed that the addresses are valid and from my domain . .. . Answer : I had similar issues trying to get CDO to work . I found a really cool article on this website Why does CDO.Message give me 8004020F errors http : classicasp.aspfaq.com email why-does-cdo-message-give-me-8004020f-errors.html .. . .. . Here is the code I finally got to work . I could never get localhost to work as the SMTP Server . Find out what the name of the mail-server is and make sure to use that name . Comment : I ll check it out tomorrow when I get back in the office . Thanks for the info . I ll let you know how it goes . Comment : @JFV : The problem with your code is that it is modifing an existing configuration object which would be initialised from IIS config . The code in this answer is creating a fresh instance of a configuration object and replacing the default configuration . Other than that this code does exactly the same as your code but utalises the type library declarations . The reference to the ADO library is not necessary in this case . Comment : Worked like a charm I appreciate all the help", "Question : I get this error when sending a mail through asp using gmail I already used ports 465 587 and 25 with same results .. . .. . Dim mail dim email2 as string dim urlms as string .. . .. . .. . Dim mail .. . dim email2 as string .. . dim urlms as string .. . .. . .. . mail CreateObject CDO.Message .. . urlms http : schemas.microsoft.com cdo configuration .. . mail.Configuration.Fields.Item urlms sendusing 2 enviar usando port .. . mail.Configuration.Fields.Item urlms smtpserver smtp.gmail.com .. . mail.Configuration.Fields.Item urlms smtpserverport 465 .. . mail.Configuration.Fields.Item urlms smtpusessl True .. . mail.Configuration.Fields.Item urlms smtpconnectiontimeout 60 .. . mail.Configuration.Fields.Item urlms + smtpauthenticate 1 .. . mail.Configuration.Fields.Item urlms + sendusername login .. . mail.Configuration.Fields.Item urlms + sendpassword password .. . .. . mail.Configuration.Fields.Update .. . .. . mail.Send Comment : I hope that s not your real credentials it would be really silly posting them in a public area like SO . Comment : Looking at Google - Get started with IMAP and POP3 https : support.google.com mail troubleshooter 1668960 hl en ts 1665119 1665162 your settings are correct . Comment : Don t worry i though i fixed it : P .. . Answer : Note : The message says LOGON ERROR . Make sure name and password is correct .", "Question : Is it possible to use CSS via a style section or even an external CSS file from a VBScript using CDO.Message to send email Here is what I ve tried : .. . .. . Which doesn t work . However doing it inline does : .. . .. . All messages will be delivered to Outlook . Comment : This probably has more to do with the mail client s ability to interpret style elements . CDO is just a delivery mechanism . Comment : I m voting to close this question as off-topic because it was a simple typo not related to the actual technologies referenced in the question . .. . Answer : It doesn t matter whether CDO or the Outlook object-model is responsible for delivering emails . The viewer plays the key role there . As you may probably know Outlook uses Word for rendering HTML markup . The following articles describe supported and unsupported HTML elements attributes and cascading style sheets properties : .. . .. . Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 Part 1 of 2 https : msdn.microsoft.com en-us library aa338201 v office.12 .aspx .. . Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007 Part 2 of 2 https : msdn.microsoft.com en-us library aa338200 v office.12 .aspx", "Question : Is it possible to use CSS via a style section or even an external CSS file from a VBScript using CDO.Message to send email Here is what I ve tried : .. . .. . Which doesn t work . However doing it inline does : .. . .. . All messages will be delivered to Outlook . Comment : This probably has more to do with the mail client s ability to interpret style elements . CDO is just a delivery mechanism . Comment : I m voting to close this question as off-topic because it was a simple typo not related to the actual technologies referenced in the question . .. . Answer : I forgot the . in my class definition . It works fine . :", "Question : null .. . Answer : I am trying to use the new .NET methods of sending email System.Net.Mail but I have various troubles along the way . My VB.NET app allows users to gather info and email it out based on the smtp server specs they set . Current issues are sending using STARTTLS i think thats what its called and doing things like authenticating via POP before being granted the ability to send . I have had great reliability using CDO to deliver mail in the past as a part of a vbscript I wrote and am going to look at integrating that over Net.Mail . Is there a problem with using CDO to deliver email over current .NET methods Is it deprecated or bad practice Is there any limitation based on current email technology Am I totally going to wrong direction and should instead use a precompiled SMTP Mail application I can drop in as part of my application I have seen people do this over writing their own code to deliver mail . If you like this method what are some good choices Comment : possible duplicate of Why avoid CDO for sending mail in .NET http : stackoverflow.com questions 5503153 why-avoid-cdo-for-sending-mail-in-net Comment : The System.Net.Mail library is designed to be really easy to use . What mail-server are you using I just experimented with using System.Net.Mail to send email out via two web-hosting companies and it was fairly easy to do . Comment : I am testing against smtp.verizon.net . After I created a method using CDO and a method using net.mail the CDO method works perfectly . Until I find a scenario where CDO doesnt work I am going to use it . Comment : I could not deliver on port 465 when using Net.Mail . This is likely due to the fact that Verizon blocks outgoing connections on port 25 SMTP on consumer grade connections . Most of the people that use my application would be on Corp ISPs that would never block port 25 . The way I see it if I was going to use the software in my business I may test it first at home or on another network . Core functionality not working because of a technicality won t be good for sales .", "Question : I have a legacy ASP application that I moved from a old server to Windows 2012 server with IIS 8.5 . I see the email sending is failing with the below error in IIS logs . 80040220 The SendUsing configuration value is invalid .. . .. . Current code is .. . .. . I have read a few other articles over Internet and this http : stackoverflow.com questions 582756 smtp-configuration-sendusing-configuration-value-is-invalid-with-asp-classic as well . I add a little bit of configuration in the code as shown in all other articles .. . .. . But I still get the same error . My SMTP Server Name is absolutely correct as I used the same server in my other .Net applications hosted on the same server to this ASP application . The .Net app works well with the same configuration . I m not sure if ASP pages need any other configuration installation required . I have also tried to configure my SMTP server inside the IIS Website -- SMTL E-mail and changing the smtp server in the ASP code to localhost . But it also resulted in the same error . EDIT : Application Pool is set to Classic Pipeline Mode and Identity as NetworkService .. . Answer : Your provided sample code is not SMTP Authenticated...please try to use SMTP Authenticated script. . .. . .. . .Item http : schemas.microsoft.com cdo configuration smtpauthenticate cdoBasic .. . .Item http : schemas.microsoft.com cdo configuration sendusername mail@yourdomain.com .. . .Item http : schemas.microsoft.com cdo configuration sendpassword email account password .. . .. . After that have a check with email delivery . Comment : Authentication depends on the SMTP setup for ex : If I have to use gmail to send emails I will have to provide user name password etc.. .", "Question : null .. . Answer : I try to send e-mails using the CDO of Excel VBA . The SMTP server I use require that I send the message with TSL encryption and not SSL . I ve tested it with email sent from an ordinary mailprogram changing between SSL and TLS . When sending a message using the .. . .. . I get the transport could not connect to the server I ve translated it from danish . All parameters ARE correct concerning the fields . I ve tested with other STMP-servers NOT using TSL-encryption sending mail without problems . Therefore I don t include these lines . Fields used : sendusing smtpserver smtpserverport smtpauthenticate smtpusessl sendusername sendpassword smtpconnectiontimeout . Is it possible to send using the TSL encryption I ve found nothing on the net 10+ hours of research .. . .. . Thank you .", "Question : I get this error when sending a mail through asp using gmail I already used ports 465 587 and 25 with same results .. . .. . Dim mail dim email2 as string dim urlms as string .. . .. . .. . Dim mail .. . dim email2 as string .. . dim urlms as string .. . .. . .. . mail CreateObject CDO.Message .. . urlms http : schemas.microsoft.com cdo configuration .. . mail.Configuration.Fields.Item urlms sendusing 2 enviar usando port .. . mail.Configuration.Fields.Item urlms smtpserver smtp.gmail.com .. . mail.Configuration.Fields.Item urlms smtpserverport 465 .. . mail.Configuration.Fields.Item urlms smtpusessl True .. . mail.Configuration.Fields.Item urlms smtpconnectiontimeout 60 .. . mail.Configuration.Fields.Item urlms + smtpauthenticate 1 .. . mail.Configuration.Fields.Item urlms + sendusername login .. . mail.Configuration.Fields.Item urlms + sendpassword password .. . .. . mail.Configuration.Fields.Update .. . .. . mail.Send Comment : I hope that s not your real credentials it would be really silly posting them in a public area like SO . Comment : Looking at Google - Get started with IMAP and POP3 https : support.google.com mail troubleshooter 1668960 hl en ts 1665119 1665162 your settings are correct . Comment : Don t worry i though i fixed it : P .. . Answer : Also why are you using plus to concatinate the three config items . Your code Dims everything twice . And it dims things as strings . You are creating objects without using Set . I doubt your code runs to generate an error . Comment : It worked like a charm for my own mail-server but It fails with Gmail I don t know why", "Question : I have written many apps that send emails normally I create an SMTP client authenticate with username and password and that s it I am now updating some OLD classic ASP code where they sent an email like so : .. . .. . I ve Google d and found that obviously the CDO objects were deprecated long ago .. . .. . my question is : .. . .. . Is this code above actually able to send emails without creating some type of client with authentication AND what is the best way to update this code with using c 4.5 Comment : What do you mean by creating some type of client Any time you send an SMTP mail you have to create a client . Comment : @DavidG - ok what I meant how were is that info stored in a classic asp site Comment : @DavidG - and I understand that but did classic ASP have something built-in that made it so you didn t have to make a client because they do it for you Comment : CDO is an ActiveX component I can t remember where it gets it s settings from . It wasn t created for ASP specifically but it pretty much became the de facto way to bodge email into your ASP applications . Comment : @Vogel612 - meant I need to either access this same ActiveX component from .Net 4.5 or find their credentials to create my own SMTP client . Neither matters now the client decided to not have me do the job and is sticking with classic ASP . oh well I was just commenting so you understood .. . Answer : CDO is an ActiveX component . It wasn t created for ASP specifically but it pretty much became the de facto way to bodge email into your ASP applications . It becomes your SMTP client and generally uses a local SMTP server to relay email to another SMTP server for onward transmission . To send emails in the land of .Net 4.5 using C use Comment : that is exactly what I thought I usually send emails this way . I didn t know if there was a way to use the CDO ActiveX component in .Net 4.5 doesn t matter anymore though . The client decided to stick with classic ASP - even though i recommended otherwise and told them that classic asp was officially deprecated 13 years ago while I was still in High School", "Question : does anyone know how to remove an attachment object from VBA i m trying to do an application in Excel using VBA such it will will send emails depending on the data found on the excel file . In my code below the emails are sent however the last email has all the attachments from the previous ones . Any help would be appreciated . Comment : It seems to me that you are using early-binding and therefore have a reference to Microsoft Outlook xx.0 Object Library . If that s the case you should have auto-complete in the VBE and should be able to see the various options for Mail . including Mail.Attachments.Remove . If you are using another library for early-binding then please include it in your post . Comment : @Ralph i m using Microsoft CDO for Windows 2000 Library . Should i be using any other reference Comment : No CDO is fine . Just include it the next time in your post . I changed your post to include the appropriate flag . Anyway with CDO you can use the following line to remove all attachments : Mail.Attachments.DeleteAll . Comment : Thanks it works .. . Answer : The following line of code should work :", "Question : null .. . Answer : A client of ours migrated a Classic ASP application to Windows Server 2012 and pages that send email stopped working . They would like to start sending email via a remote office365 host . Do they need to have SMTP set up on their own server in order to use CDO.Message to send mail through a remote host Thank you Comment : The simple answer to your question is no they wouldn t . See the remote-server configuration here . webcheatsheet.com asp sending email asp.php http : webcheatsheet.com asp sending email asp.php . Note that you need to use port 25 for smtp if you re using CDO with office365 it doesn t like 587 . Comment : Perhaps you could elaborate a bit more @John We are getting the error that The SendUsing configuration value is invalid . However we are setting Mail.Configuration.Fields.Item schemas.microsoft.com cdo configuration sendusing http : schemas.microsoft.com cdo configuration sendusing 22 2 as most people suggest for that error . The only other solution I say is people hinting that SMTP might be the issue Comment : That should work unless there are specific issues regarding the security settings of your server - see this question . stackoverflow.com questions 582756 http : stackoverflow.com questions 582756 smtp-configuration-sendusing-configuration-value-is-invalid-with-asp-classic Comment : We are already following the steps outlined in the question you linked @John by setting our sendusing field to 2 along with the other fields .", "Question : I have a class a1 which is implementing ISMTPOnArrival . In my public-method .. . .. . I am writing an Nunit Test for this event sink . In my unit test method i have a private method which would pick up and eml file and returns me an CDO.Message and this object is passed to onArrival . when i call the public-method .. . .. . b.OnArrival msg ref cdoevent .. . .. . An exception is thrown in Msg.EnvelopeFields http : schemas.microsoft.com cdo smtpenvelope recipientlist . Can some one please let me know what is the issue . The exception is The requested property or feature while supported is not available at this time or in this context . .. . Answer : There is a work around and had a flag which was set up and if it is a unit test then i would hardcode a envelope fields . This was working .", "Question : null .. . Answer : I use this successfully in MS Excel to send SMTP email through our server .. . .. . when I copy and paste to a module in MS Access where I really need it I get .. . .. . Run-time error 80040213 The transport failed to connect to server .. . .. . What is up here thanks .. . .. . I am running Win7 with MS Office 2010 . also these are enabled in MS VBA References .. . .. . MS CDO for Windows 2000 Library MS DAO 3.6 Object Library MS ActiveX Data Objects 2.8 Library OLE Automation MS Access 14 Object Libary Comment : Do you know which line is raising the error Comment : Yes it is the .Send one . After reading more last night MS dropped CDO for versions of Office 2010 . Thanks for asking", "Question : null .. . Answer : I m trying to use CDO.Message to send emails from my web server . Everything works OK when sending to an internal email-address but fails when sending to an external one . Line 46 is myMail.Send .. . .. . I ve tried it with authentication currently commented out tried it without and still get the same error . Tried the various suggestions I ve found on here but nothing worked so far . I m assuming it s an authentication issue but it failed even when I used authentication . The from address is valid live account on the mail-server . And the user pass settings used were for the from address . Any pointers to pinpoint this Web server is IIS6 on Windows Server 2003 R2 . Mail server is Exchange . update - i m now trying to use gmail to send the email and getting a different error . and the code i m using is Comment : If you re using authentication then you need another configuration line to specify this - eg myMail.Configuration.Fields.Item http : schemas.microsoft.com cdo configuration smtpauthenticate 1 if you re using basic authentification . This link may be useful powerasp.net content new sending email cdosys.asp http : www.powerasp.net content new sending email cdosys.asp Comment : i ve tried that and it still produces the same error unfortunately . i also have a gmail account that i ve tried to use for SMTP and i can t get that to work either . Comment : i ve updated the original question to include my gmail attempt - which also fails . Comment : I think the gmail smtp server uses port 587 Comment : fails on port 587 too", "Question : I m programming Classic Asp with IIS8.5 so for sending email I use the SMTP Service not the SMTP Server with the CDO component . I want to send email using the pickup directory option : .. . .. . So my code is : .. . .. . As you may know IIS8.5 come without SMTP Server so there is no folder for the pickup directory or I haven t found it yet you must created the problem I m having is that the emails are getting stuck into the folder I created for that purpose . https : support.google.com a answer 176600 hl es Comment : Might seem obvious but I have to ask.. . did you install the SMTP server service via the Add Roles and Features GUI or via PowerShell with Install-WindowsFeature -name SMTP-Server Comment : Couldn t you just set sendusing to 2 and remove the need for a pickup directory . You can specify a remote smtp server . See this question stackoverflow.com questions 9669644 http : stackoverflow.com questions 9669644 send-mail-with-cdo-through-google-apps-gives-transport-error-cdo-message-1-erro Comment : yes @John I setted sendusing to 2 but the performance is very slow so I want to try with pickup directory. . Comment : Hi @Kev I just installed IIS8.5 via Windows Features and .NET Framework 3.5 .. . Answer : When you use the cdoSendUsingPickup option you are simply writing the email message to a file which will be queued up for delivery asyncronously from your code . Yes this is dramatically faster as your code does not have to wait for the SMTP server to receive the message . So when using this option you do not need to specify the destination SMTP server the port the username password etc . Hopefully you are now asking yourself how does the server know where to send the message to if I don t specify a forwarding SMTP server . Well that s because you just have to configure the Microsoft SMTP Service to let it know what server to hand off the messages to . There are plenty of articles online to configure it so you should not have any trouble finding that .", "Question : I need to sync sent mails with the sent folders of mail servers for the users to see at future moments . I can send mails using all these 3 ways SMTP CDO and Microsoft Outlook Object MOO out of which I can only see my sent mails with MOO . Now the problem is Not all clients are using outlook and thus its more impractical to use this . Out of exercise I had also used MAPI to send mails but that don t send HTML body . Also I looked over this topic Microsoft Sent folder http : stackoverflow.com questions 25900131 microsoft-sent-folder but that don t solve my problem . So is there anyway I can send mail with HTML body and sync the sent mail with Sent Folder . Thanks . .. . Answer : You can do that with Extended MAPI C++ or Delphi but you probably mean Simple MAPI . If you are connecting to an Exchange mailbox EWS is another option .", "Question : null .. . Answer : hello i tried to send email in excel .. . .. . here is my code .. . .. . but when i run this it is giving me runtime-error when i try to send mail. . for me coding seems correct . . i dont know what is the issue . . please help Comment : Have you added CDO reference to your project Comment : If I remember correctly the last time I tested a CDO program that used the same gmail address for the To and From I received an error . As soon as I sent from one address to another it went away . I would recommend checking that first . Comment : yes i have added CDO reference to my project Comment : i have added different to and from but still i am getting same error . Comment : Have you tried on port 465 instead of 587", "Question : I m using ASP classic and CDO to send email with CreateMHTMLBody method . I have couple of images in my email which some of them are static and would not change but some of them will-change based on email content . Some of the mail softwares like iCloud showing the pictures as attachment even though I have them all with full path url address . I ve used AddRelatedBodyPart but right now they show the images in the place that thy have to be but still they show the images in attachment as well . I want the picture just show in body of email not in attachment . Does any one know how to fix this Here is the example of my code : .. . .. . Thanks in advance for your time and help . .. . Answer : The CreateMHTMLBody is not what you need . This method will create a multipart message fetching the URL and post processing the HTML returned . It fetches the resource for every img src it finds encodes the returned resource as a body part and updates the HTML img src to point at the body part . Also CreateMHTMLBody is not a good thing to use in ASP code since it uses the WinINET Http stack to fetch resources WinINET should not be used from ASP code . What you really need is to use something like WinHTTP to fetch the HTML resource and then assign that to the Message s HTMLBody property ." ] }
[ "yes-answer-long", "yes-answer-short" ]
wsh
UNK_RELATION
wro4j@csslint@107
wro4j -- free and open-source java project which brings together almost all the modern web tools : jshint @placeholder jsmin google-closure compressor yui-compressor uglifyjs dojo shrinksafe css variables support json compression less sass coffeescript and much more .
{ "confidence": [ 40.20939636230469, 35.937801361083984, 34.49603271484375, 34.37398147583008, 34.33120346069336, 33.98398208618164, 33.90435791015625, 33.53326416015625, 33.3234977722168, 33.30373001098633, 33.1314582824707, 32.888755798339844, 29.909744262695312, 29.909744262695312, 29.909744262695312, 29.430522918701172, 29.314773559570312, 29.110774993896484, 29.044696807861328, 28.997554779052734, 28.676681518554688, 28.661008834838867, 28.27847671508789, 28.27847671508789, 28.27847671508789, 28.163055419921875, 27.967548370361328, 27.87295913696289, 27.84346580505371, 27.786861419677734, 27.704559326171875, 27.570842742919922, 27.437564849853516, 27.415592193603516, 27.348695755004883, 27.32178497314453, 27.251232147216797, 26.807851791381836, 26.807851791381836, 26.807851791381836, 26.807851791381836, 26.762557983398438, 26.68605613708496, 26.672706604003906, 26.644058227539062, 26.273927688598633, 26.17788314819336, 26.157691955566406, 26.081165313720703, 26.081119537353516, 25.761343002319336, 25.761343002319336, 25.72187042236328, 25.698265075683594, 25.698265075683594, 25.60356903076172, 25.60356903076172, 25.60356903076172, 25.60356903076172, 25.60356903076172, 25.60356903076172, 25.60356903076172, 25.583736419677734, 25.583736419677734, 25.244335174560547, 25.170726776123047, 25.158645629882812, 25.040721893310547, 24.9969539642334, 24.979217529296875, 24.855205535888672, 24.828346252441406, 24.78154945373535, 24.672134399414062, 24.545757293701172, 24.47184944152832, 24.458555221557617, 24.458555221557617, 24.458555221557617, 24.438720703125, 24.431726455688477, 24.34766387939453, 24.30866050720215, 24.290508270263672, 24.206771850585938, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.972301483154297, 23.876392364501953, 23.74837875366211, 23.699851989746094, 23.500953674316406, 23.500953674316406, 23.500953674316406 ], "content": [ "Is there a possibility to say wro4j that it should not treat files endings with css as less .", "However I guess the problem lies in the fact that wro4j scanns and treats pure css-files also as less-files .", "I m implementing Sass support in our Java application .", "Wro4j is a great tool and much appreciated .", "Now I glued them all together with wro4j into two big files that are compressed .", "We are using wro4j maven-plugin to process css .", "If you cannot fix this problem feel free to open an issue on the wro4j project page .", "No getDefaultModelFilename returns wro.xml : github.com alexo wro4j blob 1.6.x wro4j-core src main java ro https : github.com alexo wro4j blob 1.6.x wro4j-core src main java ro isdc wro model factory XmlModelFactory.java L394", "In my wro.xml I have something like : .. . .. . When compiling I will get a error because wro4j treats my .css-file also as a .less-file .", "We are using WRO4J for our application to generate optimized web resources .", "There is an example project which can be used as a quick start project and can be forked to prove a bug : github.com wro4j wro4j-examples tree master wro4j-standalone https : github.com wro4j wro4j-examples tree master wro4j-standalone .", "Its a job project where I am trying to use wro4j in .", "But wro is a logical location configured based on WRO4J requirement .", "The default mapping used by wro4j wro is not a requirement .", "I m using wro4j 1.7.1 in a spring application .", "is there a contributing guide for WRO4J", "Adding custom rule is not supported out of the box if you need this feature feel free to create a feature request https : github.com wro4j wro4j issues .", "The less-compiler should ignore files ending with .css .", "This is not necessarily an answer for all of your questions but an explanation for the reason xsbt wro4j plugin and wro4j-maven-plugin uses mockito .", "I m using wro4j with a maven + spring-mvc based web application .", "If you would like to have this feature out of the box feel free to open an issue https : code.google.com p wro4j issues list .", "Currently I am working in a web app proyect that involves Java javascript css compass .", "I am using wro4j 1.7.3 with less4j lessCSS-compiler .", "Ok it was our custom WroManager that were not up to-date with the last version of Wro4j .", "Problem is that wro4j randomly does not included some files from time to time .", "I m in the process of creating my own wro4j plugin for SBT as my project has some special requirements not achievable with xsbt-wro4j-plugin directly .", "Angular tells about missing modules that are all there and the css that is broken.. . well the correct css is also in one file and correctly loaded into the page source code .", "I checked the source code of xsbt-wro4j-plugin here https : github.com BowlingX xsbt-wro4j-plugin blob master src main scala com bowlingx sbt plugins wro4j Processors.scala and also the wro4j API documentation to gain some insight into the file creating process but I m a bit puzzled here .", "Try adding the following configurations to web.xml : .. . .. . You can check out the following example project https : github.com wro4j wro4j-examples tree master wro4j-spring using spring with wro4j .", "If it doesn t please raise an issue here : github.com wro4j wro4j issues https : github.com wro4j wro4j issues As a workaround use mvn clean before running wro4j maven-plugin", "The latest wro4j version is 1.7.0 .", "Base.css is only a pure css-file without any less-syntax .", "I would like to incorporate wro4j into my grails project .", "However if you want to apply less4j only to a certain resources or group you can customize it using something similar to code.google.com p wro4j wiki ProcessorDecorators http : code.google.com p wro4j wiki ProcessorDecorators", "I have set up wro4j to locate css resources that is outside of the classpath .", "we have so much css and the wro processing at build time almost takes 10 20 minutes .", "I want to obtain the wro4j ro.isdc.wro.model.WroModel in a Spring application that use wro4j .", "Replied on wro4j mailing list too .", "What is the working version combination for wro4j", "You are using wro4j maven-plugin .", "WRO4J has no options available to handle this .", "I m using WRO4j to process my less and js files and I m finding that the browser seems to keep caching the old files .", "More details about request handlers can be found here : https : code.google.com p wro4j wiki RequestHandler", "I m using the wro4j-maven-plugin v1.7.7 along with m2e-wro4j v1.1.0 eclipse-plugin to build my customized bootstrap less theme for my webapp .", "is it possible to convert via wro4j maven-plugin imported into css image to uridata in build time", "I am using wro4j but I can t find where the error comes in that wro4j grouped js files .", "Also could you try to upgrade the wro4j version to 1.7.3 and use the less4j much faster processor instead of lessCss which is based on rhino and is quite slow .", "It worth mentioning that a newer version of wro4j is available - 1.7.0 which contains few improvements and updates .", "but wro4j will create the file on the fly based on the request using different group i have defined", "When deleting this css-class then all works fine .", "Hi Alex the same query has been posted in the wro4j mailing list : groups.google.com forum topic wro4j HdSHPpLbxPw https : groups.google.com forum topic wro4j HdSHPpLbxPw", "The answer was also posted on the wro4j mailing list https : groups.google.com forum topic wro4j cToFMUHCNAQ : .. . .. . You could achieve this with a custom RequestHandler https : code.google.com p wro4j wiki RequestHandler .", "We are having issue at post processer level since our post process has uglifyJs which takes lots of time .", "wro4j should force that itself but it seems it didn t it used 3.1.9 version instead .", "I ve successfully implemented a custom post processor filter with the help of the wro4j documentation .", "Though the documentation of wro4j should be clearer about this .", "wro4j is configured to run using the runtime solution .", "I created a custom requestHandler following the wro4j examples .", "The wro4j-1.7.6 uses older version of less4j .", "i though wro4j would take care of that .", "wro4j has-many features but not this one out of the box", "See : https : groups.google.com forum topic wro4j ZPSFBQ 5lI8", "I m trying to use a LessCss processor in my maven project using wro4j version 1.45 .", "It is not really a good solution for me but wro4j and wro maven-plugin was clearly not good to do such things while my project was growing .", "We re using wro4j with the Orange wr4j-taglib and sometimes when we deploy its loading the same resource twice instead of two different ones but not on all the servers .", "Same answer here : use faster processor by replacing uglifyJs with googleClosure", "A possible solution is to create a custom requestHandler https : code.google.com p wro4j wiki RequestHandler which would iterate through all the groups and would trigger processing .", "UPDATE .. . .. . An example implementing the custom request handler which invalidates the requested group when the disableCache parameter is provided is available here https : github.com wro4j wro4j-examples tree master custom-request-handlers .", "For example the above simple .scss file throws when processed by rubySassCss : .. . .. . That wouldn t surprise me that much if not the fact that wro4j release notes https : code.google.com p wro4j wiki ReleaseNotes clearly states that they implemented Sass processor 3.2.1 a long time ago in IX 2012 : .. . .. . Release 1.5.0 Date : 27 Sep 2012 .. . .. . .. . .. . .. . Issue523 Upgrade rubySassCss processor to 3.2.1 .. . .. . Anybody can tell me if they have the same problem or know what can cause it", "I think the issue is that the wro4j content is generated by a filter an not a servlet as concatenating a single-source generated by my servlet works fine while concatenating the single wro4j generated resource doesn t work but I get the exception below .", "Its job is to generate and prepend SASS vars to a group of SASS files which are then handed off to the rubySassCss filter for transpiling and it s doing this job well .", "Am trying to create this infrastructure using wro4j with which a user can decide which js files to bundle by just editing the template and not touching any java code .", "I am using wro4j with my spring-mvc application for web resource optimaization .", "I use wro4j to minimize my front end resource files such as .js and .css to reduce page load-time in my Spring application .", "Having looked around - it seems like wro4j the maven-plugin the m2e-wtp plugin should provide all that .", "The less-compiler thinks that saturate is a less-defined function .", "Wro4j is capable of handling dynamically generated resources .", "After implementing wro4j everything is working fine .", "I have problem with wro4j plugin for maven .", "After reading through the documentation on the wro4j wiki I added the core and extension jar to my project .", "There is a known bug which prevents the wro4j when using cssUrlRewritingProcessor to rewrite properly relative url s when using webjars .", "All the changes from latest release are described in release notes : code.google.com p wro4j wiki ReleaseNotes https : code.google.com p wro4j wiki ReleaseNotes Even if you would upgrade to latest version it wouldn t fix the performance issue as long as you are using slow processors .", "This mostly works as I make changes to my LESS the plugin detects and rebuilds my uber css file however rather critically it doesn t seem to be compiling the LESS - it combines the files and minifies but my @variables are all still in LESS syntax .", "I m using Spring boot and Wro4j .", "If you open the jconsole you should see an MBean called something like wro4j-ROOT the MBean name is dynamic based on the application context name .", "Question 2 : what is responsible for file creation within wro4j", "There is virtually no difference between run-time solution and build time solution in wro4j .", "We can surely continue this discussion on the wro4j mailing list .", "I am very new to wro4j so i didn t get it .", "I need help with wro4j configuration to use font-awesome from webjars .", "This is my maven configuration for wro4j : .. . .. . And my configuration properties file :", "It seems wro4j-extensions dependency on version 1.7.9 does not have env.rhino.js .", "wro4j will generate a file called wromapping.properties to record the generated files names .", "Since wro4j-1.5.0 the maven 3.0 is required to run the plugin .", "This comparision https : github.com Orange-OpenSource wro4j-taglib blob master src main java com orange wro taglib config GroupLoader.java L72 uses startsWith so when it finds a file named inserImageCore while looking for insertImage it thinks it s found the right one .", "Particularly I have changed sbt.version to 0.13.5 in the build.properties file and changed both scalatra-sbt and xsbt-wro4j-plugin versions to 0.3.5 in the project plugins.sbt .", "I need to do so at compile-time so I added the Wro4J Maven plugin https : code.google.com p wro4j wiki MavenPlugin .", "Now that we started using wro4j we are loosing this handy hot-deployment feature .", "Is there a way to configure wro4j to pick up changed files without restart during development", "As we already have wro4j in the newest version 1.7.5 I decided on using it s rubySassCss as a pre-processor ." ] }
{ "confidence": [ 50.669883728027344, 48.457130432128906, 47.97739791870117, 47.83409118652344, 46.74518585205078, 45.765106201171875, 45.30465316772461, 45.00026321411133, 44.557857513427734, 43.95116424560547, 42.36506652832031, 41.1895637512207, 41.1491813659668, 41.10447692871094, 40.579132080078125, 40.00053787231445, 39.97102355957031, 39.94328308105469, 39.93304443359375, 39.51584243774414 ], "content": [ "Question : I m implementing Sass support in our Java application . As we already have wro4j in the newest version 1.7.5 I decided on using it s rubySassCss as a pre-processor . I got it all configured and the whole thing process .scss files alright until I use some of the newer syntax . I get errors when using features that were brought in VIII 2012 with 3.2.0 version of Sass http : sass-lang.com documentation file.SASS CHANGELOG.html that is variable arguments args.. . syntax and block of contents in the mixin declarations . For example the above simple .scss file throws when processed by rubySassCss : .. . .. . That wouldn t surprise me that much if not the fact that wro4j release notes https : code.google.com p wro4j wiki ReleaseNotes clearly states that they implemented Sass processor 3.2.1 a long time ago in IX 2012 : .. . .. . Release 1.5.0 Date : 27 Sep 2012 .. . .. . .. . .. . .. . Issue523 Upgrade rubySassCss processor to 3.2.1 .. . .. . Anybody can tell me if they have the same problem or know what can cause it I d really like to take advantage of that variable arguments syntax . .. . .. . Here s my pom.xml as well : .. . Answer : Looks like you just need to force sass-gems to 3.2.1 version . wro4j should force that itself but it seems it didn t it used 3.1.9 version instead . Anyway the solution is to add this anywhere in your pom.xml :", "Question : We are using wro4j maven-plugin to process css . we have so much css and the wro processing at build time almost takes 10 20 minutes . If I use maven parallel option it is reduced to 8 mins . I still want to reduce its build time as effective as possible . Is there any better way to process only the files that have changed . My sample pom.xml file is .. . .. . wro4j.properties .. . .. . If some one has tried this let me know . .. . Answer : We are having issue at post processer level since our post process has uglifyJs which takes lots of time . is there any flag to enable parallel-processing at post processor level or at group level . i cant see any configuration flag for them . Also is there a way to set this parallel-processing condition in the plugin itself rather than setting it in properties file .. . .. . We are using version 1.5.0 .. . .. . Any advice . Comment : This should be a comment on the original question or a separate question since you are not providing an answer . Comment : Same answer here : use faster processor by replacing uglifyJs with googleClosure", "Question : I am trying to setup my developer env so that I can use maven to compile my LESS files for formal builds but also have Eclipse compile the LESS for incremental builds so I dont have to keep kicking of maven tasks every time I make a LESS change . Having looked around - it seems like wro4j the maven-plugin the m2e-wtp plugin should provide all that . My setup is as follows : I have just installed the latest stable Eclipse Java EE package that includes the WTP stuff - v4.3 and I have installed the m2e plugin and the m2e-wtp plugins . pom.xml : .. . .. . wro.properties : .. . .. . wro.xml : .. . .. . Inside my less folder are basically a few css files that I have renamed .less files and one where I have actually added some LESS syntax with a few colour variables set . This mostly works as I make changes to my LESS the plugin detects and rebuilds my uber css file however rather critically it doesn t seem to be compiling the LESS - it combines the files and minifies but my @variables are all still in LESS syntax . I also noticed that the maven-plugin was up to v 1.7.0 so tried upgrading to that to see if that was the problem but that just does nothing at all nothing gets built at all and I have no uber css etc .. . .. . Anyone had any experience setting this up or know anything I have missed in the setup Comment : The v1.7.0 should work what exactly happens when you run maven-plugin from console There is an example project which can be used as a quick start project and can be forked to prove a bug : github.com wro4j wro4j-examples tree master wro4j-standalone https : github.com wro4j wro4j-examples tree master wro4j-standalone . Also I recommend using less4j processor instead of lessCss since it much faster . Comment : Thanks @AlexObjelean - If I run maven from the console it correctly builds and compiles the less files to CSS now I am using 1.7.0 but the eclipse incremental-build is still not working with this version like i mentioned using 1.4.5 the eclipse build was running it just didn t compile the LESS Comment : What maven version are you using The incremental-build feature is supported only by maven-3 or greater . Have you tried the v1.6.3 What happens You can open an issue and we can continue discussing there since SO should not be an issue tracker . Comment : I m noticing this behaviour too . I m using maven-3 . I get an eclipse incremental-build if I modify my pom.xml but if I change a less file nothing happens . Comment : I never made the full switch to 1.7 or above but the earlier version is now working ok for me - on the earlier version I was having problems with LESS not being compiled but failing silently - running a full maven build from command-line gave more verbose details of issues i saw . I have written up exactly what I had to do code on github on my blog here : automateddeveloper.blogspot.co.uk 2014 02 http : automateddeveloper.blogspot.co.uk 2014 02 eclipse-less-better-development-time.html .. . Answer : The problem was because I had some invalid LESS in one of my files - this basically meant the compile step was failing so the other LESS files were not being compiled to CSS which resulted in the LESS variables being output in my file - With the Eclipse incremental-build this failure was not being reported so I didn t see it . I discovered it by explicitly running the maven command and then got the normal maven logs which included details of the compilation failure . That aside the eclipse incremental-build for LESS is working really nicely since As mentioned in the comments above I wrote up how to set it all up here : .. . .. . Eclipse LESS - Better development time with incremental builds http : automateddeveloper.blogspot.co.uk 2014 02 eclipse-less-better-development-time.html Comment : Same Problem some debug output wouldnt hurt .", "Question : I am using wro4j 1.7.3 with less4j lessCSS-compiler . In my wro.xml I have something like : .. . .. . When compiling I will get a error because wro4j treats my .css-file also as a .less-file . When using lessCSS instead of less4j the error reason is better shown : .. . .. . Changing the processor-order does not help : .. . .. . The error still exists . Is there a possibility to say wro4j that it should not treat files endings with css as less . Comment : Could you provide the content of the base.css file The exception is saying that toHSL function cannot be found . Where is it defined Comment : I have not any function in base.css . I have no toHSL -function in base.css . Base.css is only a pure css-file without any less-syntax . However the compiler of less is complaining about the following css-class : .img-saturate -webkit-filter : saturate 500 -moz-filter : saturate 500 -o-filter : saturate 500 -ms-filter : saturate 500 filter : saturate 500 . When deleting this css-class then all works fine . However I guess the problem lies in the fact that wro4j scanns and treats pure css-files also as less-files . The less-compiler should ignore files ending with .css . Comment : The less-compiler thinks that saturate is a less-defined function . However it is not . It s a css-function . Comment : By default a processor is applied to all resources . If you want less4j processor to be applied only to resourcess with less extension replace the less4j alias with less4j.less Comment : Actually it does matter . The file extension information is available for pre processors . When post processor is applied there is no extension info since a merged resources is processed . However if you want to apply less4j only to a certain resources or group you can customize it using something similar to code.google.com p wro4j wiki ProcessorDecorators http : code.google.com p wro4j wiki ProcessorDecorators .. . Answer : Thanks Alex .. . .. . by using less4j.less the less-processor will only scan less-files : .. . .. . However afterwards I found the real reason for the error . A ending brace was missing in the css file . By adding the brace all works fine", "Question : null .. . Answer : So I have a pretty big application with a lot of imports . Third party js libraries and a lot of angular code . Now I glued them all together with wro4j into two big files that are compressed . The order in which I did it is correct as the application works as intended . But often times when I press F5 to reload the page stuff will break . JS console will start throwing errors and some style settings get lost on the page . But at the same time when I look at the source code everything is still there . Angular tells about missing modules that are all there and the css that is broken.. . well the correct css is also in one file and correctly loaded into the page source code . Has anyone experienced something like this How would you debug this Comment : Could you create a quick-start project which would help to reproduce the problem Comment : Dont think so . Its a job project where I am trying to use wro4j in . We have like over 150 javascript files atleast that need to be compressed . Problem is that wro4j randomly does not included some files from time to time . It can be a css file or a js file . And the files that dont get included are completely random every time . Comment : I have updated the issue with a comment : disable parallel pre processing flag .", "Question : We are using WRO4J for our application to generate optimized web resources . I need to work this with spring-mvc : resources . Now if do the configuration its failing to load the resources . My configuration given below . here img admin img are physical location in web resources and its mapping proper to the logical version url . But wro is a logical location configured based on WRO4J requirement . There is any way to map the mvc : resources to map the logical location like this . If you guys have any thoughts please share here . Thank u so much -Geek- .. . Answer : The default mapping used by wro4j wro is not a requirement . You can map the WroFilter to any suitable location example : .js or .css . When it is mapped to something like .js it will handle all requests having js extension and in case it cannot handle it the filter will chain the request processing . Comment : I have created groups for css and js to merge the css and js files to avoid multiple requests the issue am facing here is spring will be looking for the physical location wro in the webapp . but wro4j will create the file on the fly based on the request using different group i have defined", "Question : I would like to incorporate wro4j into my grails project . I have everything setup but I m getting a JSMin UnterminatedStringLiteralException when the minifier attempts to compress the OpenLayers.js file I m using . So I figured it would be worth the time to configure wro4j to use a different js minification tool . After reading through the documentation on the wro4j wiki I added the core and extension jar to my project . The problem is that neither jar contains the class file for the YUIJsCompressorProcessor despite the documentation indicating otherwise https : code.google.com p wro4j wiki AvailableProcessors . So I need to know whether or not there is something I overlooked . .. . Answer : The YUIJsCompressorProcessor was deprecated and removed since version 1.6.0 because the library is not developed anymore and uses an older version of rhino which is not compatible with other processors requiring newer version of rhino . As an alternative you can use GoogleClosureCompressorProcessor UglifyJsProcessor or PackerJsProcessor .", "Question : Editing the original question to provide all the details . Added following in web.xml : .. . .. . Created two new files wro.xml and wro.properties inside WEB-INF folder : .. . .. . wro.properties : .. . .. . wro.xml : .. . .. . Here resources is a folder inside : src main webapp . A file testing.less is added inside resources skins abc folder : .. . .. . The pom.xml file contains the following entries : .. . .. . I have not installed the m2e-wro4j plugin in my eclipse IDE . Based on the above I assume that when i do a maven build from command-prompt mvn clean install a css file named base.css should be created inside resources css test folder . I can see the new folder test in the exploded project WAR file but it does not contain the base.css file . The console output looks something like this : .. . .. . One more observation . To make sure that that wro.properties file is correctly placed and is picked up by the plugin I tried some wrong values in this file postProcessors less4jtttt and could see an exception while doing the build . However an invalid file path in wro.xml file did not throw any execption . Please suggest . Regards . Comment : Could you provide the output created when running the plugin Also could you try to upgrade the wro4j version to 1.7.3 and use the less4j much faster processor instead of lessCss which is based on rhino and is quite slow . Beside that the wro.xml should contain the group definitions which are missing from issue description . Comment : Hi Alex I have modified the original post with all details . Please help Comment : I don t think stackoverflow is appropriate for providing this kind of support . If you want we can discuss this issue either on wro4j mailing list or on a dedicated issue . What puzzles me is that you are using both : runtime and build-time solution in the same time.. . Also you specify two different wro4j versions in your pom.xml . Another problem is that you are using less4j processor as both : pre post processor . Another thing is : the console output is incomplete. . it doesn t the final completion results of the maven-plugin . Comment : Hi Alex I tried a few other ways : i removed less4j from the pre-processor list . I also removed the filters from web.xml and I also removed all the entries from pom.xml except the wro4j-maven-plugin entry . However I could still not see the CSS getting generated . We can surely continue this discussion on the wro4j mailing list . I will post the details there . Comment : Hi Alex the same query has been posted in the wro4j mailing list : groups.google.com forum topic wro4j HdSHPpLbxPw https : groups.google.com forum topic wro4j HdSHPpLbxPw .. . Answer : Though the answer was posted also on the mailing list I ll post it also here for visibility : .. . .. . I ve managed to reproduce your test-case locally and what I see is an empty file . First impression is that there is a problem but actually this is the expected behavior . The less content being processed defines a mixin which does not produce any output as long as it is not being used . To get a valid output update your less to use that mixin :", "Question : We are using wro4j maven-plugin to process css . we have so much css and the wro processing at build time almost takes 10 20 minutes . If I use maven parallel option it is reduced to 8 mins . I still want to reduce its build time as effective as possible . Is there any better way to process only the files that have changed . My sample pom.xml file is .. . .. . wro4j.properties .. . .. . If some one has tried this let me know . .. . Answer : Here is the answer to your question : https : code.google.com p wro4j wiki IsWro4jSlow .. . .. . For some of the slow processors there is an alternative like less4j instead of rhinoLessCss . There is one more trick : add the following configuration property to wro.properties : .. . .. . This flag is false by default . Be aware that this feature is experimental so use it with care . If you notice any problems report about it on project page issue tracker . It worth mentioning that a newer version of wro4j is available - 1.7.0 which contains few improvements and updates . Comment : Thank you for the response . Would there be any result if I change it to latest version . Comment : All the changes from latest release are described in release notes : code.google.com p wro4j wiki ReleaseNotes https : code.google.com p wro4j wiki ReleaseNotes Even if you would upgrade to latest version it wouldn t fix the performance issue as long as you are using slow processors . However there is one more trick : add the following configuration property to wro.properties : parallelPreprocessing true false by default . This feature is experimental so if you notice any problems - let me know . Could you also post the content of your wro.properties file Comment : Thank you for the answer . Comment : I have added the parallelPreprocessing as true . I will post my wro4j.properties . Let me know if I can improve this . Comment : Please let me know if I can any property to make its performance better .", "Question : null .. . Answer : I have downloaded this example https : github.com scalatra scalatra-website-examples tree master 2.2 resources scalatra-coffeescript and made some changes to resolve errors . Particularly I have changed sbt.version to 0.13.5 in the build.properties file and changed both scalatra-sbt and xsbt-wro4j-plugin versions to 0.3.5 in the project plugins.sbt . This modified example does not work even after creating wro4j folder manually - command wro4j does nothing and after container : start http : localhost : 8080 compiled scripts.js results in 404 . What else does the plugin need to work with newer versions of sbt and plugins What is the working version combination for wro4j The failing example is in https : github.com Odomontois scalatra-coffeescript . UPDATE .. . .. . Just checked it on linux machine . All have been produced properly . So it looks like windows-only problem . UPDATE 2 .. . .. . After lots of different checks i have investigated that problem somehow is related to path-finding . If you keep files at they are in the master branch generating wont even start . But if you change your path pattern in wro.xml replacing path separators from unix to windows style i.e . change to as it done in the windows-separator https : github.com Odomontois scalatra-coffeescript tree windows-separator branch you ll receieve following log messages :", "Question : null .. . Answer : Currently I am working in a web app proyect that involves Java javascript css compass . I am trying to configure a runtime solution that merges all .js and .scss into a single file . I am following the guidelines explained in the Wro4j site https : code.google.com p wro4j wiki ConfigurableWroManagerFactory but still I get the following error : .. . .. . I added the following dependencies to my pom.xml file : .. . .. . I create the wro.properties file inside the WEF-INF directory : .. . .. . and also the wro.xml in the same directory : .. . .. . Finally in my web.xml I have : .. . .. . am I doing something wrong Is there something missing .. . .. . I was using version 1.4.7 with ro.isdc.wro.extensions.manager.ExtensionsConfigurableWroManagerFactory . Now I am trying with version 1.7.7 and ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory but still get the same error . The stack-trace is a bit different but that s something expected since I am using a different factory : .. . .. . Regarding the location of the wro.xml I have the following project tree under eclipse : Comment : What wro4j.version are you using What is the location of your wro.xml Also use the following managerFactoryClassName : wroManagerFactory ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory", "Question : I ve put wro.xml in src main resources as there are some other resources and it s easier to access them in unit tests . I need to extend some wro classes now to be able to read the model from another place but can t get it working . Necessary code .. . .. . web.xml : .. . .. . applicationContext.xml : .. . .. . wro.properties : .. . .. . MyWroManagerFactory : .. . .. . CopyrightKeeperConfigurableWroManagerFactory : .. . .. . Why it can t find classes wro.xml How to use a custom location for wro.xml EDIT Here s the full log output : http : pastebin.com NeNy1NH4 .. . Answer : The problem is that you are loading the model relative to the MyWroManagerFactory class : .. . .. . That means that it will look for the model in the folder where the class is located . Since your wro.xml is located in classes folder which is a root for classpath you should use the following : .. . .. . Alternatively you could use ClasspathUriLocator : .. . .. . EDITED : Apparently this example discovered a problem which is described in the following issue https : code.google.com p wro4j issues detail id 736 : Until the fix is ready the following options are available : .. . .. . Option 1 https : github.com dtrunk90 wro4jtest pull 1 .. . Option 2 https : github.com dtrunk90 wro4jtest pull 2 Comment : That didn t solved it : - See EDIT section above . Comment : That is because getDefaultModelFilename returns WEB-INF wro.xml while you have the wro.xml in classes folder . Either create a WEB-INF folder in your classpath or do not use getDefaultModelFilename method . Comment : No getDefaultModelFilename returns wro.xml : github.com alexo wro4j blob 1.6.x wro4j-core src main java ro https : github.com alexo wro4j blob 1.6.x wro4j-core src main java ro isdc wro model factory XmlModelFactory.java L394 Comment : There s no Load wro.xml directly from classpath output anywhere in the log.. . Comment : The log says : java.io.IOException : Invalid resource requested : WEB-INF wro.xml.. . That means that the requested file path is : WEB-INF wro.xml.. . which is wrong .", "Question : I ve successfully implemented a custom post processor filter with the help of the wro4j documentation . Its job is to generate and prepend SASS vars to a group of SASS files which are then handed off to the rubySassCss filter for transpiling and it s doing this job well . The problem is that I wanted to hand the job of determining the SASS vars off to a custom ThemeManager @Service managed by Spring . I hadn t considered that the filter wouldn t be able to see the autowired @Service but that seems to be the case . When I @Autowire the @Service into a controller it works fine but when I try the same thing with the filter I get a NPE when attempting to use it . Is there a way to make the @Service visible to the filters or am I approaching this the wrong way Thanks for any help . UPDATE : .. . .. . It s taken some doing and attacking from a lot of angles but I seem to be having success with autowiring my themeManagerService into the app configuration where I have my WRO filterRegistrationBean bean . I then pass the themeManagerService bean as a second argument to my custom ConfigurableWroManagerFactory . Living in the custom WroManagerFactory is a reference to a custom UriLocator which takes that themeManagerService as an argument . The custom UriLocator is invoked by a CSS resource containing an arbitrary keyword within a group . The new UriLocator is able to generate a ByteArrayInputStream from what the themeManagerService provides it and pass it into the pipeline . Simple . I ll follow up when this approach pans fizzles out . .. . Answer : In the end I was able to provide the spring managed ThemeManagerService directly to the custom post processor rather than relying on a custom UriLocator . I had tried that early on but forgot to call super in the new constructor so the processor registration system was breaking . I pass the @Autowired ThemeManagerService to my CustomConfigurableWroManagerFactory when registering the WRO bean : .. . .. . The constructor-injection of ThemeManagerService into CustomConfigurableWroManagerFactory means it can be passed along to the custom postprocessor as it s registered by contributePostProcessors : .. . .. . Now the post processor has access to ThemeManagerService : .. . .. . This approach is working as expected intended so far . Hope it comes in handy for someone else . Wro4j is a great tool and much appreciated .", "Question : null .. . Answer : I try to use jetty s ConcatServlet to concatenate javascript generated from my own servlet and javascript generated by wro4j WroFilter . It seems concatenation doesn t work regardless the javadoc of ConcatServlet that states that it can be used to concat generated content . I think the issue is that the wro4j content is generated by a filter an not a servlet as concatenating a single-source generated by my servlet works fine while concatenating the single wro4j generated resource doesn t work but I get the exception below . It complaints about a missing file although the request wro script.js is served fine if requested normally . Any suggestions Comment : The wro script.js is a virtual resource it doesn t actually exist on the servlet context . This is why you get java.io.FileNotFoundException . I don t understand why you don t use the filter only Comment : Because my another js file is also generated . It contains i18n messages in JSON format based on a text file Comment : That shouldn t be a problem . Wro4j is capable of handling dynamically generated resources . Comment : Hmm. . I tried adding js msg.js js into my wro4j config but it has no effect msg.js is generated by my custom servlet . Comment : How is your servlet mapped Is it mapped to root What happens when you are trying to access the msg.js resource in the browser Do you see it If yes then wro4j should also be able to locate it and process properly . If you cannot fix this problem feel free to open an issue on the wro4j project page .", "Question : I m using wro4j 1.7.1 in a spring application . Recently I tried to add the RubySassCss preprocessor to the preprocessor I used but without any success . The configuration I used : .. . .. . It s not clear in the documentation which syntax I can use scss or sass so I have two files in a group : .. . .. . When I display this group on a page localhost wro test.css I just see the content of those files without any processing : .. . .. . the sass file : .. . .. . the scss file : .. . .. . any idea Comment : what exactly the com.workable.config.WroManager is doing Could you replace it with ro.isdc.wro.manager.factory.ConfigurableWroManagerFactory If it still doesn t work enable debug log level to understand what exactly is happening . Comment : Ok it was our custom WroManager that were not up to-date with the last version of Wro4j . Thanks a lot for your watchful eye : Comment : I ll post the above comment as an answer for visibility . .. . Answer : Probably your custom managerFactoryClassName is causing this problem . Replace .. . .. . with .. . .. . If it still doesn t work enable debug log level and check if there is something relevant there .", "Question : null .. . Answer : I want to load resources from an external JAR file using Wro4J 1.7.6 . I need to do so at compile-time so I added the Wro4J Maven plugin https : code.google.com p wro4j wiki MavenPlugin . If I extract the resources js css and the another-wro.xml into my project folder in Eclipse the files are minimized and merged as I want them to be . But if I try to import the another-wro.xml by classpath https : code.google.com p wro4j wiki WroFileFormat Import directive from a seperated JAR I am getting a No valid model was found message . Detailed Error .. . .. . My WEB-INF wro.xml from my project having the jar as a dependency .. . .. . I added the external JAR as a dependency and made sure it contains the folders and files mentioned above . If the JAR is in-place and available at compile-time shouldn t the another-wro.xml file be loadable Comment : Though I m not sure it could be caused by a known issue related to this issue : code.google.com p wro4j issues detail id 627 start 100 https : code.google.com p wro4j issues detail id 627 start 100 . Either way it would help if you could create a quick-start project which would reproduce the bug .", "Question : I m in the process of creating my own wro4j plugin for SBT as my project has some special requirements not achievable with xsbt-wro4j-plugin directly . I checked the source code of xsbt-wro4j-plugin here https : github.com BowlingX xsbt-wro4j-plugin blob master src main scala com bowlingx sbt plugins wro4j Processors.scala and also the wro4j API documentation to gain some insight into the file creating process but I m a bit puzzled here . As far as I can tell the plugin uses Mockito to produce the necessary resources somehow but I don t get how it cooperates with wro4j itself . If I m right this whole Mockito stuff is a hack so we can use SBT s caching mechanism . Question 1 is whether we can avoid this Mockito voodoo without losing caching support . Question 2 : what is responsible for file creation within wro4j Could I override it .. . Answer : This is not necessarily an answer for all of your questions but an explanation for the reason xsbt wro4j plugin and wro4j-maven-plugin uses mockito . The wro4j was created initially as a runtime solution only using HttpServletFilter to minimize static resources on the fly . As result the internal API is based on servlet-api more specifically HttpServletRequest HttpServletResponse objects . Later when a build-time solution was required instead of changing the internals of the framework a suitable workaround was applied : using a mechanism for stubbing servlet-api in a non servlet environment build-time . The way I see the long term approach : is to make wro4j servlet-api agnostic and allow build-time solutions like maven-plugin or xsbt plugin to not require using this workaround . Unfortunately in order to do that the internals of the wro4j should be changed and that would require a major release incompatible with previous versions . Given the amount of work required to do that most probably this will be delayed . Comment : Ah this does make sense . Though the documentation of wro4j should be clearer about this .", "Question : Our team wants to use the wro4j tool and we have gotten it setup and able to run the csslint and jslint . We would like to create our own custom CSS rules but we can t find any documentation on where the csslint rules are stored and how to create our own . Any help would be greatly appreciated . .. . Answer : In order to add csslint rules you should update configuration options section of the maven-plugin : .. . .. . More details are documented here http : wro4j.readthedocs.org en 1.7.x MavenPluginCssLint . Update : The rules are defined by csslint https : github.com CSSLint csslint library version 0.9.10 . All the rules defined in the library can be referred in the configuration section of the maven-plugin . Adding custom rule is not supported out of the box if you need this feature feel free to create a feature request https : github.com wro4j wro4j issues . Comment : Yes we understand how to add pre-made CSS rules to our pom file for the csslint to use but we want to know where these CSS rules are located and how we can create our own custom css rules . Comment : The answer was updated .", "Question : null .. . Answer : I m using the wro4j-maven-plugin v1.7.7 along with m2e-wro4j v1.1.0 eclipse-plugin to build my customized bootstrap less theme for my webapp . I will commonly do a Run As- Maven clean followed by a Run As- Maven install through Eclipse Luna when I make major changes to some of the core classes and want to make sure everything is up-to-date in my local tomcat7 . The problem being after running the clean the m2e-wtp web-resources is cleared which contains my compiled less and js . Then running the install doesn t recreate these because the m2e-wro4j plugin didn t detect any changes . Finally running the webapp on my local server it ends up with no js or css . If I touch any of the files it will rebuild them and it works fine . Is there anyway to force m2e-wro4j to rebuild the resources after a maven clean Here is my plugin configuration : .. . .. . and my wro.properties : Comment : This might be related to m2e-wro4j eclipse-plugin . The wro4j maven-plugin has a built-in incremental change detection mechanism which can be enabled by setting incrementalBuildEnabled to true .", "Question : I m using wro4j with a maven + spring-mvc based web application . I have two different wro.properties file to configure the web app differently when in development mode vs deployment mode . wro4j is configured to run using the runtime solution . The setup is working fine so far . What I want to be able to do now is that in deployment mode all the wro4j groups should be built immediately on server start up as opposed to on-first-request per wro resource . I haven t found a configuration option for this - is there one If not how can I go about making this happen I know I can probably get similar result using compile mode for deployment but given that I already have runtime mode set up I am wondering if I can piggy back on that .. . Answer : A possible solution is to create a custom requestHandler https : code.google.com p wro4j wiki RequestHandler which would iterate through all the groups and would trigger processing . You would have to invoke that request handler during application startup . If you would like to have this feature out of the box feel free to open an issue https : code.google.com p wro4j issues list . Comment : I created a custom requestHandler following the wro4j examples . Got that part working - checked by requesting the wroAPI url manually . But how do I invoke the request handler during startup Comment : Use a ServletContextListener to get notified about application startup and invoke the url of your custom requestHandler ." ] }
[ "yes-answer-long", "yes-answer-short" ]
csslint
UNK_RELATION
phped@smarty@87
phped -- phped is the integrated development-environment for php php-ide html css xml @placeholder xhtml and other .
{ "confidence": [ 67.35597229003906, 48.51446533203125, 48.51446533203125, 46.896419525146484, 46.896419525146484, 45.06249237060547, 44.85200881958008, 44.67451095581055, 43.28956604003906, 43.28956604003906, 42.599510192871094, 42.34623718261719, 42.10392379760742, 42.10392379760742, 40.82658386230469, 40.82658386230469, 40.82658386230469, 40.04034423828125, 39.650413513183594, 39.650413513183594, 39.650413513183594, 39.650413513183594, 39.26325988769531, 39.207542419433594, 38.931575775146484, 38.931575775146484, 38.774330139160156, 38.259056091308594, 37.75540542602539, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.490333557128906, 37.33493423461914, 36.31416320800781, 36.26084518432617, 35.72557830810547, 35.04293441772461, 34.76934814453125, 34.76934814453125, 34.76934814453125, 33.25300216674805, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.996421813964844, 32.61003112792969, 32.533111572265625, 31.82025146484375, 31.82025146484375, 30.24605369567871, 30.24605369567871, 30.24605369567871, 30.24605369567871, 29.06988525390625, 28.81094741821289, 27.165542602539062, 27.165542602539062, 27.165542602539062, 26.597991943359375, 25.921772003173828, 25.56556510925293, 24.745601654052734, 24.439191818237305, 24.08915901184082, 24.08915901184082, 23.82103729248047, 23.427370071411133, 23.427370071411133, 23.427370071411133, 22.666263580322266, 22.666263580322266, 22.666263580322266, 22.666263580322266, 22.644866943359375, 22.361618041992188, 21.914751052856445 ], "content": [ "PhpED is just a PHP IDE correct", "Hi I want PhpED to treat ctp files like PHP files .", "In phpED go to Tools- Settings- Associations and add .ctp under the PHP type .", "Is there a similar shortcut in phpEd", "PHPed has similar behavior .", "I am developing using PHPEd .", "I want to know how to open a PHP-file using PHPEd via PHP browser .", "I have used PHPEd for several years as my IDE of choice .", "What version of PhpEd are you using", "In PHPEd the workspace is simply a collection of projects .", "I switched from Eclipse PDT Kepler to phpED .", "I am currently working with the Zend Framework http : en.wikipedia.org wiki Zend 5FFramework and I use PHPEd http : en.wikipedia.org wiki PHPEd as my favourite PHP editor .", "To debug a PHP app in PHPEd the root of the project needs to be set to the web folder of my app .", "Is it possible to configure PHPEd to run debug from within the web folder while displaying all of the PHP files in the workspace", "And did you made an update of PhpEd recently", "I will check support for both feature on phped .", "In PHPEd a project is not tied to a particular location in the filesystem .", "I have the following three machines : .. . .. . Windows 7 PC .. . .. . NuShere PhpED IDE It is set up to use my Local Development Centos Server .. . TortoiseGit .. . SourceTree Not sure if I will use since it doesn t integrate with PhpED .. . .. . Local Development Centos Server .. . .. . Apache used with PhpED on Windows PC .. . GitLab .. . Samba not set up yet but plan on using to share var www files with PhpED on Windows PC .. . .. . Remote Production Centos Server .. . .. . Apache .. . .. . Will I need to install Git on the Windows PC", "Can anyone post the steps for integrating mercurial to phped .", "Can anyone list the steps to integrate PHP Beautifier in phped .", "Professionally I work with NuSphere PhpED on a Windows computer .", "PhpED has some basic shell integration with TortoiseGit .", "I am using Nusphere PHPED for my CodeIgniter Project .", "What I want is a development-environment where I code in nusphere phped where I will work on the files in my localhost directory wamp www .", "In PHPed at least the debug engine passes a debug ID so the called process can phone home to the IDE .", "There s a forum request for the IDE PhpED to provide syntax support for SCSS and possibly LESS .", "I am setting up my php project on phped but it will be running html file but cannot ruining php function and other ajax or java script file copy that code will be ruining on the other server in phped same visions fine but in my new server its show that error kindly help me to fixed that problem.html and some of the code is ruining fine but a lot of but function code is show error .", "Currently : 1 I use wamp on windows-7 for local development localhost 2 I use nusphere phped .", "The reason I ask is when running the code using PhpED IDE it responds with the value of POST task2 equal to SUBMIT and not save .", "When I hit the debugBreak line PhpED regains control .", "I m looking for a faster way to open files in PhpED projects .", "On the project if you type a file or folder name phped will take you there .", "Can anyone tell me how this can be done in PHPEd", "In PHPEd I have a connection for each remote-server I use .", "Or do I need to go through the massive pain of integrating git with PHPEd", "I was also looking for alternatives but PHPEd still rules them all .", "There are lot of PhpED users including me who would like SCSS support .", "I am also using PhpED but I m moving to phpStorm .", "PhpED doesn t support too many things right now .", "I m a long time user of PhpED and just upgraded from V10 to V12 .", "I use Windows and PHPED to work and debug my Symfony 2 project .", "I removed index.php using this .htaccess file : .. . .. . Now Cannot debug with PhpEd .", "I am a freelance web developer php js xhtml css etc .", "Note that I ve never used PHPed so there might be more problems .", "Another option is to always save the PHP file you re cleaning first and then look through the phpED documentation for how to get the path to the PHP file you have open and are cleaning .", "alt text http : www.postimage.org gxunBjr-3403a417a596699446ed7da2398ef95e.gif .. . .. . In that case the advice is to copy PROGRAMFILES nusphere phped config func.rel into APPDATA nusphere phped config directory overriding the file in it .", "It d be something like the format from other PHPed scripts posted here http : forum.nusphere.com viewtopic.php t 1989 .", "And in PHPed the startup lags when there are a ton files in each project which I do not know if it s the case with eclipse .", "One for IE is shipped and installed with PhpED and bars for FF and Chrome are avilable for free on their forum .", "Regarding Nusphere support there is no native support for Git in PHPEd - shell script should be used .", "I use NuSphere PhpEd IDE and I d like to know is there a way to find the closing bracket like in Eclipse Ctrl + Shift + P Go to Matching Bracket Helps to find the closing bracket of lengthy if-else statements . .", "My PHPEd suddenly stopped showing arguments and arg order in the hints and now just shows a basic description of the function .", "One way to check if this is linked to settings is to move the phped.cfg config file save it and let PhpEd recreates it with default values .", "Is there a possibility to tell PHPEd always to show the Zend Framework functions and classes in the code insight", "It worked fine for me in PhpED http : www.nusphere.com products phped.htm when I tried ZF code from the beginning .", "They NuSphere just released PhpED V11.0 which has full support for ZF etc .", "You can use DebugBreak in code to get it to kick into the debugger in PhpEd even if the files are in a weird place in the workspace .", "Currently phpEd supports changes to CVS Systems : .. . .. . Project management features allow you to manage code and project components .", "You can find the templates in c : Program Files x86 NuSphere PhpED templates", "I am using NuSphere PhpED to debug and I am not able to make phpunit to run .", "So we do all our coding on Windows based tools PhpED and deploy on another machine running Apache on CentOS .", "PHPEd handled this with a simple keyboard shortcut - Ctrl+Shift+S - which would upload to the remote-server immediately but there was no support for git .", "Part of my issue is that the terminology in Aptana is not really intuitive to me coming from PHPEd and is not very well explained .", "I have now ditched Aptana and stuck with PhpED - nothing comes close I am afraid .", "If you found yourself spending hours trying to get a decent debugging experience you ll find PHPEd a breeze .", "It seems that phpEd will support SCSS soon in version 14 so developers managed to find grammar .", "I m running into some autocompletion problems when using PHPed to develop a PrestaShop module .", "I m also a long time user of PhpED and sometime in the last several weeks debugging in Firefox stopped working .", "PhpEd need to acces dbg-wizard.php file in the root folder but it s not accessible anymore", "I m developing a portal for local developers and would like to make it possible to open PHP-files directly from the browser in PHPEd by passing their name om the hard disk .", "I use NuSphere s PhpED s PHP IDE to crate and debuge PHP script .", "I m using the following code to do that .. . .. . As I said this works fine on the developing machine which uses the embedded server of PhpED", "Assuming there is nothing wrong with using a submit button with a name maybe just a bug in PhpED", "They are loaded with a internal autoload function of the Zend Framework so PHPEd can t find the points where they are included and doesn t show them in the list of functions .", "Whenever I need a file I click on everything tool in the taskbar then type the filename or type folder filename and then double click it to open in PHPed .", "http : lifehacker.com 5054669 everything-finds-windows-files-as-you-type .. . .. . And yes I presume you are using windows like majority of PHPEd users .", "I did saw some discussions on using NetBeans and was wondering if I should switch to that as currently I am using NuSphere PhpED .", "On NuSphere PhpED Professional Version 14.0 Build 14040 64bit when I set Default file-format to Windows the Save As shows File Format of Windows .", "Php editors don t evaluate PHP code like HTML those only allow to edit code with cute formatting and useful features .", "I currently use PHPed to initiate debug sessions to the templating-engine however when the http-request goes out to remote service my debugger just sits and waits for the IO to complete .", "PhpED http : www.nusphere.com products phped.htm supports parallel debug sessions http : www.nusphere.com products php debugger advanced.htm - meaning you can start debugging code that issues request to initial server and then inter-server requests too .", "And you cannot use PHPEd s debugger with Aptana I have used both Xdebug PHPEd s debugger and I can tell you that Xdebug is crap compared to PHPEd .", "The response from the PhpED folks has been that they are not able to find a formal description of the grammar similar to the CSS grammar described here : http : www.w3.org TR CSS21 grammar.html .. . .. . Does anyone know where a formal description can be found", "And what is the PHP buildpath", "It s all PHP except for the initial shell script but with a little work you could write a similar script in PHP that sets up your environment and calls an appropriate TestRunner .", "PHP inserts a record in the database .", "For running PHP code you need web server like apache or nginx .", "Both the templating-engine and the appserver are written in PHP .", "However the PHP files to be editted are outside of the web folder .", "phpEd not saving a file on server apache using SFTP giving following error : .. . .. . Could not write to remote File var www erp index.php .. . .. . When I open file index.php again it is empty .Every File I open modify and save it gives the same error and on opening again it is empty .Any Clue Thanks", "I have had a PHP file loading Flash file into browser which then calls back to PHP using AMFPHP all on the same server .", "And to add some more shameless self promotion : Setting up jenkins for php projects http : edorian.posterous.com setting-up-jenkins-for-php-projects .", "possible duplicate of Can t debug PHP Cli after Eclipse update http : stackoverflow.com questions 4352975 cant-debug-php-cli-after-eclipse-update", "There is no problem with my own classes only with the actual php functions .", "Example : .. . .. . How it used to work : .. . .. . I type a PHP function say strpos .", "How it works now : .. . .. . I type a php function say strpos .", "I don t work for NuSphere but they have absolutely the best PHP debugger .", "I ve found two solutions but couldn t get them to work : .. . .. . Solution 1 : create a new protocol phped protocol and use phped protocol : file as URI .. . Solution 2 : execute a batch script that opens PHPEd .. . .. . Could someone help me out with one of these solutions", "It has integration of PHPUnit for testing as well as PHPMD http : phpmd.org PHPCPD https : github.com sebastianbergmann phpcpd PHP Depend http : pdepend.org PHPLOC http : techportal.inviqa.com 2010 01 28 phploc-php-lines-of-code and PHP CodeSniffer http : pear.php.net PHP CodeSniffer .", "I don t know much about PHP debugging and I m not sure I follow push of the environment onto some kind of stack but I wonder if netcat + some shell scripting could be useful here for troubleshooting" ] }
{ "confidence": [ 71.73196411132812, 62.551551818847656, 61.89340591430664, 61.21173095703125, 60.96918487548828, 60.339717864990234, 59.81450653076172, 59.13327407836914, 57.40814971923828, 56.91558074951172, 56.7811393737793, 56.013999938964844, 55.86878967285156, 55.66752243041992, 54.937034606933594, 54.90327453613281, 53.25738525390625, 53.156105041503906, 53.156105041503906, 53.07749938964844 ], "content": [ "Question : I am a freelance web developer php js xhtml css etc . Currently : 1 I use wamp on windows-7 for local development localhost 2 I use nusphere phped . 3 then when I have to check it on server I transfer all files through cuteftp to my server . 4 I dont use any kind of CVS at all . What I want is a development-environment where I code in nusphere phped where I will work on the files in my localhost directory wamp www . And whenever I save create delete any file on my project nusphere automatically : .. . .. . 1 makes that change in localhost obviously it does that .. . .. . 2 makes that change in my local cvs for backup etc .. . .. . 3 makes that change in my server server may be different on per project basis inbuilt ftp-client may be .. . .. . Can anyone help me with that This is the best environment I can think of for web dev . Please give me some advice if you have any better ideas I just want to code in nusphere windows-7 .. . .. . Note : .. . .. . 1 I dont travel a lot so dont need to access my dev environment from many machines . .. . Answer : Currently phpEd supports changes to CVS Systems : .. . .. . Project management features allow you to manage code and project components . Seamlessly integrated CVS client enables you to easily review changes in old versions of a source files to track bugs while working on the same project in a team of developers . All the common CVS functionality is fully enabled . Windows Shell Integration allows you to work with various Version Control Systems such as TortoiseSVN and other tools that integrate to Windows Explorer . alt text http : i.stack.imgur.com Vl64j.gif .. . .. . And I me almost sure it should have a sync system for AUTO Ftp upload on save Comment : Thanks for the answer . I will check support for both feature on phped . Since I have never used cvs before brances tags confuse me . better I read some tutorial about it .", "Question : I am currently working with the Zend Framework http : en.wikipedia.org wiki Zend 5FFramework and I use PHPEd http : en.wikipedia.org wiki PHPEd as my favourite PHP editor . I have already seen that the IDE can trace my own functions and libraries and display them in the code insight . How can I add the libraries of Zend Framework to the code insight They are loaded with a internal autoload function of the Zend Framework so PHPEd can t find the points where they are included and doesn t show them in the list of functions . Is there a possibility to tell PHPEd always to show the Zend Framework functions and classes in the code insight Comment : I don t know the answer to your question but I can tell you that Aptana which I use for ZF application development generates these links and auto-completion works fine even if you use the Loader . .. . Answer : They NuSphere just released PhpED V11.0 which has full support for ZF etc . - http : www.nusphere.com products php frameworks.htm", "Question : I am setting up my php project on phped but it will be running html file but cannot ruining php function and other ajax or java script file copy that code will be ruining on the other server in phped same visions fine but in my new server its show that error kindly help me to fixed that problem.html and some of the code is ruining fine but a lot of but function code is show error . you can see the error in that link : .. . .. . http : screencast.com t gP0I39tJXt .. . .. . http : screencast.com t pPjl9gOj .. . Answer : Php editors don t evaluate PHP code like HTML those only allow to edit code with cute formatting and useful features . For running PHP code you need web server like apache or nginx .", "Question : I have used PHPEd for several years as my IDE of choice . It is fantastic and fast but still doesn t have native support for git . I need to use git and I want it integrated into my workflow . I have heard great things about Aptana - including that it has great git integration so have installed it and I am now trying to get my head around all the differences . 1 . What is with the workspace being linked to a folder In PHPEd the workspace is simply a collection of projects . It s not tied to a location in the filesystem apart from where the .ppw file which stores the workspace meta information is stored . 2 . Similarly why are projects tied to a particular folder In PHPEd a project is not tied to a particular location in the filesystem . Yes the project has a root folder defined but it s simply a property of the project . This means there are no project related files metafiles cluttering the filestructure of the project source files . Can Aptana be made to behave in this way 3 . Connections - The connections are similar but the way projects reference them is not . In PHPEd I have a connection for each remote-server I use . Then in a project I can specify a remote root folder relative to the connection - this allows me to have one connection used by multiple-projects if they are all published on the same remote-server . Can Aptana behave like this Or do I have to define a separate connection for each project 4 . What is the best way to create a project from an existing source I like my local file structure to mirror the filestructure on my host machine . This allows for easy moving of folders easy synchronisation allows me to syncronise browsing in Filezilla etc . So my work directory will look something like this : .. . .. . www .. . dev html .. . development - this is the root of a development subdomain .. . test - this is the root of the last build being tested in the test subdomain .. . intra html - contains the root folders of various intranet subdomains .. . crm .. . kb .. . public html - this is the live site .. . .. . .. . Now I really don t want to point Aptana at these folders and have it add it s metafolders but I don t want to have Aptana replicate these folders - introducing another shard . How can I create projects that point to these existing files I know this is related to my second question but is there a way to have Aptana keep these local files up-to-date if it has to replicate them locally 5 . What is the best way to integrate with git if I want to be able to easily upload to the remote host PHPEd handled this with a simple keyboard shortcut - Ctrl+Shift+S - which would upload to the remote-server immediately but there was no support for git . I have a remote repository bitbucket which is separate from my remote host . I was hoping git integration would make it easy to have both immediate upload to my development-environment as well as the ability to easily commit once everything is working as I want . Part of my issue is that the terminology in Aptana is not really intuitive to me coming from PHPEd and is not very well explained . If I want to add a framework folder for code autocompletion is that an External Directory under the PHP Buildpath tab And what is the PHP buildpath In summary I want to have a local file structure that mirrors the hosting file structure I want to be able to very easily syncronise local files to the host and I want to be able to easily stage and then commit those files I haveedited once I have tested them on the host . Is all this possible with Aptana Or do I need to go through the massive pain of integrating git with PHPEd .. . Answer : Try tortoise git you will have the same kind of integration like you had with tortoise svn . And you cannot use PHPEd s debugger with Aptana I have used both Xdebug PHPEd s debugger and I can tell you that Xdebug is crap compared to PHPEd . I don t work for NuSphere but they have absolutely the best PHP debugger . Comment : I ve accepted this as this is the route I ended up finding and going with . I have now ditched Aptana and stuck with PhpED - nothing comes close I am afraid . Comment : If you found yourself spending hours trying to get a decent debugging experience you ll find PHPEd a breeze . For me it s the no 1 reason to stick with it . Maybe there are others offering the same thing but I haven t encountered them yet . Comment : Nothing beats PHPEd s debugger . I was also looking for alternatives but PHPEd still rules them all .", "Question : I am currently working with the Zend Framework http : en.wikipedia.org wiki Zend 5FFramework and I use PHPEd http : en.wikipedia.org wiki PHPEd as my favourite PHP editor . I have already seen that the IDE can trace my own functions and libraries and display them in the code insight . How can I add the libraries of Zend Framework to the code insight They are loaded with a internal autoload function of the Zend Framework so PHPEd can t find the points where they are included and doesn t show them in the list of functions . Is there a possibility to tell PHPEd always to show the Zend Framework functions and classes in the code insight Comment : I don t know the answer to your question but I can tell you that Aptana which I use for ZF application development generates these links and auto-completion works fine even if you use the Loader . .. . Answer : Okay after reinstalling NuSphere a third time it finally works . I have no clue why.. .", "Question : I am developing using PHPEd . Our company is just moving to Git . Regarding Nusphere support there is no native support for Git in PHPEd - shell script should be used . As I have no experience with it please could anybody of you help me with the scripting and setup - any hints Does anybody of you real experience with this Comment : PhpED is just a PHP IDE correct You should be able to use any git client with it with no need for additional scripting . If you re not using the git CLI which I highly recommend by the way you should be able to use any git GUI client such as SourceTree . .. . Answer : Finally I have found no automatic way so currently I use SmartGit as external tool .. .", "Question : To debug a PHP app in PHPEd the root of the project needs to be set to the web folder of my app . However the PHP files to be editted are outside of the web folder . Is it possible to configure PHPEd to run debug from within the web folder while displaying all of the PHP files in the workspace Desired workspace layout .. . Answer : You can use DebugBreak in code to get it to kick into the debugger in PhpEd even if the files are in a weird place in the workspace . As long as they are in the same project folder I think .", "Question : I am developing using PHPEd . Our company is just moving to Git . Regarding Nusphere support there is no native support for Git in PHPEd - shell script should be used . As I have no experience with it please could anybody of you help me with the scripting and setup - any hints Does anybody of you real experience with this Comment : PhpED is just a PHP IDE correct You should be able to use any git client with it with no need for additional scripting . If you re not using the git CLI which I highly recommend by the way you should be able to use any git GUI client such as SourceTree . .. . Answer : I switched from Eclipse PDT Kepler to phpED . As replacemnet of Eclipse git plugin Egit I started to use SourceTree . I find it powerfull with a nice interface but a bit slow . EDIT : a bit slow with repositories hosted on network-shares but fast on local repositories Comment : With time I totally stopped to use SourceTree . Using git command-line with appropriate color highlight is totally sufficient . Useful alias to see commits tree : alias gitlog git-log --graph --full-history --all --no-prefix --color --pretty format : x1b 31m h x09 x1b 32m d x1b 0m x20 x1b 0m x20 s x1b 36m x20 an x1b 0m", "Question : I am currently working with the Zend Framework http : en.wikipedia.org wiki Zend 5FFramework and I use PHPEd http : en.wikipedia.org wiki PHPEd as my favourite PHP editor . I have already seen that the IDE can trace my own functions and libraries and display them in the code insight . How can I add the libraries of Zend Framework to the code insight They are loaded with a internal autoload function of the Zend Framework so PHPEd can t find the points where they are included and doesn t show them in the list of functions . Is there a possibility to tell PHPEd always to show the Zend Framework functions and classes in the code insight Comment : I don t know the answer to your question but I can tell you that Aptana which I use for ZF application development generates these links and auto-completion works fine even if you use the Loader . .. . Answer : It worked fine for me in PhpED http : www.nusphere.com products phped.htm when I tried ZF code from the beginning . To have any 3rd party code appeared in Code Insight you need to either include corresponding directory into the project list of additional directories or just place the directory with code as a project subdirectory . Then open Code Explorer http : www.nusphere.com products php code explorer tab.htm and check for the framework classes . If they don t appear for any reason for longer than 5-6sec just press refresh in the popup . Comment : Just look at the date of the post.. . it was 2009 . And it seems to have been just some bug in my installation .", "Question : Hi I want PhpED to treat ctp files like PHP files . So it will do all the syntax-highlighting and auto-complete functionality you get when coding within a PHP file . Is there anyway to do this .. . Answer : In phpED go to Tools- Settings- Associations and add .ctp under the PHP type . Comment : Thanks a lot There had to be a simple way to do it", "Question : I am developing using PHPEd . Our company is just moving to Git . Regarding Nusphere support there is no native support for Git in PHPEd - shell script should be used . As I have no experience with it please could anybody of you help me with the scripting and setup - any hints Does anybody of you real experience with this Comment : PhpED is just a PHP IDE correct You should be able to use any git client with it with no need for additional scripting . If you re not using the git CLI which I highly recommend by the way you should be able to use any git GUI client such as SourceTree . .. . Answer : TortoiseGIT is a right way for doing this . After installing and configuring Tortoise you ll be able to run git commands directly from Windows Explorer as well as from PHPEd s own windows . See Shell in popup menus . Comment : I actually don t recommend TortoiseGit since it s heavily influenced by TortoiseSVN and thus SVN-style workflows instead of git-style workflows . Users should be able to use any git client not just TortoiseGit .", "Question : I want to have some default PHP docblocks in any php file i create with some licensing info and info about who created the file and so on . Can anyone tell me how this can be done in PHPEd Thanks very much . .. . Answer : You can find the templates in c : Program Files x86 NuSphere PhpED templates", "Question : There s a forum request for the IDE PhpED to provide syntax support for SCSS and possibly LESS . The response from the PhpED folks has been that they are not able to find a formal description of the grammar similar to the CSS grammar described here : http : www.w3.org TR CSS21 grammar.html .. . .. . Does anyone know where a formal description can be found There are lot of PhpED users including me who would like SCSS support . Comment : You would be better off contacting the developers of LESS and SASS . Comment : Although they are pretty well crafted I don t think there s a standard specifications document like CSS for them . Have a look at this file from jsass . code.google.com p jsass source browse trunk src org lucubrate https : code.google.com p jsass source browse trunk src org lucubrate jsass Sass.g Comment : I am also using PhpED but I m moving to phpStorm . PhpED doesn t support too many things right now . Developers say - there is no formal grammar but in fact it s only excuse in my opinion - there is SASS SCSS LESS support in other editors like phpStorm with Compass support too or SublimeText editor and their developers managed somehow to do it . .. . Answer : It seems that phpEd will support SCSS soon in version 14 so developers managed to find grammar . But there is no info about LESS or SASS syntax .", "Question : I use NuSphere s PhpED s PHP IDE to crate and debuge PHP script . I ve never used a repository systems but wish to do so now and am struggling on how to implement it into my workflow . I have the following three machines : .. . .. . Windows 7 PC .. . .. . NuShere PhpED IDE It is set up to use my Local Development Centos Server .. . TortoiseGit .. . SourceTree Not sure if I will use since it doesn t integrate with PhpED .. . .. . Local Development Centos Server .. . .. . Apache used with PhpED on Windows PC .. . GitLab .. . Samba not set up yet but plan on using to share var www files with PhpED on Windows PC .. . .. . Remote Production Centos Server .. . .. . Apache .. . .. . Will I need to install Git on the Windows PC Will I need to install Git on the Remote Production Centos Server PhpED has some basic shell integration with TortoiseGit . Think it is worth using or am I better off using some other tool to interface with Git Any other description of a recommended workflow would be appreciated . Thank you .. . Answer : Will I need to install Git on the Windows PC Yes if you want to git-clone the repos from your Local Dev Centos server onto your computer .. . .. . Will I need to install Git on the Remote Production Centos Server Yes if you want to push your repos to bares repos on your Remote Production Centos server . But you can also consider other means to deploy those same repo : .. . A post-receive hook on the local Prod Centos server can : .. . .. . checkout those repo still on the local Prod server where git is installed anyway as described for instance in Getting GitHub files and updates onto an Ubuntu web server http : stackoverflow.com a 22576537 6309 .. . rsynch that working tree to the prod server that way no need for Git on the remote prod server Comment : Thanks Von . If I am using Samba to map the Linux drive to Windows then will Git not be required on Windows Comment : @user1032531 it would still be required if you want to add commit revert merge or do any of the git commands in the repo you would access through the share . Plus this is really not the way to wrok with a distributed VCS : you clone on your local computer a repo in order to have the full history locally without depending on the network or on a share . Comment : The Local Development Centos Server is located in my house and is on a high speed LAN . If I have the code on my Windows PC I would need to keep it synchronized . Why not make it one drive shared by both Comment : @user1032531 Because in that case you simply don t need git . If you are using git for versioning and branching then you clone a repo you don t access through the network however fast it is : Git has been designed to be fast on the local drive not on the LAN WAN . Comment : Thanks again Von . Do you know of any whitepaper blog etc which describes the desired workflow There are a bunch of tutorials on setting it up but I haven t found one describing preferred workflow .", "Question : My PHPEd suddenly stopped showing arguments and arg order in the hints and now just shows a basic description of the function . Before I go digging around in the config files has anyone else had this problem Thanks Edit : .. . .. . Sorry I may not have been entirely clear on this . There is no problem with my own classes only with the actual php functions . Example : .. . .. . How it used to work : .. . .. . I type a PHP function say strpos . As soon as I type the at the end of it I get the little yellow box showing something like this : .. . .. . with the first argument bold . If I type it and then a comma it bolds the second arg and so on . This is really nice since PHP functions are a bit scrambled as far as argument order and I don t have to look them up every time . How it works now : .. . .. . I type a php function say strpos . As soon as I type the at the end of it I get the little yellow box . It says something like strpos - Returns the numeric position of the first occurrence of needle in the haystack string . There are no arguments shown which makes the little box basically worthless - I know what strpos does I just want a reminder of the argument order . I think this may be a problem with the included PHPDoc which I never use but may be the source of the data for the hint box . I did recently upgrade to 5.6 but ended up removing it and restoring 5.2 . I installed to a different folder and uninstalled from there but it may have overwritten something in the original folder I m using v5.2 5220 . Comment : Your final edit should actually be posted as the answer to the question . Then it can be upvoted as others find it useful . .. . Answer : What version of PhpEd are you using And did you made an update of PhpEd recently As mentionned in the forum http : forum.nusphere.com viewtopic.php t 1906 highlight hints that can modify the Function Arguments Tooltip feature behavior . One way to check if this is linked to settings is to move the phped.cfg config file save it and let PhpEd recreates it with default values . If that does restore the tooltips use a diff program to check what option may have been changed . Do you see no hints for all classes or only your own Php classes in the latter case this thread http : forum.nusphere.com viewtopic.php t 3153 highlight hints has some setting advices .. . .. . Note : the reason I ask for the version is because of this very recent thread http : forum.nusphere.com viewtopic.php t 5661 highlight function+argument+tooltip about PhpEd5.5 : .. . .. . alt text http : www.postimage.org gxunBjr-3403a417a596699446ed7da2398ef95e.gif .. . .. . In that case the advice is to copy PROGRAMFILES nusphere phped config func.rel into APPDATA nusphere phped config directory overriding the file in it .", "Question : I m developing a portal for local developers and would like to make it possible to open PHP-files directly from the browser in PHPEd by passing their name om the hard disk . I ve found two solutions but couldn t get them to work : .. . .. . Solution 1 : create a new protocol phped protocol and use phped protocol : file as URI .. . Solution 2 : execute a batch script that opens PHPEd .. . .. . Could someone help me out with one of these solutions I want to know how to open a PHP-file using PHPEd via PHP browser . Edit .. . .. . Solution 1 .. . .. . test.reg .. . .. . test.html .. . .. . Solution 2 .. . .. . phped protocol.bat .. . .. . test.php Comment : please show the actual things you did for solution 1 and 2 and where you got stuck Comment : I ve tried the above solutions and several other things like substitution system for exec altering the command etc . .. . Answer : Our current solution is a listener and a database . PHP inserts a record in the database . When the listeners finds it it wil open the file .", "Question : To debug a PHP app in PHPEd the root of the project needs to be set to the web folder of my app . However the PHP files to be editted are outside of the web folder . Is it possible to configure PHPEd to run debug from within the web folder while displaying all of the PHP files in the workspace Desired workspace layout .. . Answer : I think the right way to do this is to go to the project properties click on Mapping and then enter the path to the Web folder in the Remote directory and Local directory parts and URL pointing at the main site . For example : .. . .. . home userA workspace project web X : home userA workspace project web http : www.mysite.com .. . .. . Make sure the main project config the one that points to .. . workspace project has no URL associated with it just erase it . Comment : Why was this down-voted", "Question : I use NuSphere PhpEd IDE and I d like to know is there a way to find the closing bracket like in Eclipse Ctrl + Shift + P Go to Matching Bracket Helps to find the closing bracket of lengthy if-else statements . . Is there a similar shortcut in phpEd Thanks . .. . Answer : Try Ctrl+ .. . .. . To define your own shortcuts go to Tools - Settings - Editor shortcuts", "Question : I use NuSphere PhpEd IDE and I d like to know is there a way to find the closing bracket like in Eclipse Ctrl + Shift + P Go to Matching Bracket Helps to find the closing bracket of lengthy if-else statements . . Is there a similar shortcut in phpEd Thanks . .. . Answer : To find the closing bracket on windows you will need to do the following : .. . .. . Shift + F2 Comment : Great Thanks It works", "Question : I use NuSphere PhpEd IDE and I d like to know is there a way to find the closing bracket like in Eclipse Ctrl + Shift + P Go to Matching Bracket Helps to find the closing bracket of lengthy if-else statements . . Is there a similar shortcut in phpEd Thanks . .. . Answer : Now Shift+F2 Ctrl+F2 Alt+F2 are working with bookmarks like in VS . To jump to matching bracket you have to press Shift+Alt+F2 not too comfortable but indeed you can define you own on Tools- Settings- IDE Shortcuts page ." ] }
[ "yes-answer-long", "yes-answer-short" ]
smarty
UNK_RELATION
metalua@lua@38
metalua -- metalua is an alternative @placeholder compiler supporting compile-time metaprogramming and syntax extensions while containing a pure lua library for parsing lua source into asts .
{ "confidence": [ 75.2718276977539, 65.36083984375, 56.389225006103516, 54.5303840637207, 50.95146942138672, 50.95146942138672, 49.61249923706055, 49.447898864746094, 48.4367561340332, 46.11341857910156, 46.11341857910156, 41.422550201416016, 40.96979904174805, 37.29716110229492, 37.29716110229492, 35.95819091796875, 32.786407470703125, 32.054603576660156, 31.4776611328125, 31.256656646728516, 31.16204833984375, 31.16204833984375, 31.16204833984375, 31.006690979003906, 31.006690979003906, 30.73196029663086, 29.401897430419922, 28.96175765991211, 28.96175765991211, 25.997982025146484, 25.997982025146484, 25.997982025146484, 25.523059844970703, 24.3931884765625, 24.3931884765625, 24.3931884765625, 23.491432189941406, 22.579296112060547, 22.152462005615234, 17.977392196655273, 17.946453094482422, 16.92333221435547, 16.92333221435547, 16.92333221435547, 16.92333221435547, 16.278226852416992, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 13.253596305847168, 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": [ "The Metalua compiler appears to be written in Lua and Metalua so theoretically yes .", "Metalua itself appears to run on top of Lua .", "Note that although Metalua allows you to modify Lua syntax it does not work with LuaJIT .", "For example the Lua IDE http : studio.zerobrane.com I m working on is using Lua Inspect http : lua-users.org wiki LuaInspect which relies on metalua to provide AST parsing .", "with metalua and if it is worth the effort .", "Can MetaLua be used with LuaJIT", "Can I do it with MetaLua", "Note that metalua github repository https : github.com fab13n metalua has some branches that includes newer metalua code for example tilo branch includes v0.6 while the master branch seems to only include v0.5 .", "If you can run Lua code nothing should stop you from integrating LuaInspect and MetaLua .", "Maybe with metalua http : metalua.luaforge.net src index.html", "What problem are you trying to solve with Metalua", "Many existing code-analysis tools like LuaInspect are based on MetaLua http : metalua.luaforge.net but I don t see an easy way to integrate MetaLua within C .", "The reason you may be interested in the newer version is that there was some refactoring done https : github.com fab13n metalua blob tilo README.TXT to simplify usage of Lua only parts .", "I think that this Metalua example pythonic http : metalua.luaforge.net src samples pythonic.lua.html is exactly what you are looking for .", "The makefile https : github.com fab13n metalua blob master src make.sh L71 reveals some of the interesting core pieces .", "I think it should be possible using MetaLua but I m not really sure where to start .", "Comparisons in Lua return a boolean value .", "The generation of AST is as simple as : .. . .. . Note that LuaInspect hasn t been updated to support lineinfo format changes in the recent metalua versions so if you plan on using it with ML 0.7+ you may review these changes https : github.com pkulchenko ZeroBraneStudio commit 0775e1bcdc1fc7bc90d91f9c476d706d7cb736f7 I made to make it work in the Lua IDE I m working on .", "There are some components that don t depends on Lua OPcodes and will run on LuaJIT and some components that do and as such are specific to Lua and won t run on LuaJIT as it has different OPcodes .", "The earlier versions of MetaLua required some manual work to avoid compilation steps but the recent versions 0.7+ don t require much work .", "My issue is that Lua forces the result-of a comparison to a boolean .", "Lua assumes you ll do branching with comparisons not assignment .", "Any advice on where to start with patching the Lua .", "I heard that Lua is good for DSL and I really need the syntax to work here .", "You only have two choices to make this work with your syntax : .. . .. . Option 1 : Patch the Lua core .", "I ve extracted those modules I need and implemented a wrapper https : github.com pkulchenko ZeroBraneStudio blob master lualibs metalua metalua.lua that loads those modules in the right order .", "What is the easiest way to get an abstract-syntax-tree within C from a Lua script", "The byte-code that Lua generates actually does a jump on any comparison .", "There is nothing you can do about it short of changing the core of Lua .", "I m trying to find a way to do element-by-element comparison in Lua using the standard operator .", "The biggest issue is that Lua assumes on a very low-level that the comparison operators return a bool value .", "Even in the case of a 1 2 Lua uses a conditional jump to assign either true or false to a .", "Unfortunately that issue pales in comparison to the contents of some of the files that get compiled into bytecode.luac considering that they reference PUC-Lua opcodes and bytecode which are definitely incompatible with LuaJIT .", "I m trying to do a simple static-code-analysis within C for a Lua script .", "And projects like Lua for Irony https : luairony.codeplex.com stats seem to be in an alpha stage or the development has stopped years ago .", "What would be your suggestion to get an AST for LUA within C for static-code-analysis", "I m looking for a way to enable white space significant indentation in Lua like in the OCaml F Python languages it really hurts me to put end keywords everywhere.. . .", "You will probably have to do some code spelunking though since its main objective isn t creating an AST but actually interpreting Lua directly in C .", "Here is my code so far with addition working but less-than comparison not working : .. . .. . The Lua programming manual says that the result-of the lt metamethod call is always converted to a boolean .", "Then mistakenly written v a b FALSE will generate syntax-error .", "I d say that if it is possible then it would certainly require some reprogramming of the compiler but out-of-the-box usage with LuaJIT is highly unlikely .", "We ll call it with the following code : .. . .. . All this will do is parse the code into a syntax tree and then spit it back out again .", "I like the idea since it leaves me with the syntax I want which is very important .", "Again though I have no problem doing the calculation just need help making the syntax acceptable .", "You can use square-bracketed syntax for operations : v a b v a + b .", "I m making a DSL and I think this sort of syntax will confuse people for example someone will try : c v a b false and it falls apart .", "Have someone managed to do it", "Thanks", "As much as I prefer my languages to include this features I don t think it s worth introducing complete and utter syntactic incompability with every single line of non-trivial code ever written .", "Think hard if it is for you .", "@delnan : sure I think I could get used to it .", "I m just curious if someone have managed to enable this e.g .", "And if it so then how", "I couldn t find any reliable info", "What have you tried if anything", "Replacing lua.exe by luajit.exe in the Makefile", "Perhaps it can be done in a simpler fashion .", "However LuaJIT isn t capable of compiling multiple scripts into one output file at the command-line like LuaC .", "Simply replacing LUAC with an instance of LuaJIT won t do .", "The following lines will have to be adjusted for a LuaJIT-compatible makefile .", "The answer depends on what you are trying to do with it .", "Those components that are generic can still be useful though .", "All this functionality runs on LuaJIT 2.0.2 without any issues .", "For example here s what I d like to do : .. . .. . I already have code working for addition and subtraction multiplication etc .", "I don t want a boolean I want a table as the result-of the comparison .", "My question is how can I work around that", "A coworker suggested that I just use instead with the shl metamethod .", "I tried it and it works but I really want to use for less than rather than a hack using the wrong symbol .", "why do you need it as an operator", "can t you just use a normal function", "@Piglet I m making a DSL .", "I want to be able to do something like a b+5 c d where a b c and d are all vectors arrays .", "Rewriting that as prefix function-calls is very verbose : less than divide multiply a add b 5 c d .", "I can t ask my users to write that .", ".. . .. . This is probably going to be very difficult and it ll be a maintenance nightmare in the future .", "For example something like c 4 5 gets compiled to byte-code that looks much more like if 4 5 then c true else c false end .", "You can see what the byte-code looks like with luac -l file.lua .", "If you compare the byte-code of c 4 5 with c 4+5 you ll see what I mean .", "The addition code is shorter and simpler .", "Option 2 : Parse your code change it and run that .. . .. . This is what I think you should do .", "It would be very hard expect most of the work is already done for you using something like LuaMinify https : github.com stravant LuaMinify .", "First of all write a function you can use for comparisons of anything .", "The idea here is to do your special comparison if it s a table but fall back on using for everything else .", "Now all we need to do is replace every less than operator a b with my less a b .", "Let s use the parser from LuaMinify https : github.com stravant LuaMinify .", "We ll change FormatIdentity.lua to make it do the substitution .", "Replace the section near line 138 with the following code : .. . .. . That s all there is to it .", "It will replace something like c a b c+d with my less a b c+d .", "Just shove all your code through at runtime .", "I will give your code a try and see how it works .", "Thanks I saw that in the manual .", "I guess I m hoping I can preparse the code or something .", "It looks like the comparison operators don t return anything internally they are all interpreted as jumps .", "@jenny exactly .", "It s not straightforward .", "Can you put up with a bit verbose v -notation : .. . v a b instead of a b", "Usage :", "I just wanted to say that your idea is brilliant ." ] }
{ "confidence": [ 84.69111633300781, 82.3293685913086, 80.106689453125, 79.69586181640625, 74.56366729736328, 67.4218978881836, 55.175743103027344, 53.612205505371094, 52.258148193359375 ], "content": [ "Question : Can MetaLua be used with LuaJIT And if it so then how I couldn t find any reliable info Comment : What have you tried if anything Replacing lua.exe by luajit.exe in the Makefile Comment : What problem are you trying to solve with Metalua Perhaps it can be done in a simpler fashion . .. . Answer : The answer depends on what you are trying to do with it . There are some components that don t depends on Lua OPcodes and will run on LuaJIT and some components that do and as such are specific to Lua and won t run on LuaJIT as it has different OPcodes . Those components that are generic can still be useful though . For example the Lua IDE http : studio.zerobrane.com I m working on is using Lua Inspect http : lua-users.org wiki LuaInspect which relies on metalua to provide AST parsing . I ve extracted those modules I need and implemented a wrapper https : github.com pkulchenko ZeroBraneStudio blob master lualibs metalua metalua.lua that loads those modules in the right order . All this functionality runs on LuaJIT 2.0.2 without any issues . Note that metalua github repository https : github.com fab13n metalua has some branches that includes newer metalua code for example tilo branch includes v0.6 while the master branch seems to only include v0.5 . The reason you may be interested in the newer version is that there was some refactoring done https : github.com fab13n metalua blob tilo README.TXT to simplify usage of Lua only parts .", "Question : Can MetaLua be used with LuaJIT And if it so then how I couldn t find any reliable info Comment : What have you tried if anything Replacing lua.exe by luajit.exe in the Makefile Comment : What problem are you trying to solve with Metalua Perhaps it can be done in a simpler fashion . .. . Answer : The Metalua compiler appears to be written in Lua and Metalua so theoretically yes . The makefile https : github.com fab13n metalua blob master src make.sh L71 reveals some of the interesting core pieces . Metalua itself appears to run on top of Lua . However LuaJIT isn t capable of compiling multiple scripts into one output file at the command-line like LuaC . Simply replacing LUAC with an instance of LuaJIT won t do . The following lines will have to be adjusted for a LuaJIT-compatible makefile . Unfortunately that issue pales in comparison to the contents of some of the files that get compiled into bytecode.luac considering that they reference PUC-Lua opcodes and bytecode which are definitely incompatible with LuaJIT . I d say that if it is possible then it would certainly require some reprogramming of the compiler but out-of-the-box usage with LuaJIT is highly unlikely .", "Question : What is the easiest way to get an abstract-syntax-tree within C from a Lua script I m trying to do a simple static-code-analysis within C for a Lua script . Many existing code-analysis tools like LuaInspect are based on MetaLua http : metalua.luaforge.net but I don t see an easy way to integrate MetaLua within C . And projects like Lua for Irony https : luairony.codeplex.com stats seem to be in an alpha stage or the development has stopped years ago . What would be your suggestion to get an AST for LUA within C for static-code-analysis .. . Answer : If you can run Lua code nothing should stop you from integrating LuaInspect and MetaLua . The earlier versions of MetaLua required some manual work to avoid compilation steps but the recent versions 0.7+ don t require much work . The generation of AST is as simple as : .. . .. . Note that LuaInspect hasn t been updated to support lineinfo format changes in the recent metalua versions so if you plan on using it with ML 0.7+ you may review these changes https : github.com pkulchenko ZeroBraneStudio commit 0775e1bcdc1fc7bc90d91f9c476d706d7cb736f7 I made to make it work in the Lua IDE I m working on .", "Question : I m looking for a way to enable white space significant indentation in Lua like in the OCaml F Python languages it really hurts me to put end keywords everywhere.. . . Have someone managed to do it Maybe with metalua http : metalua.luaforge.net src index.html Thanks Comment : As much as I prefer my languages to include this features I don t think it s worth introducing complete and utter syntactic incompability with every single line of non-trivial code ever written . Think hard if it is for you . Comment : @delnan : sure I think I could get used to it . I m just curious if someone have managed to enable this e.g . with metalua and if it is worth the effort . .. . Answer : I think that this Metalua example pythonic http : metalua.luaforge.net src samples pythonic.lua.html is exactly what you are looking for . Note that although Metalua allows you to modify Lua syntax it does not work with LuaJIT .", "Question : What is the easiest way to get an abstract-syntax-tree within C from a Lua script I m trying to do a simple static-code-analysis within C for a Lua script . Many existing code-analysis tools like LuaInspect are based on MetaLua http : metalua.luaforge.net but I don t see an easy way to integrate MetaLua within C . And projects like Lua for Irony https : luairony.codeplex.com stats seem to be in an alpha stage or the development has stopped years ago . What would be your suggestion to get an AST for LUA within C for static-code-analysis .. . Answer : You might want to try monosharp : http : www.moonsharp.org .. . .. . It uses ANTLR to build a C AST . You will probably have to do some code spelunking though since its main objective isn t creating an AST but actually interpreting Lua directly in C .", "Question : I m trying to find a way to do element-by-element comparison in Lua using the standard operator . For example here s what I d like to do : .. . .. . I already have code working for addition and subtraction multiplication etc . My issue is that Lua forces the result-of a comparison to a boolean . I don t want a boolean I want a table as the result-of the comparison . Here is my code so far with addition working but less-than comparison not working : .. . .. . The Lua programming manual says that the result-of the lt metamethod call is always converted to a boolean . My question is how can I work around that I heard that Lua is good for DSL and I really need the syntax to work here . I think it should be possible using MetaLua but I m not really sure where to start . A coworker suggested that I just use instead with the shl metamethod . I tried it and it works but I really want to use for less than rather than a hack using the wrong symbol . Thanks Comment : why do you need it as an operator can t you just use a normal function Comment : @Piglet I m making a DSL . I want to be able to do something like a b+5 c d where a b c and d are all vectors arrays . Rewriting that as prefix function-calls is very verbose : less than divide multiply a add b 5 c d . I can t ask my users to write that . .. . Answer : Comparisons in Lua return a boolean value . There is nothing you can do about it short of changing the core of Lua . Comment : Thanks I saw that in the manual . I guess I m hoping I can preparse the code or something . Can I do it with MetaLua Comment : Any advice on where to start with patching the Lua . It looks like the comparison operators don t return anything internally they are all interpreted as jumps . Even in the case of a 1 2 Lua uses a conditional jump to assign either true or false to a . Comment : @jenny exactly . It s not straightforward .", "Question : I m trying to find a way to do element-by-element comparison in Lua using the standard operator . For example here s what I d like to do : .. . .. . I already have code working for addition and subtraction multiplication etc . My issue is that Lua forces the result-of a comparison to a boolean . I don t want a boolean I want a table as the result-of the comparison . Here is my code so far with addition working but less-than comparison not working : .. . .. . The Lua programming manual says that the result-of the lt metamethod call is always converted to a boolean . My question is how can I work around that I heard that Lua is good for DSL and I really need the syntax to work here . I think it should be possible using MetaLua but I m not really sure where to start . A coworker suggested that I just use instead with the shl metamethod . I tried it and it works but I really want to use for less than rather than a hack using the wrong symbol . Thanks Comment : why do you need it as an operator can t you just use a normal function Comment : @Piglet I m making a DSL . I want to be able to do something like a b+5 c d where a b c and d are all vectors arrays . Rewriting that as prefix function-calls is very verbose : less than divide multiply a add b 5 c d . I can t ask my users to write that . .. . Answer : As others have already mentioned there is no straight-forward solution to this . However with the use of a generic Python-like zip function such as the one shown below you can simplify the problem like so :", "Question : I m trying to find a way to do element-by-element comparison in Lua using the standard operator . For example here s what I d like to do : .. . .. . I already have code working for addition and subtraction multiplication etc . My issue is that Lua forces the result-of a comparison to a boolean . I don t want a boolean I want a table as the result-of the comparison . Here is my code so far with addition working but less-than comparison not working : .. . .. . The Lua programming manual says that the result-of the lt metamethod call is always converted to a boolean . My question is how can I work around that I heard that Lua is good for DSL and I really need the syntax to work here . I think it should be possible using MetaLua but I m not really sure where to start . A coworker suggested that I just use instead with the shl metamethod . I tried it and it works but I really want to use for less than rather than a hack using the wrong symbol . Thanks Comment : why do you need it as an operator can t you just use a normal function Comment : @Piglet I m making a DSL . I want to be able to do something like a b+5 c d where a b c and d are all vectors arrays . Rewriting that as prefix function-calls is very verbose : less than divide multiply a add b 5 c d . I can t ask my users to write that . .. . Answer : Can you put up with a bit verbose v -notation : .. . v a b instead of a b Usage : Comment : I just wanted to say that your idea is brilliant . This is not something I would have been able to come up with . Very creative I m not sure I can use it though . I m making a DSL and I think this sort of syntax will confuse people for example someone will try : c v a b false and it falls apart . Comment : What does a b false mean in your DSL You are comparing a vector with a boolean . Comment : It would do an element-by-element comparison of each item with false e.g . false true false false would return true false true . Again though I have no problem doing the calculation just need help making the syntax acceptable . Comment : To implement your own equality such as vector boolean you will have to define special values objects TRUE and FALSE because it is unable to use eq metamethod for comparing two different types . You can use square-bracketed syntax for operations : v a b v a + b . Then mistakenly written v a b FALSE will generate syntax-error . And you will be able to detect errors like this : a b FALSE too .", "Question : I m trying to find a way to do element-by-element comparison in Lua using the standard operator . For example here s what I d like to do : .. . .. . I already have code working for addition and subtraction multiplication etc . My issue is that Lua forces the result-of a comparison to a boolean . I don t want a boolean I want a table as the result-of the comparison . Here is my code so far with addition working but less-than comparison not working : .. . .. . The Lua programming manual says that the result-of the lt metamethod call is always converted to a boolean . My question is how can I work around that I heard that Lua is good for DSL and I really need the syntax to work here . I think it should be possible using MetaLua but I m not really sure where to start . A coworker suggested that I just use instead with the shl metamethod . I tried it and it works but I really want to use for less than rather than a hack using the wrong symbol . Thanks Comment : why do you need it as an operator can t you just use a normal function Comment : @Piglet I m making a DSL . I want to be able to do something like a b+5 c d where a b c and d are all vectors arrays . Rewriting that as prefix function-calls is very verbose : less than divide multiply a add b 5 c d . I can t ask my users to write that . .. . Answer : You only have two choices to make this work with your syntax : .. . .. . Option 1 : Patch the Lua core . .. . .. . This is probably going to be very difficult and it ll be a maintenance nightmare in the future . The biggest issue is that Lua assumes on a very low-level that the comparison operators return a bool value . The byte-code that Lua generates actually does a jump on any comparison . For example something like c 4 5 gets compiled to byte-code that looks much more like if 4 5 then c true else c false end . You can see what the byte-code looks like with luac -l file.lua . If you compare the byte-code of c 4 5 with c 4+5 you ll see what I mean . The addition code is shorter and simpler . Lua assumes you ll do branching with comparisons not assignment . Option 2 : Parse your code change it and run that .. . .. . This is what I think you should do . It would be very hard expect most of the work is already done for you using something like LuaMinify https : github.com stravant LuaMinify . First of all write a function you can use for comparisons of anything . The idea here is to do your special comparison if it s a table but fall back on using for everything else . Now all we need to do is replace every less than operator a b with my less a b . Let s use the parser from LuaMinify https : github.com stravant LuaMinify . We ll call it with the following code : .. . .. . All this will do is parse the code into a syntax tree and then spit it back out again . We ll change FormatIdentity.lua to make it do the substitution . Replace the section near line 138 with the following code : .. . .. . That s all there is to it . It will replace something like c a b c+d with my less a b c+d . Just shove all your code through at runtime . Comment : Thanks I will give your code a try and see how it works . I like the idea since it leaves me with the syntax I want which is very important ." ] }
[ "yes-answer-long", "yes-answer-short" ]
lua
UNK_RELATION